diff --git a/go/inventory/v1/service.pb.gw.go b/go/inventory/v1/service.pb.gw.go index 85d71370..15341c1d 100644 --- a/go/inventory/v1/service.pb.gw.go +++ b/go/inventory/v1/service.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) @@ -31,7 +30,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join func request_NodeRPC_QueryNode_0(ctx context.Context, marshaler runtime.Marshaler, client NodeRPCClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -82,20 +80,22 @@ func RegisterNodeRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, se var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.inventory.v1.NodeRPC/QueryNode", runtime.WithHTTPPathPattern("/v1/node")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_NodeRPC_QueryNode_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_NodeRPC_QueryNode_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NodeRPC_QueryNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_NodeRPC_QueryNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -114,20 +114,22 @@ func RegisterClusterRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.inventory.v1.ClusterRPC/QueryCluster", runtime.WithHTTPPathPattern("/v1/inventory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ClusterRPC_QueryCluster_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ClusterRPC_QueryCluster_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClusterRPC_QueryCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClusterRPC_QueryCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -137,7 +139,7 @@ func RegisterClusterRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux, // RegisterNodeRPCHandlerFromEndpoint is same as RegisterNodeRPCHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterNodeRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -176,19 +178,21 @@ func RegisterNodeRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.inventory.v1.NodeRPC/QueryNode", runtime.WithHTTPPathPattern("/v1/node")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_NodeRPC_QueryNode_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_NodeRPC_QueryNode_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_NodeRPC_QueryNode_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_NodeRPC_QueryNode_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -196,7 +200,7 @@ func RegisterNodeRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl } var ( - pattern_NodeRPC_QueryNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_NodeRPC_QueryNode_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "node"}, "")) ) var ( @@ -206,7 +210,7 @@ var ( // RegisterClusterRPCHandlerFromEndpoint is same as RegisterClusterRPCHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterClusterRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -245,19 +249,21 @@ func RegisterClusterRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.inventory.v1.ClusterRPC/QueryCluster", runtime.WithHTTPPathPattern("/v1/inventory")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ClusterRPC_QueryCluster_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ClusterRPC_QueryCluster_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ClusterRPC_QueryCluster_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ClusterRPC_QueryCluster_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -265,7 +271,7 @@ func RegisterClusterRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux, } var ( - pattern_ClusterRPC_QueryCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "inventory"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ClusterRPC_QueryCluster_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "inventory"}, "")) ) var ( diff --git a/go/node/audit/v1beta2/query.pb.gw.go b/go/node/audit/v1beta2/query.pb.gw.go index 01a89373..9236d231 100644 --- a/go/node/audit/v1beta2/query.pb.gw.go +++ b/go/node/audit/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -90,7 +88,6 @@ func request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.M } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -124,7 +121,6 @@ func local_request_Query_ProviderAttributes_0(ctx context.Context, marshaler run } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -158,7 +154,6 @@ func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler ru } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -169,7 +164,6 @@ func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler ru } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -196,7 +190,6 @@ func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marsha } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -207,7 +200,6 @@ func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marsha } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -238,7 +230,6 @@ func request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Ma } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -272,7 +263,6 @@ func local_request_Query_AuditorAttributes_0(ctx context.Context, marshaler runt } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -301,20 +291,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta2.Query/AllProvidersAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AllProvidersAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AllProvidersAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AllProvidersAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -324,20 +316,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta2.Query/ProviderAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/{owner}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProviderAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProviderAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -347,20 +341,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta2.Query/ProviderAuditorAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/{auditor}/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProviderAuditorAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProviderAuditorAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -370,20 +366,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta2.Query/AuditorAttributes", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/auditor/{auditor}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AuditorAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AuditorAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -393,7 +391,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -432,19 +430,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta2.Query/AllProvidersAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_AllProvidersAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_AllProvidersAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AllProvidersAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -452,19 +452,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta2.Query/ProviderAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/{owner}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProviderAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_ProviderAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -472,19 +474,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta2.Query/ProviderAuditorAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta2/audit/attributes/{auditor}/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProviderAuditorAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_ProviderAuditorAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -492,19 +496,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta2.Query/AuditorAttributes", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/auditor/{auditor}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_AuditorAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_AuditorAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -512,13 +518,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta2", "attributes", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta2", "attributes", "list"}, "")) - pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta2", "attributes", "owner", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta2", "attributes", "owner", "list"}, "")) - pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta2", "attributes", "auditor", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta2", "attributes", "auditor", "owner"}, "")) - pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta2", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta2", "auditor", "list"}, "")) ) var ( diff --git a/go/node/audit/v1beta3/query.pb.gw.go b/go/node/audit/v1beta3/query.pb.gw.go index 189e7bb0..a9a9af0d 100644 --- a/go/node/audit/v1beta3/query.pb.gw.go +++ b/go/node/audit/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -90,7 +88,6 @@ func request_Query_ProviderAttributes_0(ctx context.Context, marshaler runtime.M } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -124,7 +121,6 @@ func local_request_Query_ProviderAttributes_0(ctx context.Context, marshaler run } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -158,7 +154,6 @@ func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler ru } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -169,7 +164,6 @@ func request_Query_ProviderAuditorAttributes_0(ctx context.Context, marshaler ru } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -196,7 +190,6 @@ func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marsha } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -207,7 +200,6 @@ func local_request_Query_ProviderAuditorAttributes_0(ctx context.Context, marsha } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -238,7 +230,6 @@ func request_Query_AuditorAttributes_0(ctx context.Context, marshaler runtime.Ma } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -272,7 +263,6 @@ func local_request_Query_AuditorAttributes_0(ctx context.Context, marshaler runt } protoReq.Auditor, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "auditor", err) } @@ -301,20 +291,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta3.Query/AllProvidersAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AllProvidersAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AllProvidersAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AllProvidersAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -324,20 +316,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta3.Query/ProviderAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/{owner}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProviderAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProviderAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -347,20 +341,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta3.Query/ProviderAuditorAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/{auditor}/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ProviderAuditorAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_ProviderAuditorAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -370,20 +366,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.audit.v1beta3.Query/AuditorAttributes", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/auditor/{auditor}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_AuditorAttributes_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_AuditorAttributes_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -393,7 +391,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -432,19 +430,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta3.Query/AllProvidersAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_AllProvidersAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_AllProvidersAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AllProvidersAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AllProvidersAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -452,19 +452,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta3.Query/ProviderAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/{owner}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProviderAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_ProviderAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -472,19 +474,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta3.Query/ProviderAuditorAttributes", runtime.WithHTTPPathPattern("/akash/audit/v1beta3/audit/attributes/{auditor}/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ProviderAuditorAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_ProviderAuditorAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_ProviderAuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_ProviderAuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -492,19 +496,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.audit.v1beta3.Query/AuditorAttributes", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/auditor/{auditor}/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_AuditorAttributes_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_AuditorAttributes_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_AuditorAttributes_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_AuditorAttributes_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -512,13 +518,13 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta3", "attributes", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_AllProvidersAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 2, 4}, []string{"akash", "audit", "v1beta3", "attributes", "list"}, "")) - pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta3", "attributes", "owner", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ProviderAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 2, 5}, []string{"akash", "audit", "v1beta3", "attributes", "owner", "list"}, "")) - pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta3", "attributes", "auditor", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_ProviderAuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 1, 2, 3, 1, 0, 4, 1, 5, 4, 1, 0, 4, 1, 5, 5}, []string{"akash", "audit", "v1beta3", "attributes", "auditor", "owner"}, "")) - pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta3", "auditor", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_AuditorAttributes_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 3, 2, 4}, []string{"akash", "provider", "v1beta3", "auditor", "list"}, "")) ) var ( diff --git a/go/node/cert/v1beta2/query.pb.gw.go b/go/node/cert/v1beta2/query.pb.gw.go index bf0f7790..7eef6a4e 100644 --- a/go/node/cert/v1beta2/query.pb.gw.go +++ b/go/node/cert/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -81,20 +79,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.cert.v1beta2.Query/Certificates", runtime.WithHTTPPathPattern("/akash/cert/v1beta3/certificates/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Certificates_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Certificates_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Certificates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -104,7 +104,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -143,19 +143,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.cert.v1beta2.Query/Certificates", runtime.WithHTTPPathPattern("/akash/cert/v1beta3/certificates/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Certificates_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Certificates_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Certificates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -163,7 +165,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "")) ) var ( diff --git a/go/node/cert/v1beta3/query.pb.gw.go b/go/node/cert/v1beta3/query.pb.gw.go index 4694c126..f2285029 100644 --- a/go/node/cert/v1beta3/query.pb.gw.go +++ b/go/node/cert/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -81,20 +79,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.cert.v1beta3.Query/Certificates", runtime.WithHTTPPathPattern("/akash/cert/v1beta3/certificates/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Certificates_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Certificates_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Certificates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -104,7 +104,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -143,19 +143,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.cert.v1beta3.Query/Certificates", runtime.WithHTTPPathPattern("/akash/cert/v1beta3/certificates/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Certificates_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Certificates_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Certificates_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Certificates_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -163,7 +165,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Certificates_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "cert", "v1beta3", "certificates", "list"}, "")) ) var ( diff --git a/go/node/deployment/v1beta1/query.pb.gw.go b/go/node/deployment/v1beta1/query.pb.gw.go index 68399167..e734454f 100644 --- a/go/node/deployment/v1beta1/query.pb.gw.go +++ b/go/node/deployment/v1beta1/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -153,20 +151,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -176,20 +176,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -199,20 +201,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Group_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Group_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,7 +226,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -261,19 +265,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -281,19 +287,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -301,19 +309,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta1.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta1/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Group_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Group_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -321,11 +331,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "list"}, "")) - pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "deployments", "info"}, "")) - pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "groups", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta1", "groups", "info"}, "")) ) var ( diff --git a/go/node/deployment/v1beta2/query.pb.gw.go b/go/node/deployment/v1beta2/query.pb.gw.go index 415ad7d6..fe8ac08b 100644 --- a/go/node/deployment/v1beta2/query.pb.gw.go +++ b/go/node/deployment/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -153,20 +151,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -176,20 +176,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -199,20 +201,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Group_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Group_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,7 +226,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -261,19 +265,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -281,19 +287,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -301,19 +309,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta2.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta2/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Group_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Group_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -321,11 +331,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "list"}, "")) - pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "deployments", "info"}, "")) - pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "groups", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta2", "groups", "info"}, "")) ) var ( diff --git a/go/node/deployment/v1beta3/query.pb.gw.go b/go/node/deployment/v1beta3/query.pb.gw.go index 40020037..40689b33 100644 --- a/go/node/deployment/v1beta3/query.pb.gw.go +++ b/go/node/deployment/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -153,20 +151,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -176,20 +176,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Deployment_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Deployment_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -199,20 +201,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Group_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Group_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,7 +226,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -261,19 +265,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Deployments", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/deployments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -281,19 +287,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Deployment", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/deployments/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Deployment_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Deployment_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Deployment_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Deployment_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -301,19 +309,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.deployment.v1beta3.Query/Group", runtime.WithHTTPPathPattern("/akash/deployment/v1beta3/groups/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Group_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Group_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Group_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Group_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -321,11 +331,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "list"}, "")) - pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Deployment_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "deployments", "info"}, "")) - pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "groups", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Group_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "deployment", "v1beta3", "groups", "info"}, "")) ) var ( diff --git a/go/node/escrow/v1beta1/query.pb.gw.go b/go/node/escrow/v1beta1/query.pb.gw.go index 62fb3f75..93546b2b 100644 --- a/go/node/escrow/v1beta1/query.pb.gw.go +++ b/go/node/escrow/v1beta1/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -117,20 +115,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta1.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta1/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Accounts_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -140,20 +140,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta1.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta1/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Payments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Payments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -163,7 +165,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -202,19 +204,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta1.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta1/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Accounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,19 +226,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta1.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta1/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Payments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Payments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -242,9 +248,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "accounts", "list"}, "")) - pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta1", "types", "payments", "list"}, "")) ) var ( diff --git a/go/node/escrow/v1beta2/query.pb.gw.go b/go/node/escrow/v1beta2/query.pb.gw.go index a22f74ef..96bd497d 100644 --- a/go/node/escrow/v1beta2/query.pb.gw.go +++ b/go/node/escrow/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -117,20 +115,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta2.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta2/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Accounts_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -140,20 +140,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta2.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta2/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Payments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Payments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -163,7 +165,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -202,19 +204,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta2.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta2/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Accounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,19 +226,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta2.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta2/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Payments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Payments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -242,9 +248,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "accounts", "list"}, "")) - pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta2", "types", "payments", "list"}, "")) ) var ( diff --git a/go/node/escrow/v1beta3/query.pb.gw.go b/go/node/escrow/v1beta3/query.pb.gw.go index 2f3ae5ac..04841225 100644 --- a/go/node/escrow/v1beta3/query.pb.gw.go +++ b/go/node/escrow/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -117,20 +115,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta3.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta3/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Accounts_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -140,20 +140,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.escrow.v1beta3.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta3/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Payments_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Payments_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -163,7 +165,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -202,19 +204,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta3.Query/Accounts", runtime.WithHTTPPathPattern("/akash/escrow/v1beta3/types/accounts/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Accounts_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -222,19 +226,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.escrow.v1beta3.Query/Payments", runtime.WithHTTPPathPattern("/akash/escrow/v1beta3/types/payments/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Payments_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Payments_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Payments_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Payments_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -242,9 +248,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "accounts", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "accounts", "list"}, "")) - pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "payments", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Payments_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"akash", "escrow", "v1beta3", "types", "payments", "list"}, "")) ) var ( diff --git a/go/node/market/v1beta2/query.pb.gw.go b/go/node/market/v1beta2/query.pb.gw.go index 5ebd8b82..598ca022 100644 --- a/go/node/market/v1beta2/query.pb.gw.go +++ b/go/node/market/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -261,20 +259,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta2/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Orders_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Orders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -284,20 +284,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta2/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Order_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Order_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -307,20 +309,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta2/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bids_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bids_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -330,20 +334,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta2/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bid_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bid_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -353,20 +359,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta2/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Leases_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Leases_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -376,20 +384,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta2.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta2/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Lease_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Lease_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -399,7 +409,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -438,19 +448,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta2/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Orders_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Orders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -458,19 +470,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta2/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Order_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Order_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -478,19 +492,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta2/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bids_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bids_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -498,19 +514,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta2/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bid_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bid_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -518,19 +536,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta2/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Leases_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Leases_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -538,19 +558,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta2.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta2/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Lease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Lease_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -558,17 +580,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "list"}, "")) - pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "orders", "info"}, "")) - pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "list"}, "")) - pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "bids", "info"}, "")) - pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "list"}, "")) - pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta2", "leases", "info"}, "")) ) var ( diff --git a/go/node/market/v1beta3/query.pb.gw.go b/go/node/market/v1beta3/query.pb.gw.go index 64ecf0c3..5ed43d9f 100644 --- a/go/node/market/v1beta3/query.pb.gw.go +++ b/go/node/market/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -261,20 +259,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta3/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Orders_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Orders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -284,20 +284,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta3/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Order_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Order_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -307,20 +309,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta3/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bids_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bids_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -330,20 +334,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta3/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bid_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bid_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -353,20 +359,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta3/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Leases_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Leases_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -376,20 +384,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta3.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta3/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Lease_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Lease_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -399,7 +409,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -438,19 +448,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta3/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Orders_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Orders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -458,19 +470,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta3/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Order_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Order_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -478,19 +492,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta3/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bids_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bids_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -498,19 +514,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta3/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bid_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bid_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -518,19 +536,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta3/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Leases_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Leases_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -538,19 +558,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta3.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta3/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Lease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Lease_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -558,17 +580,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "list"}, "")) - pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "orders", "info"}, "")) - pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "list"}, "")) - pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "bids", "info"}, "")) - pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "list"}, "")) - pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta3", "leases", "info"}, "")) ) var ( diff --git a/go/node/market/v1beta4/query.pb.gw.go b/go/node/market/v1beta4/query.pb.gw.go index ee29aa23..9f4b0981 100644 --- a/go/node/market/v1beta4/query.pb.gw.go +++ b/go/node/market/v1beta4/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -261,20 +259,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta4/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Orders_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Orders_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -284,20 +284,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta4/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Order_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Order_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -307,20 +309,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta4/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bids_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bids_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -330,20 +334,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta4/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Bid_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Bid_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -353,20 +359,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta4/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Leases_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Leases_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -376,20 +384,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.market.v1beta4.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta4/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Lease_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Lease_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -399,7 +409,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -438,19 +448,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Orders", runtime.WithHTTPPathPattern("/akash/market/v1beta4/orders/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Orders_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Orders_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Orders_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Orders_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -458,19 +470,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Order", runtime.WithHTTPPathPattern("/akash/market/v1beta4/orders/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Order_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Order_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Order_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Order_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -478,19 +492,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Bids", runtime.WithHTTPPathPattern("/akash/market/v1beta4/bids/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bids_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bids_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bids_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bids_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -498,19 +514,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Bid", runtime.WithHTTPPathPattern("/akash/market/v1beta4/bids/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Bid_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Bid_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Bid_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Bid_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -518,19 +536,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Leases", runtime.WithHTTPPathPattern("/akash/market/v1beta4/leases/list")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Leases_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Leases_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Leases_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Leases_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -538,19 +558,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.market.v1beta4.Query/Lease", runtime.WithHTTPPathPattern("/akash/market/v1beta4/leases/info")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Lease_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Lease_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Lease_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Lease_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -558,17 +580,17 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "orders", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Orders_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "orders", "list"}, "")) - pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "orders", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Order_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "orders", "info"}, "")) - pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bids_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "list"}, "")) - pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Bid_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "bids", "info"}, "")) - pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "list"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Leases_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "list"}, "")) - pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "info"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Lease_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"akash", "market", "v1beta4", "leases", "info"}, "")) ) var ( diff --git a/go/node/provider/v1beta2/query.pb.gw.go b/go/node/provider/v1beta2/query.pb.gw.go index ded3e913..e2fec669 100644 --- a/go/node/provider/v1beta2/query.pb.gw.go +++ b/go/node/provider/v1beta2/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -86,7 +84,6 @@ func request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -113,7 +110,6 @@ func local_request_Query_Provider_0(ctx context.Context, marshaler runtime.Marsh } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -135,20 +131,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.provider.v1beta2.Query/Providers", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/providers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Providers_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Providers_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Providers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -158,20 +156,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.provider.v1beta2.Query/Provider", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/providers/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Provider_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Provider_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Provider_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -181,7 +181,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -220,19 +220,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.provider.v1beta2.Query/Providers", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/providers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Providers_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Providers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Providers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -240,19 +242,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.provider.v1beta2.Query/Provider", runtime.WithHTTPPathPattern("/akash/provider/v1beta2/providers/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Provider_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Provider_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Provider_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -260,9 +264,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta2", "providers"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta2", "providers"}, "")) - pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta2", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta2", "providers", "owner"}, "")) ) var ( diff --git a/go/node/provider/v1beta3/query.pb.gw.go b/go/node/provider/v1beta3/query.pb.gw.go index 443f15b6..c104156f 100644 --- a/go/node/provider/v1beta3/query.pb.gw.go +++ b/go/node/provider/v1beta3/query.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" ) // Suppress "imported and not used" errors @@ -30,7 +29,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join var ( @@ -86,7 +84,6 @@ func request_Query_Provider_0(ctx context.Context, marshaler runtime.Marshaler, } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -113,7 +110,6 @@ func local_request_Query_Provider_0(ctx context.Context, marshaler runtime.Marsh } protoReq.Owner, err = runtime.String(val) - if err != nil { return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "owner", err) } @@ -135,20 +131,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.provider.v1beta3.Query/Providers", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/providers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Providers_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Providers_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Providers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -158,20 +156,22 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.provider.v1beta3.Query/Provider", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/providers/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_Provider_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Query_Provider_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Provider_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -181,7 +181,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv // RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -220,19 +220,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.provider.v1beta3.Query/Providers", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/providers")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Providers_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Providers_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Providers_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Providers_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -240,19 +242,21 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.provider.v1beta3.Query/Provider", runtime.WithHTTPPathPattern("/akash/provider/v1beta3/providers/{owner}")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_Provider_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_Query_Provider_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_Query_Provider_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Provider_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -260,9 +264,9 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta3", "providers"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Providers_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"akash", "provider", "v1beta3", "providers"}, "")) - pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta3", "providers", "owner"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_Provider_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"akash", "provider", "v1beta3", "providers", "owner"}, "")) ) var ( diff --git a/go/provider/lease/v1/service.pb.go b/go/provider/lease/v1/service.pb.go index 9d5dbc28..d9c03362 100644 --- a/go/provider/lease/v1/service.pb.go +++ b/go/provider/lease/v1/service.pb.go @@ -441,6 +441,7 @@ var xxx_messageInfo_SendManifestResponse proto.InternalMessageInfo type ServiceLogsRequest struct { LeaseId v1beta4.LeaseID `protobuf:"bytes,1,opt,name=lease_id,json=leaseId,proto3" json:"LeaseID" yaml:"LeaseID"` Services []string `protobuf:"bytes,2,rep,name=services,proto3" json:"services" yaml:"services"` + Lines uint32 `protobuf:"varint,3,opt,name=lines,proto3" json:"lines" yaml:"lines"` } func (m *ServiceLogsRequest) Reset() { *m = ServiceLogsRequest{} } @@ -490,6 +491,13 @@ func (m *ServiceLogsRequest) GetServices() []string { return nil } +func (m *ServiceLogsRequest) GetLines() uint32 { + if m != nil { + return m.Lines + } + return 0 +} + // ServiceLogs type ServiceLogs struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name" yaml:"name"` @@ -751,71 +759,72 @@ func init() { } var fileDescriptor_3a2116fc700fbddb = []byte{ - // 1017 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x4d, 0x6f, 0x1b, 0x45, - 0x18, 0xce, 0xae, 0xed, 0xc4, 0x1e, 0xc7, 0x2d, 0x9d, 0x04, 0x62, 0x22, 0xe2, 0x31, 0x53, 0x5a, + // 1038 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0x41, 0x6f, 0x1b, 0x45, + 0x14, 0xce, 0xae, 0x9d, 0xc4, 0x9e, 0xc4, 0x2d, 0x9d, 0x04, 0x62, 0x22, 0xe2, 0x35, 0x53, 0x5a, 0xa5, 0x4a, 0xb2, 0xdb, 0x18, 0x24, 0x24, 0x7a, 0x40, 0x5a, 0x10, 0x55, 0xa5, 0x82, 0xd2, 0xcd, - 0x0d, 0x0e, 0xd6, 0x38, 0x3b, 0xac, 0x57, 0x59, 0x7b, 0x96, 0xd9, 0xb5, 0x4b, 0x6f, 0xfc, 0x04, - 0xfe, 0x00, 0x17, 0x8e, 0x95, 0x40, 0xdc, 0xf9, 0x03, 0x3d, 0xf6, 0xd8, 0xd3, 0x82, 0x92, 0x9b, - 0x0f, 0x1c, 0xfc, 0x0b, 0xd0, 0x7c, 0xec, 0xae, 0x1d, 0x93, 0x60, 0x40, 0x44, 0x3d, 0x75, 0xdf, - 0x67, 0x9e, 0xf7, 0xeb, 0x99, 0x79, 0x5f, 0x37, 0xe0, 0x0e, 0x39, 0x25, 0x71, 0xdf, 0x8e, 0x38, - 0x1b, 0x07, 0x1e, 0xe5, 0x76, 0x48, 0x49, 0x4c, 0xed, 0xf1, 0xa1, 0x1d, 0x53, 0x3e, 0x0e, 0x4e, - 0xa8, 0x15, 0x71, 0x96, 0x30, 0xb8, 0x25, 0x69, 0x56, 0x46, 0xb3, 0x24, 0xcd, 0x1a, 0x1f, 0x6e, - 0x63, 0xe5, 0x3f, 0x20, 0xc3, 0xe0, 0x6b, 0x1a, 0x27, 0xf6, 0xb8, 0xd3, 0xa3, 0x09, 0xe9, 0xd8, - 0x3e, 0x67, 0xa3, 0x48, 0x39, 0x6f, 0xb7, 0x33, 0x0e, 0x3f, 0xa5, 0x89, 0x3d, 0x3e, 0x14, 0x8c, - 0x0f, 0x54, 0x26, 0xcd, 0xd8, 0xf4, 0x99, 0xcf, 0xe4, 0xa7, 0x2d, 0xbe, 0x14, 0x8a, 0x9f, 0x9b, - 0x00, 0x3e, 0x16, 0xac, 0x63, 0x55, 0xcb, 0x71, 0x42, 0x92, 0x51, 0x0c, 0xdf, 0x01, 0x35, 0x32, - 0x26, 0x41, 0x48, 0x7a, 0x21, 0x6d, 0x1a, 0x6d, 0x63, 0xb7, 0xe2, 0x16, 0x00, 0xdc, 0x04, 0x95, - 0x84, 0x25, 0x24, 0x6c, 0x9a, 0xf2, 0x44, 0x19, 0x10, 0x82, 0xf2, 0x88, 0x07, 0x71, 0xb3, 0xd4, - 0x2e, 0xed, 0xd6, 0x5c, 0xf9, 0x0d, 0x6d, 0xb0, 0xc1, 0x7a, 0xa2, 0x4d, 0xea, 0x75, 0x7d, 0x3a, - 0xa4, 0x9c, 0x24, 0x01, 0x1b, 0x36, 0xcb, 0x6d, 0x63, 0xb7, 0xe4, 0xc2, 0xec, 0xe8, 0x61, 0x7e, - 0x02, 0xb7, 0x41, 0x95, 0xd3, 0x28, 0x0c, 0x4e, 0x48, 0xdc, 0xac, 0xc8, 0xe8, 0xb9, 0x0d, 0xef, - 0x81, 0x37, 0x46, 0x91, 0x47, 0x12, 0xea, 0x75, 0x73, 0xce, 0xaa, 0xe4, 0xdc, 0xd4, 0xb8, 0x9b, - 0x51, 0xef, 0x80, 0x1b, 0x9c, 0x12, 0xef, 0x59, 0x41, 0x5c, 0x93, 0xc4, 0x86, 0x44, 0x73, 0xda, - 0x01, 0x80, 0x79, 0x57, 0x05, 0xb5, 0x2a, 0xa9, 0xb7, 0xf2, 0x93, 0x8c, 0x8e, 0xff, 0x30, 0x40, - 0x43, 0x8a, 0xf5, 0xe8, 0x48, 0xeb, 0xb4, 0x07, 0xca, 0x11, 0xe3, 0x89, 0x94, 0xa8, 0xe1, 0x6c, - 0x4d, 0x52, 0x24, 0xed, 0x69, 0x8a, 0xea, 0xcf, 0xc8, 0x20, 0xfc, 0x08, 0x0b, 0x0b, 0xbb, 0x12, - 0x84, 0x5f, 0x80, 0x06, 0xfd, 0x36, 0xa1, 0x7c, 0x48, 0xc2, 0xae, 0xf4, 0x32, 0xa5, 0xd7, 0xbd, - 0x49, 0x8a, 0xe6, 0x0f, 0xa6, 0x29, 0xda, 0x54, 0xee, 0x73, 0x30, 0x76, 0xd7, 0x33, 0xfb, 0x48, - 0xc4, 0x7b, 0x00, 0xaa, 0xf2, 0x12, 0x4f, 0x58, 0xd8, 0x2c, 0xb5, 0x8d, 0xdd, 0x9a, 0x83, 0x26, - 0x29, 0xca, 0xb1, 0x69, 0x8a, 0x6e, 0xea, 0x22, 0x34, 0x82, 0xdd, 0xfc, 0x10, 0xde, 0x06, 0x66, - 0x10, 0xc9, 0x8b, 0xa8, 0x39, 0x1b, 0x93, 0x14, 0x99, 0x41, 0x34, 0x4d, 0x51, 0x4d, 0x39, 0x04, - 0x11, 0x76, 0xcd, 0x20, 0xc2, 0x3f, 0x98, 0x60, 0xe3, 0x33, 0xc6, 0x9f, 0x12, 0xee, 0x51, 0x2e, - 0x72, 0x16, 0x6d, 0xf7, 0x59, 0xac, 0xda, 0xae, 0xa9, 0xb6, 0x85, 0x5d, 0xb4, 0x2d, 0x2c, 0xec, - 0x4a, 0x30, 0xd7, 0xc8, 0xfc, 0x57, 0x1a, 0x95, 0xfe, 0x9b, 0x46, 0x36, 0xa8, 0xc8, 0x96, 0x75, - 0xa7, 0x6f, 0x4f, 0x52, 0xa4, 0x80, 0x69, 0x8a, 0xd6, 0x67, 0xd4, 0xc1, 0xae, 0x82, 0x45, 0xb5, - 0x43, 0x32, 0xa0, 0xf2, 0xf1, 0xe9, 0xd6, 0x84, 0x5d, 0x54, 0x2b, 0x2c, 0xec, 0x4a, 0x10, 0xbf, - 0x32, 0x41, 0x63, 0x7e, 0x70, 0x32, 0x77, 0x63, 0x09, 0x77, 0xe8, 0x81, 0xd5, 0x58, 0xba, 0x49, - 0x6d, 0xea, 0x9d, 0x3d, 0xeb, 0x92, 0x15, 0x60, 0x2d, 0x8e, 0xa8, 0x83, 0x5e, 0xa4, 0x68, 0x65, - 0x92, 0x22, 0x1d, 0x62, 0x9a, 0xa2, 0x86, 0xca, 0xa0, 0x6c, 0xec, 0xea, 0x03, 0x48, 0x40, 0x45, - 0x28, 0xa3, 0x06, 0xb3, 0xde, 0xd9, 0xbf, 0x34, 0xc9, 0x5f, 0xdc, 0xb4, 0xb3, 0xa3, 0xb3, 0xa8, - 0x10, 0x33, 0xa2, 0x09, 0x53, 0x88, 0x26, 0xfe, 0x85, 0x4f, 0x40, 0x29, 0x88, 0xe2, 0x66, 0x59, - 0x26, 0xb8, 0x7b, 0x75, 0x17, 0xd9, 0xec, 0x38, 0x5b, 0x3a, 0xf4, 0xc2, 0xcb, 0x13, 0xb1, 0xf0, - 0x8f, 0x26, 0xd8, 0x38, 0xa6, 0x43, 0xef, 0x73, 0xbd, 0xf5, 0x5c, 0xfa, 0xcd, 0x88, 0xc6, 0x09, - 0xfc, 0x0a, 0x54, 0x65, 0xbc, 0x6e, 0xe0, 0x49, 0x91, 0xeb, 0x9d, 0x1d, 0x9d, 0x4f, 0xed, 0x3e, - 0x4b, 0xef, 0x3e, 0x9d, 0xec, 0x53, 0xe7, 0x5d, 0x9d, 0x66, 0x4d, 0x03, 0xd3, 0x14, 0xdd, 0x50, - 0xb9, 0x34, 0x80, 0xdd, 0x35, 0x19, 0xf1, 0x91, 0x07, 0x7f, 0x32, 0x40, 0x35, 0x5b, 0xb3, 0x4d, - 0x53, 0x76, 0x53, 0x44, 0x57, 0xb0, 0xa5, 0xb7, 0xaf, 0xf5, 0x50, 0x6c, 0x5f, 0x87, 0x8b, 0xe8, - 0x67, 0x29, 0xaa, 0x66, 0x75, 0x8a, 0x09, 0xcc, 0xb8, 0xc5, 0x04, 0x66, 0x08, 0x7e, 0xfe, 0x1b, - 0xfa, 0xd8, 0x0f, 0x92, 0xfe, 0xa8, 0x67, 0x9d, 0xb0, 0x81, 0x2d, 0x63, 0x1f, 0x0c, 0x69, 0xf2, - 0x94, 0xf1, 0x53, 0x6d, 0x91, 0x28, 0xb0, 0x7d, 0xb6, 0xb0, 0xee, 0xad, 0x5c, 0x89, 0x3c, 0x3e, - 0x7e, 0x0b, 0x6c, 0xce, 0x6b, 0x14, 0x47, 0x6c, 0x18, 0x53, 0xfc, 0xb3, 0x01, 0xa0, 0x7e, 0x2d, - 0x8f, 0x99, 0x1f, 0x5f, 0x8b, 0x76, 0x0f, 0x40, 0x55, 0xff, 0x9e, 0xc5, 0x52, 0x3a, 0xbd, 0x8d, - 0x32, 0xac, 0xd0, 0x22, 0x43, 0xb0, 0x9b, 0x1f, 0x62, 0x1f, 0xd4, 0x67, 0xea, 0xfd, 0x67, 0x53, - 0xb4, 0x07, 0xca, 0x21, 0xf3, 0xd5, 0x0c, 0xad, 0x2b, 0xb2, 0xb0, 0x0b, 0xb2, 0xb0, 0xb0, 0x2b, - 0x41, 0x3c, 0x16, 0xaf, 0x6a, 0x46, 0x18, 0x25, 0x18, 0xec, 0xce, 0x14, 0x6f, 0xc8, 0x7b, 0x7f, - 0xef, 0xd2, 0x57, 0x3c, 0xe3, 0xef, 0xec, 0x5c, 0x2d, 0x4e, 0xd1, 0xe0, 0x29, 0x58, 0x3f, 0xee, - 0xd3, 0x30, 0xbc, 0x8e, 0xab, 0xc0, 0xbf, 0x18, 0xe2, 0x5d, 0xcc, 0x2c, 0x8b, 0xd7, 0xff, 0x01, - 0x7c, 0x67, 0x80, 0x37, 0x2f, 0x94, 0xac, 0xaf, 0xc6, 0x5f, 0xb8, 0x9a, 0xbb, 0x7f, 0x77, 0x35, - 0x7a, 0xc1, 0xdc, 0xd6, 0xc5, 0x2f, 0x57, 0x42, 0xe7, 0xd7, 0x32, 0xa8, 0xca, 0xae, 0xdc, 0xa3, - 0x4f, 0xa0, 0xb8, 0xaf, 0x99, 0xc9, 0x82, 0xfb, 0x57, 0xe4, 0x5c, 0x58, 0x52, 0xdb, 0x07, 0x4b, - 0xb2, 0x75, 0x8b, 0xc3, 0x8b, 0xbf, 0x22, 0x07, 0xcb, 0x75, 0x98, 0xa5, 0xb3, 0x96, 0xa5, 0xeb, - 0x7c, 0x62, 0x08, 0x12, 0x4e, 0xc9, 0xe0, 0x3a, 0xb3, 0xde, 0x37, 0x60, 0xff, 0xc2, 0x94, 0x2f, - 0x33, 0x62, 0x59, 0xb6, 0xfd, 0xe5, 0xc8, 0xba, 0xc3, 0x08, 0xdc, 0x9a, 0xeb, 0xf0, 0x7f, 0xce, - 0x77, 0xdf, 0x70, 0x9e, 0xbc, 0x38, 0x6b, 0x19, 0x2f, 0xcf, 0x5a, 0xc6, 0xef, 0x67, 0x2d, 0xe3, - 0xfb, 0xf3, 0xd6, 0xca, 0xcb, 0xf3, 0xd6, 0xca, 0xab, 0xf3, 0xd6, 0xca, 0x97, 0x1f, 0x2e, 0xb7, - 0xef, 0x17, 0xfe, 0x3c, 0xe8, 0xad, 0xca, 0xff, 0x91, 0xbc, 0xff, 0x67, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x3d, 0x85, 0x37, 0x23, 0x40, 0x0c, 0x00, 0x00, + 0x0d, 0x0e, 0xd6, 0x38, 0x3b, 0xac, 0x57, 0x59, 0xef, 0x2c, 0xbb, 0x6b, 0x97, 0xde, 0xf8, 0x09, + 0xfc, 0x01, 0x2e, 0x1c, 0x2b, 0x21, 0x71, 0xe7, 0x0f, 0xf4, 0xd8, 0x63, 0x4f, 0x5b, 0x94, 0xdc, + 0x7c, 0xe0, 0xe0, 0x5f, 0x80, 0xe6, 0xcd, 0xec, 0xae, 0x1d, 0x93, 0x60, 0x40, 0x44, 0x3d, 0xd5, + 0xef, 0x9b, 0xef, 0xbd, 0x37, 0xef, 0x9b, 0xf7, 0xde, 0x36, 0xe8, 0x0e, 0x3d, 0xa5, 0x49, 0xdf, + 0x8a, 0x62, 0x3e, 0xf2, 0x5d, 0x16, 0x5b, 0x01, 0xa3, 0x09, 0xb3, 0x46, 0x87, 0x56, 0xc2, 0xe2, + 0x91, 0x7f, 0xc2, 0xcc, 0x28, 0xe6, 0x29, 0xc7, 0x5b, 0x40, 0x33, 0x73, 0x9a, 0x09, 0x34, 0x73, + 0x74, 0xb8, 0x4d, 0xa4, 0xff, 0x80, 0x86, 0xfe, 0xb7, 0x2c, 0x49, 0xad, 0x51, 0xa7, 0xc7, 0x52, + 0xda, 0xb1, 0xbc, 0x98, 0x0f, 0x23, 0xe9, 0xbc, 0xdd, 0xce, 0x39, 0xf1, 0x29, 0x4b, 0xad, 0xd1, + 0xa1, 0x60, 0x7c, 0x24, 0x33, 0x29, 0xc6, 0xa6, 0xc7, 0x3d, 0x0e, 0x3f, 0x2d, 0xf1, 0x4b, 0xa2, + 0xe4, 0xb9, 0x8e, 0xf0, 0x63, 0xc1, 0x3a, 0x96, 0x77, 0x39, 0x4e, 0x69, 0x3a, 0x4c, 0xf0, 0x7b, + 0xa8, 0x4e, 0x47, 0xd4, 0x0f, 0x68, 0x2f, 0x60, 0x4d, 0xad, 0xad, 0xed, 0x2e, 0x3b, 0x25, 0x80, + 0x37, 0xd1, 0x72, 0xca, 0x53, 0x1a, 0x34, 0x75, 0x38, 0x91, 0x06, 0xc6, 0xa8, 0x3a, 0x8c, 0xfd, + 0xa4, 0x59, 0x69, 0x57, 0x76, 0xeb, 0x0e, 0xfc, 0xc6, 0x16, 0xda, 0xe0, 0x3d, 0x51, 0x26, 0x73, + 0xbb, 0x1e, 0x0b, 0x59, 0x4c, 0x53, 0x9f, 0x87, 0xcd, 0x6a, 0x5b, 0xdb, 0xad, 0x38, 0x38, 0x3f, + 0x7a, 0x58, 0x9c, 0xe0, 0x6d, 0x54, 0x8b, 0x59, 0x14, 0xf8, 0x27, 0x34, 0x69, 0x2e, 0x43, 0xf4, + 0xc2, 0xc6, 0xf7, 0xd0, 0x5b, 0xc3, 0xc8, 0xa5, 0x29, 0x73, 0xbb, 0x05, 0x67, 0x05, 0x38, 0x37, + 0x15, 0xee, 0xe4, 0xd4, 0x3b, 0xe8, 0x46, 0xcc, 0xa8, 0xfb, 0xac, 0x24, 0xae, 0x02, 0xb1, 0x01, + 0x68, 0x41, 0x3b, 0x40, 0xb8, 0xa8, 0xaa, 0xa4, 0xd6, 0x80, 0x7a, 0xab, 0x38, 0xc9, 0xe9, 0xe4, + 0x0f, 0x0d, 0x35, 0x40, 0xac, 0x47, 0x47, 0x4a, 0xa7, 0x3d, 0x54, 0x8d, 0x78, 0x9c, 0x82, 0x44, + 0x0d, 0x7b, 0x6b, 0x9c, 0x19, 0x60, 0x4f, 0x32, 0x63, 0xed, 0x19, 0x1d, 0x04, 0x9f, 0x10, 0x61, + 0x11, 0x07, 0x40, 0xfc, 0x15, 0x6a, 0xb0, 0xef, 0x53, 0x16, 0x87, 0x34, 0xe8, 0x82, 0x97, 0x0e, + 0x5e, 0xf7, 0xc6, 0x99, 0x31, 0x7b, 0x30, 0xc9, 0x8c, 0x4d, 0xe9, 0x3e, 0x03, 0x13, 0x67, 0x3d, + 0xb7, 0x8f, 0x44, 0xbc, 0x07, 0xa8, 0x06, 0x8f, 0x78, 0xc2, 0x83, 0x66, 0xa5, 0xad, 0xed, 0xd6, + 0x6d, 0x63, 0x9c, 0x19, 0x05, 0x36, 0xc9, 0x8c, 0x9b, 0xea, 0x12, 0x0a, 0x21, 0x4e, 0x71, 0x88, + 0x6f, 0x23, 0xdd, 0x8f, 0xe0, 0x21, 0xea, 0xf6, 0xc6, 0x38, 0x33, 0x74, 0x3f, 0x9a, 0x64, 0x46, + 0x5d, 0x3a, 0xf8, 0x11, 0x71, 0x74, 0x3f, 0x22, 0x3f, 0xe9, 0x68, 0xe3, 0x0b, 0x1e, 0x3f, 0xa5, + 0xb1, 0xcb, 0x62, 0x91, 0xb3, 0x2c, 0xbb, 0xcf, 0x13, 0x59, 0x76, 0x5d, 0x96, 0x2d, 0xec, 0xb2, + 0x6c, 0x61, 0x11, 0x07, 0xc0, 0x42, 0x23, 0xfd, 0x5f, 0x69, 0x54, 0xf9, 0x6f, 0x1a, 0x59, 0x68, + 0x19, 0x4a, 0x56, 0x95, 0xbe, 0x3b, 0xce, 0x0c, 0x09, 0x4c, 0x32, 0x63, 0x7d, 0x4a, 0x1d, 0xe2, + 0x48, 0x58, 0xdc, 0x36, 0xa4, 0x03, 0x06, 0xcd, 0xa7, 0x4a, 0x13, 0x76, 0x79, 0x5b, 0x61, 0x11, + 0x07, 0x40, 0xf2, 0x4a, 0x47, 0x8d, 0xd9, 0xc1, 0xc9, 0xdd, 0xb5, 0x05, 0xdc, 0xb1, 0x8b, 0x56, + 0x12, 0x70, 0x03, 0x6d, 0xd6, 0x3a, 0x7b, 0xe6, 0x25, 0x2b, 0xc0, 0x9c, 0x1f, 0x51, 0xdb, 0x78, + 0x91, 0x19, 0x4b, 0xe3, 0xcc, 0x50, 0x21, 0x26, 0x99, 0xd1, 0x90, 0x19, 0xa4, 0x4d, 0x1c, 0x75, + 0x80, 0x29, 0x5a, 0x16, 0xca, 0xc8, 0xc1, 0x5c, 0xeb, 0xec, 0x5f, 0x9a, 0xe4, 0x2f, 0x5e, 0xda, + 0xde, 0x51, 0x59, 0x64, 0x88, 0x29, 0xd1, 0x84, 0x29, 0x44, 0x13, 0xff, 0xe2, 0x27, 0xa8, 0xe2, + 0x47, 0x49, 0xb3, 0x0a, 0x09, 0xee, 0x5e, 0x5d, 0x45, 0x3e, 0x3b, 0xf6, 0x96, 0x0a, 0x3d, 0xd7, + 0x79, 0x22, 0x16, 0xf9, 0x59, 0x47, 0x1b, 0xc7, 0x2c, 0x74, 0xbf, 0x54, 0x5b, 0xcf, 0x61, 0xdf, + 0x0d, 0x59, 0x92, 0xe2, 0x6f, 0x50, 0x0d, 0xe2, 0x75, 0x7d, 0x17, 0x44, 0x5e, 0xeb, 0xec, 0xa8, + 0x7c, 0x72, 0xf7, 0x99, 0x6a, 0xf7, 0xa9, 0x64, 0x9f, 0xdb, 0xef, 0xab, 0x34, 0xab, 0x0a, 0x98, + 0x64, 0xc6, 0x0d, 0x99, 0x4b, 0x01, 0xc4, 0x59, 0x85, 0x88, 0x8f, 0x5c, 0xfc, 0x8b, 0x86, 0x6a, + 0xf9, 0x9a, 0x6d, 0xea, 0x50, 0x4d, 0x19, 0x5d, 0xc2, 0xa6, 0xda, 0xbe, 0xe6, 0x43, 0xb1, 0x7d, + 0xed, 0x58, 0x44, 0x3f, 0xcb, 0x8c, 0x5a, 0x7e, 0x4f, 0x31, 0x81, 0x39, 0xb7, 0x9c, 0xc0, 0x1c, + 0x21, 0xcf, 0x5f, 0x1b, 0x9f, 0x7a, 0x7e, 0xda, 0x1f, 0xf6, 0xcc, 0x13, 0x3e, 0xb0, 0x20, 0xf6, + 0x41, 0xc8, 0xd2, 0xa7, 0x3c, 0x3e, 0x55, 0x16, 0x8d, 0x7c, 0xcb, 0xe3, 0x73, 0xeb, 0xde, 0x2c, + 0x94, 0x28, 0xe2, 0x93, 0x77, 0xd0, 0xe6, 0xac, 0x46, 0x49, 0xc4, 0xc3, 0x84, 0x91, 0xd7, 0x1a, + 0xc2, 0xaa, 0x5b, 0x1e, 0x73, 0x2f, 0xb9, 0x16, 0xed, 0x1e, 0xa0, 0x9a, 0xfa, 0x9e, 0x25, 0x20, + 0x9d, 0xda, 0x46, 0x39, 0x56, 0x6a, 0x91, 0x23, 0xc4, 0x29, 0x0e, 0xc5, 0x98, 0x06, 0x7e, 0xc8, + 0x12, 0x35, 0xee, 0x30, 0xa6, 0x00, 0x94, 0x1d, 0x07, 0x26, 0x71, 0x24, 0x4c, 0x3c, 0xb4, 0x36, + 0x55, 0xe0, 0x3f, 0x1b, 0xbb, 0x3d, 0x54, 0x0d, 0xb8, 0x27, 0x87, 0x6e, 0x5d, 0x92, 0x85, 0x5d, + 0x92, 0x85, 0x45, 0x1c, 0x00, 0xc9, 0x48, 0xb4, 0xe1, 0x94, 0x92, 0x52, 0x61, 0xdc, 0x9d, 0xaa, + 0x56, 0x83, 0x46, 0xf9, 0xe0, 0xd2, 0xb6, 0x9f, 0xf2, 0xb7, 0x77, 0xae, 0x56, 0xb3, 0x08, 0x4a, + 0x4e, 0xd1, 0xfa, 0x71, 0x9f, 0x05, 0xc1, 0x75, 0xbc, 0x1d, 0xf9, 0x55, 0x13, 0x8d, 0x34, 0xb5, + 0x5d, 0xde, 0xf8, 0x8e, 0x21, 0x3f, 0x68, 0xe8, 0xed, 0x0b, 0x57, 0x56, 0x4f, 0xe3, 0xcd, 0x3d, + 0xcd, 0xdd, 0xbf, 0x7b, 0x1a, 0xb5, 0x91, 0x6e, 0xab, 0xcb, 0x2f, 0x76, 0x85, 0xce, 0x6f, 0x55, + 0x54, 0x83, 0xaa, 0x9c, 0xa3, 0xcf, 0xb0, 0x78, 0xaf, 0xa9, 0x51, 0xc4, 0xfb, 0x57, 0xe4, 0x9c, + 0xdb, 0x6a, 0xdb, 0x07, 0x0b, 0xb2, 0x55, 0x89, 0xe1, 0xc5, 0xcf, 0xce, 0xc1, 0x62, 0x15, 0xe6, + 0xe9, 0xcc, 0x45, 0xe9, 0x2a, 0x9f, 0x18, 0x82, 0x34, 0x66, 0x74, 0x70, 0x9d, 0x59, 0xef, 0x6b, + 0xb8, 0x7f, 0x61, 0xca, 0x17, 0x19, 0xb1, 0x3c, 0xdb, 0xfe, 0x62, 0x64, 0x55, 0x61, 0x84, 0x6e, + 0xcd, 0x54, 0xf8, 0x3f, 0xe7, 0xbb, 0xaf, 0xd9, 0x4f, 0x5e, 0x9c, 0xb5, 0xb4, 0x97, 0x67, 0x2d, + 0xed, 0xf7, 0xb3, 0x96, 0xf6, 0xe3, 0x79, 0x6b, 0xe9, 0xe5, 0x79, 0x6b, 0xe9, 0xd5, 0x79, 0x6b, + 0xe9, 0xeb, 0x8f, 0x17, 0xfb, 0x40, 0xcc, 0xfd, 0x3d, 0xd1, 0x5b, 0x81, 0xff, 0xc2, 0x7c, 0xf8, + 0x67, 0x00, 0x00, 0x00, 0xff, 0xff, 0x92, 0x56, 0xbf, 0x58, 0x71, 0x0c, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1449,6 +1458,11 @@ func (m *ServiceLogsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Lines != 0 { + i = encodeVarintService(dAtA, i, uint64(m.Lines)) + i-- + dAtA[i] = 0x18 + } if len(m.Services) > 0 { for iNdEx := len(m.Services) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Services[iNdEx]) @@ -1821,6 +1835,9 @@ func (m *ServiceLogsRequest) Size() (n int) { n += 1 + l + sovService(uint64(l)) } } + if m.Lines != 0 { + n += 1 + sovService(uint64(m.Lines)) + } return n } @@ -2900,6 +2917,25 @@ func (m *ServiceLogsRequest) Unmarshal(dAtA []byte) error { } m.Services = append(m.Services, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Lines", wireType) + } + m.Lines = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Lines |= uint32(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipService(dAtA[iNdEx:]) diff --git a/go/provider/v1/service.pb.gw.go b/go/provider/v1/service.pb.gw.go index 3a891120..f6b16a75 100644 --- a/go/provider/v1/service.pb.gw.go +++ b/go/provider/v1/service.pb.gw.go @@ -13,15 +13,14 @@ import ( "io" "net/http" - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" + "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "github.com/grpc-ecosystem/grpc-gateway/v2/utilities" "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" + "google.golang.org/protobuf/proto" "google.golang.org/protobuf/types/known/emptypb" ) @@ -31,7 +30,6 @@ var _ io.Reader var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage var _ = metadata.Join func request_ProviderRPC_GetStatus_0(ctx context.Context, marshaler runtime.Marshaler, client ProviderRPCClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { @@ -64,20 +62,22 @@ func RegisterProviderRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/akash.provider.v1.ProviderRPC/GetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_ProviderRPC_GetStatus_0(rctx, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_ProviderRPC_GetStatus_0(annotatedContext, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ProviderRPC_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProviderRPC_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -87,7 +87,7 @@ func RegisterProviderRPCHandlerServer(ctx context.Context, mux *runtime.ServeMux // RegisterProviderRPCHandlerFromEndpoint is same as RegisterProviderRPCHandler but // automatically dials to "endpoint" and closes the connection when "ctx" gets done. func RegisterProviderRPCHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) + conn, err := grpc.DialContext(ctx, endpoint, opts...) if err != nil { return err } @@ -126,19 +126,21 @@ func RegisterProviderRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) + var err error + var annotatedContext context.Context + annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/akash.provider.v1.ProviderRPC/GetStatus", runtime.WithHTTPPathPattern("/v1/status")) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_ProviderRPC_GetStatus_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) + resp, md, err := request_ProviderRPC_GetStatus_0(annotatedContext, inboundMarshaler, client, req, pathParams) + annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) return } - forward_ProviderRPC_GetStatus_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_ProviderRPC_GetStatus_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -146,7 +148,7 @@ func RegisterProviderRPCHandlerClient(ctx context.Context, mux *runtime.ServeMux } var ( - pattern_ProviderRPC_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_ProviderRPC_GetStatus_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"v1", "status"}, "")) ) var ( diff --git a/ts/src/generated/akash/audit/v1beta1/audit.ts b/ts/src/generated/akash/audit/v1beta1/audit.ts index 1a0aa252..24a82404 100644 --- a/ts/src/generated/akash/audit/v1beta1/audit.ts +++ b/ts/src/generated/akash/audit/v1beta1/audit.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta1/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta1/attribute"; /** Provider stores owner auditor and attributes details */ export interface Provider { - $type: 'akash.audit.v1beta1.Provider'; + $type: "akash.audit.v1beta1.Provider"; owner: string; auditor: string; attributes: Attribute[]; @@ -14,7 +14,7 @@ export interface Provider { /** Attributes */ export interface AuditedAttributes { - $type: 'akash.audit.v1beta1.AuditedAttributes'; + $type: "akash.audit.v1beta1.AuditedAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -22,20 +22,20 @@ export interface AuditedAttributes { /** AttributesResponse represents details of deployment along with group details */ export interface AttributesResponse { - $type: 'akash.audit.v1beta1.AttributesResponse'; + $type: "akash.audit.v1beta1.AttributesResponse"; attributes: AuditedAttributes[]; } /** AttributesFilters defines filters used to filter deployments */ export interface AttributesFilters { - $type: 'akash.audit.v1beta1.AttributesFilters'; + $type: "akash.audit.v1beta1.AttributesFilters"; auditors: string[]; owners: string[]; } /** MsgSignProviderAttributes defines an SDK message for signing a provider attributes */ export interface MsgSignProviderAttributes { - $type: 'akash.audit.v1beta1.MsgSignProviderAttributes'; + $type: "akash.audit.v1beta1.MsgSignProviderAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -43,12 +43,12 @@ export interface MsgSignProviderAttributes { /** MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. */ export interface MsgSignProviderAttributesResponse { - $type: 'akash.audit.v1beta1.MsgSignProviderAttributesResponse'; + $type: "akash.audit.v1beta1.MsgSignProviderAttributesResponse"; } /** MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes */ export interface MsgDeleteProviderAttributes { - $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributes'; + $type: "akash.audit.v1beta1.MsgDeleteProviderAttributes"; owner: string; auditor: string; keys: string[]; @@ -56,29 +56,21 @@ export interface MsgDeleteProviderAttributes { /** MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. */ export interface MsgDeleteProviderAttributesResponse { - $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributesResponse'; + $type: "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse"; } function createBaseProvider(): Provider { - return { - $type: 'akash.audit.v1beta1.Provider', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta1.Provider", owner: "", auditor: "", attributes: [] }; } export const Provider = { - $type: 'akash.audit.v1beta1.Provider' as const, + $type: "akash.audit.v1beta1.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -88,8 +80,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -128,8 +119,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -138,10 +129,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -155,10 +146,9 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -166,25 +156,17 @@ export const Provider = { messageTypeRegistry.set(Provider.$type, Provider); function createBaseAuditedAttributes(): AuditedAttributes { - return { - $type: 'akash.audit.v1beta1.AuditedAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta1.AuditedAttributes", owner: "", auditor: "", attributes: [] }; } export const AuditedAttributes = { - $type: 'akash.audit.v1beta1.AuditedAttributes' as const, + $type: "akash.audit.v1beta1.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -194,8 +176,7 @@ export const AuditedAttributes = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AuditedAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAuditedAttributes(); while (reader.pos < end) { @@ -234,8 +215,8 @@ export const AuditedAttributes = { fromJSON(object: any): AuditedAttributes { return { $type: AuditedAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -244,10 +225,10 @@ export const AuditedAttributes = { toJSON(message: AuditedAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -261,10 +242,9 @@ export const AuditedAttributes = { }, fromPartial(object: DeepPartial): AuditedAttributes { const message = createBaseAuditedAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -272,16 +252,13 @@ export const AuditedAttributes = { messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); function createBaseAttributesResponse(): AttributesResponse { - return { $type: 'akash.audit.v1beta1.AttributesResponse', attributes: [] }; + return { $type: "akash.audit.v1beta1.AttributesResponse", attributes: [] }; } export const AttributesResponse = { - $type: 'akash.audit.v1beta1.AttributesResponse' as const, + $type: "akash.audit.v1beta1.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -289,8 +266,7 @@ export const AttributesResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesResponse(); while (reader.pos < end) { @@ -301,9 +277,7 @@ export const AttributesResponse = { break; } - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()), - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -326,9 +300,7 @@ export const AttributesResponse = { toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes?.length) { - obj.attributes = message.attributes.map((e) => - AuditedAttributes.toJSON(e), - ); + obj.attributes = message.attributes.map((e) => AuditedAttributes.toJSON(e)); } return obj; }, @@ -338,8 +310,7 @@ export const AttributesResponse = { }, fromPartial(object: DeepPartial): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; return message; }, }; @@ -347,20 +318,13 @@ export const AttributesResponse = { messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); function createBaseAttributesFilters(): AttributesFilters { - return { - $type: 'akash.audit.v1beta1.AttributesFilters', - auditors: [], - owners: [], - }; + return { $type: "akash.audit.v1beta1.AttributesFilters", auditors: [], owners: [] }; } export const AttributesFilters = { - $type: 'akash.audit.v1beta1.AttributesFilters' as const, + $type: "akash.audit.v1beta1.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -371,8 +335,7 @@ export const AttributesFilters = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesFilters(); while (reader.pos < end) { @@ -404,12 +367,8 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: globalThis.Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => globalThis.String(e)) - : [], - owners: globalThis.Array.isArray(object?.owners) - ? object.owners.map((e: any) => globalThis.String(e)) - : [], + auditors: globalThis.Array.isArray(object?.auditors) ? object.auditors.map((e: any) => globalThis.String(e)) : [], + owners: globalThis.Array.isArray(object?.owners) ? object.owners.map((e: any) => globalThis.String(e)) : [], }; }, @@ -438,25 +397,17 @@ export const AttributesFilters = { messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { - return { - $type: 'akash.audit.v1beta1.MsgSignProviderAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta1.MsgSignProviderAttributes", owner: "", auditor: "", attributes: [] }; } export const MsgSignProviderAttributes = { - $type: 'akash.audit.v1beta1.MsgSignProviderAttributes' as const, + $type: "akash.audit.v1beta1.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -465,12 +416,8 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); while (reader.pos < end) { @@ -509,8 +456,8 @@ export const MsgSignProviderAttributes = { fromJSON(object: any): MsgSignProviderAttributes { return { $type: MsgSignProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -519,10 +466,10 @@ export const MsgSignProviderAttributes = { toJSON(message: MsgSignProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -531,48 +478,33 @@ export const MsgSignProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributes { + create(base?: DeepPartial): MsgSignProviderAttributes { return MsgSignProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgSignProviderAttributes { + fromPartial(object: DeepPartial): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes, -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { - return { $type: 'akash.audit.v1beta1.MsgSignProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta1.MsgSignProviderAttributesResponse" }; } export const MsgSignProviderAttributesResponse = { - $type: 'akash.audit.v1beta1.MsgSignProviderAttributesResponse' as const, + $type: "akash.audit.v1beta1.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); while (reader.pos < end) { @@ -596,44 +528,29 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributesResponse { + create(base?: DeepPartial): MsgSignProviderAttributesResponse { return MsgSignProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgSignProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse, -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { - return { - $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributes', - owner: '', - auditor: '', - keys: [], - }; + return { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributes", owner: "", auditor: "", keys: [] }; } export const MsgDeleteProviderAttributes = { - $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributes' as const, + $type: "akash.audit.v1beta1.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.keys) { @@ -642,12 +559,8 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); while (reader.pos < end) { @@ -686,20 +599,18 @@ export const MsgDeleteProviderAttributes = { fromJSON(object: any): MsgDeleteProviderAttributes { return { $type: MsgDeleteProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - keys: globalThis.Array.isArray(object?.keys) - ? object.keys.map((e: any) => globalThis.String(e)) - : [], + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: MsgDeleteProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.keys?.length) { @@ -708,47 +619,33 @@ export const MsgDeleteProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributes { + create(base?: DeepPartial): MsgDeleteProviderAttributes { return MsgDeleteProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgDeleteProviderAttributes { + fromPartial(object: DeepPartial): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; message.keys = object.keys?.map((e) => e) || []; return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes, -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { - return { $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse" }; } export const MsgDeleteProviderAttributesResponse = { - $type: 'akash.audit.v1beta1.MsgDeleteProviderAttributesResponse' as const, + $type: "akash.audit.v1beta1.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); while (reader.pos < end) { @@ -772,37 +669,26 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + create(base?: DeepPartial): MsgDeleteProviderAttributesResponse { return MsgDeleteProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse, -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } -export const MsgServiceName = 'akash.audit.v1beta1.Msg'; +export const MsgServiceName = "akash.audit.v1beta1.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -812,63 +698,30 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'SignProviderAttributes', - data, - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "SignProviderAttributes", data); + return promise.then((data) => MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'DeleteProviderAttributes', - data, - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProviderAttributes", data); + return promise.then((data) => MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta2/audit.ts b/ts/src/generated/akash/audit/v1beta2/audit.ts index 352d5bf6..3208b5cd 100644 --- a/ts/src/generated/akash/audit/v1beta2/audit.ts +++ b/ts/src/generated/akash/audit/v1beta2/audit.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta2/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta2/attribute"; /** Provider stores owner auditor and attributes details */ export interface Provider { - $type: 'akash.audit.v1beta2.Provider'; + $type: "akash.audit.v1beta2.Provider"; owner: string; auditor: string; attributes: Attribute[]; @@ -14,7 +14,7 @@ export interface Provider { /** Attributes */ export interface AuditedAttributes { - $type: 'akash.audit.v1beta2.AuditedAttributes'; + $type: "akash.audit.v1beta2.AuditedAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -22,20 +22,20 @@ export interface AuditedAttributes { /** AttributesResponse represents details of deployment along with group details */ export interface AttributesResponse { - $type: 'akash.audit.v1beta2.AttributesResponse'; + $type: "akash.audit.v1beta2.AttributesResponse"; attributes: AuditedAttributes[]; } /** AttributesFilters defines filters used to filter deployments */ export interface AttributesFilters { - $type: 'akash.audit.v1beta2.AttributesFilters'; + $type: "akash.audit.v1beta2.AttributesFilters"; auditors: string[]; owners: string[]; } /** MsgSignProviderAttributes defines an SDK message for signing a provider attributes */ export interface MsgSignProviderAttributes { - $type: 'akash.audit.v1beta2.MsgSignProviderAttributes'; + $type: "akash.audit.v1beta2.MsgSignProviderAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -43,12 +43,12 @@ export interface MsgSignProviderAttributes { /** MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. */ export interface MsgSignProviderAttributesResponse { - $type: 'akash.audit.v1beta2.MsgSignProviderAttributesResponse'; + $type: "akash.audit.v1beta2.MsgSignProviderAttributesResponse"; } /** MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes */ export interface MsgDeleteProviderAttributes { - $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributes'; + $type: "akash.audit.v1beta2.MsgDeleteProviderAttributes"; owner: string; auditor: string; keys: string[]; @@ -56,29 +56,21 @@ export interface MsgDeleteProviderAttributes { /** MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. */ export interface MsgDeleteProviderAttributesResponse { - $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributesResponse'; + $type: "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse"; } function createBaseProvider(): Provider { - return { - $type: 'akash.audit.v1beta2.Provider', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta2.Provider", owner: "", auditor: "", attributes: [] }; } export const Provider = { - $type: 'akash.audit.v1beta2.Provider' as const, + $type: "akash.audit.v1beta2.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -88,8 +80,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -128,8 +119,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -138,10 +129,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -155,10 +146,9 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -166,25 +156,17 @@ export const Provider = { messageTypeRegistry.set(Provider.$type, Provider); function createBaseAuditedAttributes(): AuditedAttributes { - return { - $type: 'akash.audit.v1beta2.AuditedAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta2.AuditedAttributes", owner: "", auditor: "", attributes: [] }; } export const AuditedAttributes = { - $type: 'akash.audit.v1beta2.AuditedAttributes' as const, + $type: "akash.audit.v1beta2.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -194,8 +176,7 @@ export const AuditedAttributes = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AuditedAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAuditedAttributes(); while (reader.pos < end) { @@ -234,8 +215,8 @@ export const AuditedAttributes = { fromJSON(object: any): AuditedAttributes { return { $type: AuditedAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -244,10 +225,10 @@ export const AuditedAttributes = { toJSON(message: AuditedAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -261,10 +242,9 @@ export const AuditedAttributes = { }, fromPartial(object: DeepPartial): AuditedAttributes { const message = createBaseAuditedAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -272,16 +252,13 @@ export const AuditedAttributes = { messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); function createBaseAttributesResponse(): AttributesResponse { - return { $type: 'akash.audit.v1beta2.AttributesResponse', attributes: [] }; + return { $type: "akash.audit.v1beta2.AttributesResponse", attributes: [] }; } export const AttributesResponse = { - $type: 'akash.audit.v1beta2.AttributesResponse' as const, + $type: "akash.audit.v1beta2.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -289,8 +266,7 @@ export const AttributesResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesResponse(); while (reader.pos < end) { @@ -301,9 +277,7 @@ export const AttributesResponse = { break; } - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()), - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -326,9 +300,7 @@ export const AttributesResponse = { toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes?.length) { - obj.attributes = message.attributes.map((e) => - AuditedAttributes.toJSON(e), - ); + obj.attributes = message.attributes.map((e) => AuditedAttributes.toJSON(e)); } return obj; }, @@ -338,8 +310,7 @@ export const AttributesResponse = { }, fromPartial(object: DeepPartial): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; return message; }, }; @@ -347,20 +318,13 @@ export const AttributesResponse = { messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); function createBaseAttributesFilters(): AttributesFilters { - return { - $type: 'akash.audit.v1beta2.AttributesFilters', - auditors: [], - owners: [], - }; + return { $type: "akash.audit.v1beta2.AttributesFilters", auditors: [], owners: [] }; } export const AttributesFilters = { - $type: 'akash.audit.v1beta2.AttributesFilters' as const, + $type: "akash.audit.v1beta2.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -371,8 +335,7 @@ export const AttributesFilters = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesFilters(); while (reader.pos < end) { @@ -404,12 +367,8 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: globalThis.Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => globalThis.String(e)) - : [], - owners: globalThis.Array.isArray(object?.owners) - ? object.owners.map((e: any) => globalThis.String(e)) - : [], + auditors: globalThis.Array.isArray(object?.auditors) ? object.auditors.map((e: any) => globalThis.String(e)) : [], + owners: globalThis.Array.isArray(object?.owners) ? object.owners.map((e: any) => globalThis.String(e)) : [], }; }, @@ -438,25 +397,17 @@ export const AttributesFilters = { messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { - return { - $type: 'akash.audit.v1beta2.MsgSignProviderAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta2.MsgSignProviderAttributes", owner: "", auditor: "", attributes: [] }; } export const MsgSignProviderAttributes = { - $type: 'akash.audit.v1beta2.MsgSignProviderAttributes' as const, + $type: "akash.audit.v1beta2.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -465,12 +416,8 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); while (reader.pos < end) { @@ -509,8 +456,8 @@ export const MsgSignProviderAttributes = { fromJSON(object: any): MsgSignProviderAttributes { return { $type: MsgSignProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -519,10 +466,10 @@ export const MsgSignProviderAttributes = { toJSON(message: MsgSignProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -531,48 +478,33 @@ export const MsgSignProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributes { + create(base?: DeepPartial): MsgSignProviderAttributes { return MsgSignProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgSignProviderAttributes { + fromPartial(object: DeepPartial): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes, -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { - return { $type: 'akash.audit.v1beta2.MsgSignProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta2.MsgSignProviderAttributesResponse" }; } export const MsgSignProviderAttributesResponse = { - $type: 'akash.audit.v1beta2.MsgSignProviderAttributesResponse' as const, + $type: "akash.audit.v1beta2.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); while (reader.pos < end) { @@ -596,44 +528,29 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributesResponse { + create(base?: DeepPartial): MsgSignProviderAttributesResponse { return MsgSignProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgSignProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse, -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { - return { - $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributes', - owner: '', - auditor: '', - keys: [], - }; + return { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributes", owner: "", auditor: "", keys: [] }; } export const MsgDeleteProviderAttributes = { - $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributes' as const, + $type: "akash.audit.v1beta2.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.keys) { @@ -642,12 +559,8 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); while (reader.pos < end) { @@ -686,20 +599,18 @@ export const MsgDeleteProviderAttributes = { fromJSON(object: any): MsgDeleteProviderAttributes { return { $type: MsgDeleteProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - keys: globalThis.Array.isArray(object?.keys) - ? object.keys.map((e: any) => globalThis.String(e)) - : [], + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: MsgDeleteProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.keys?.length) { @@ -708,47 +619,33 @@ export const MsgDeleteProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributes { + create(base?: DeepPartial): MsgDeleteProviderAttributes { return MsgDeleteProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgDeleteProviderAttributes { + fromPartial(object: DeepPartial): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; message.keys = object.keys?.map((e) => e) || []; return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes, -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { - return { $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse" }; } export const MsgDeleteProviderAttributesResponse = { - $type: 'akash.audit.v1beta2.MsgDeleteProviderAttributesResponse' as const, + $type: "akash.audit.v1beta2.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); while (reader.pos < end) { @@ -772,37 +669,26 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + create(base?: DeepPartial): MsgDeleteProviderAttributesResponse { return MsgDeleteProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse, -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } -export const MsgServiceName = 'akash.audit.v1beta2.Msg'; +export const MsgServiceName = "akash.audit.v1beta2.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -812,63 +698,30 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'SignProviderAttributes', - data, - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "SignProviderAttributes", data); + return promise.then((data) => MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'DeleteProviderAttributes', - data, - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProviderAttributes", data); + return promise.then((data) => MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta2/genesis.ts b/ts/src/generated/akash/audit/v1beta2/genesis.ts index 8c67e010..44511918 100644 --- a/ts/src/generated/akash/audit/v1beta2/genesis.ts +++ b/ts/src/generated/akash/audit/v1beta2/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { AuditedAttributes } from './audit'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { AuditedAttributes } from "./audit"; /** GenesisState defines the basic genesis state used by audit module */ export interface GenesisState { - $type: 'akash.audit.v1beta2.GenesisState'; + $type: "akash.audit.v1beta2.GenesisState"; attributes: AuditedAttributes[]; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.audit.v1beta2.GenesisState', attributes: [] }; + return { $type: "akash.audit.v1beta2.GenesisState", attributes: [] }; } export const GenesisState = { - $type: 'akash.audit.v1beta2.GenesisState' as const, + $type: "akash.audit.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -40,9 +36,7 @@ export const GenesisState = { break; } - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()), - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -65,9 +59,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.attributes?.length) { - obj.attributes = message.attributes.map((e) => - AuditedAttributes.toJSON(e), - ); + obj.attributes = message.attributes.map((e) => AuditedAttributes.toJSON(e)); } return obj; }, @@ -77,34 +69,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta2/query.ts b/ts/src/generated/akash/audit/v1beta2/query.ts index 79756bb1..c2332f04 100644 --- a/ts/src/generated/akash/audit/v1beta2/query.ts +++ b/ts/src/generated/akash/audit/v1beta2/query.ts @@ -1,87 +1,70 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './audit'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./audit"; /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryProvidersResponse { - $type: 'akash.audit.v1beta2.QueryProvidersResponse'; + $type: "akash.audit.v1beta2.QueryProvidersResponse"; providers: Provider[]; pagination: PageResponse | undefined; } /** QueryProviderRequest is request type for the Query/Provider RPC method */ export interface QueryProviderRequest { - $type: 'akash.audit.v1beta2.QueryProviderRequest'; + $type: "akash.audit.v1beta2.QueryProviderRequest"; auditor: string; owner: string; } /** QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method */ export interface QueryAllProvidersAttributesRequest { - $type: 'akash.audit.v1beta2.QueryAllProvidersAttributesRequest'; + $type: "akash.audit.v1beta2.QueryAllProvidersAttributesRequest"; pagination: PageRequest | undefined; } /** QueryProviderAttributesRequest is request type for the Query/Provider RPC method */ export interface QueryProviderAttributesRequest { - $type: 'akash.audit.v1beta2.QueryProviderAttributesRequest'; + $type: "akash.audit.v1beta2.QueryProviderAttributesRequest"; owner: string; pagination: PageRequest | undefined; } /** QueryProviderAuditorRequest is request type for the Query/Providers RPC method */ export interface QueryProviderAuditorRequest { - $type: 'akash.audit.v1beta2.QueryProviderAuditorRequest'; + $type: "akash.audit.v1beta2.QueryProviderAuditorRequest"; auditor: string; owner: string; } /** QueryAuditorAttributesRequest is request type for the Query/Providers RPC method */ export interface QueryAuditorAttributesRequest { - $type: 'akash.audit.v1beta2.QueryAuditorAttributesRequest'; + $type: "akash.audit.v1beta2.QueryAuditorAttributesRequest"; auditor: string; pagination: PageRequest | undefined; } function createBaseQueryProvidersResponse(): QueryProvidersResponse { - return { - $type: 'akash.audit.v1beta2.QueryProvidersResponse', - providers: [], - pagination: undefined, - }; + return { $type: "akash.audit.v1beta2.QueryProvidersResponse", providers: [], pagination: undefined }; } export const QueryProvidersResponse = { - $type: 'akash.audit.v1beta2.QueryProvidersResponse' as const, + $type: "akash.audit.v1beta2.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); while (reader.pos < end) { @@ -116,9 +99,7 @@ export const QueryProvidersResponse = { providers: globalThis.Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -136,16 +117,12 @@ export const QueryProvidersResponse = { create(base?: DeepPartial): QueryProvidersResponse { return QueryProvidersResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersResponse { + fromPartial(object: DeepPartial): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -153,35 +130,24 @@ export const QueryProvidersResponse = { messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); function createBaseQueryProviderRequest(): QueryProviderRequest { - return { - $type: 'akash.audit.v1beta2.QueryProviderRequest', - auditor: '', - owner: '', - }; + return { $type: "akash.audit.v1beta2.QueryProviderRequest", auditor: "", owner: "" }; } export const QueryProviderRequest = { - $type: 'akash.audit.v1beta2.QueryProviderRequest' as const, + $type: "akash.audit.v1beta2.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); while (reader.pos < end) { @@ -213,17 +179,17 @@ export const QueryProviderRequest = { fromJSON(object: any): QueryProviderRequest { return { $type: QueryProviderRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", }; }, toJSON(message: QueryProviderRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -234,8 +200,8 @@ export const QueryProviderRequest = { }, fromPartial(object: DeepPartial): QueryProviderRequest { const message = createBaseQueryProviderRequest(); - message.auditor = object.auditor ?? ''; - message.owner = object.owner ?? ''; + message.auditor = object.auditor ?? ""; + message.owner = object.owner ?? ""; return message; }, }; @@ -243,31 +209,21 @@ export const QueryProviderRequest = { messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryAllProvidersAttributesRequest(): QueryAllProvidersAttributesRequest { - return { - $type: 'akash.audit.v1beta2.QueryAllProvidersAttributesRequest', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta2.QueryAllProvidersAttributesRequest", pagination: undefined }; } export const QueryAllProvidersAttributesRequest = { - $type: 'akash.audit.v1beta2.QueryAllProvidersAttributesRequest' as const, + $type: "akash.audit.v1beta2.QueryAllProvidersAttributesRequest" as const, - encode( - message: QueryAllProvidersAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryAllProvidersAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAllProvidersAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllProvidersAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllProvidersAttributesRequest(); while (reader.pos < end) { @@ -292,9 +248,7 @@ export const QueryAllProvidersAttributesRequest = { fromJSON(object: any): QueryAllProvidersAttributesRequest { return { $type: QueryAllProvidersAttributesRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -306,44 +260,29 @@ export const QueryAllProvidersAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryAllProvidersAttributesRequest { + create(base?: DeepPartial): QueryAllProvidersAttributesRequest { return QueryAllProvidersAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAllProvidersAttributesRequest { + fromPartial(object: DeepPartial): QueryAllProvidersAttributesRequest { const message = createBaseQueryAllProvidersAttributesRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryAllProvidersAttributesRequest.$type, - QueryAllProvidersAttributesRequest, -); +messageTypeRegistry.set(QueryAllProvidersAttributesRequest.$type, QueryAllProvidersAttributesRequest); function createBaseQueryProviderAttributesRequest(): QueryProviderAttributesRequest { - return { - $type: 'akash.audit.v1beta2.QueryProviderAttributesRequest', - owner: '', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta2.QueryProviderAttributesRequest", owner: "", pagination: undefined }; } export const QueryProviderAttributesRequest = { - $type: 'akash.audit.v1beta2.QueryProviderAttributesRequest' as const, + $type: "akash.audit.v1beta2.QueryProviderAttributesRequest" as const, - encode( - message: QueryProviderAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: QueryProviderAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.pagination !== undefined) { @@ -352,12 +291,8 @@ export const QueryProviderAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAttributesRequest(); while (reader.pos < end) { @@ -389,16 +324,14 @@ export const QueryProviderAttributesRequest = { fromJSON(object: any): QueryProviderAttributesRequest { return { $type: QueryProviderAttributesRequest.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryProviderAttributesRequest): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.pagination !== undefined) { @@ -407,59 +340,40 @@ export const QueryProviderAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryProviderAttributesRequest { + create(base?: DeepPartial): QueryProviderAttributesRequest { return QueryProviderAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderAttributesRequest { + fromPartial(object: DeepPartial): QueryProviderAttributesRequest { const message = createBaseQueryProviderAttributesRequest(); - message.owner = object.owner ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.owner = object.owner ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryProviderAttributesRequest.$type, - QueryProviderAttributesRequest, -); +messageTypeRegistry.set(QueryProviderAttributesRequest.$type, QueryProviderAttributesRequest); function createBaseQueryProviderAuditorRequest(): QueryProviderAuditorRequest { - return { - $type: 'akash.audit.v1beta2.QueryProviderAuditorRequest', - auditor: '', - owner: '', - }; + return { $type: "akash.audit.v1beta2.QueryProviderAuditorRequest", auditor: "", owner: "" }; } export const QueryProviderAuditorRequest = { - $type: 'akash.audit.v1beta2.QueryProviderAuditorRequest' as const, + $type: "akash.audit.v1beta2.QueryProviderAuditorRequest" as const, - encode( - message: QueryProviderAuditorRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryProviderAuditorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderAuditorRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAuditorRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAuditorRequest(); while (reader.pos < end) { @@ -491,58 +405,44 @@ export const QueryProviderAuditorRequest = { fromJSON(object: any): QueryProviderAuditorRequest { return { $type: QueryProviderAuditorRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", }; }, toJSON(message: QueryProviderAuditorRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; }, - create( - base?: DeepPartial, - ): QueryProviderAuditorRequest { + create(base?: DeepPartial): QueryProviderAuditorRequest { return QueryProviderAuditorRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderAuditorRequest { + fromPartial(object: DeepPartial): QueryProviderAuditorRequest { const message = createBaseQueryProviderAuditorRequest(); - message.auditor = object.auditor ?? ''; - message.owner = object.owner ?? ''; + message.auditor = object.auditor ?? ""; + message.owner = object.owner ?? ""; return message; }, }; -messageTypeRegistry.set( - QueryProviderAuditorRequest.$type, - QueryProviderAuditorRequest, -); +messageTypeRegistry.set(QueryProviderAuditorRequest.$type, QueryProviderAuditorRequest); function createBaseQueryAuditorAttributesRequest(): QueryAuditorAttributesRequest { - return { - $type: 'akash.audit.v1beta2.QueryAuditorAttributesRequest', - auditor: '', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta2.QueryAuditorAttributesRequest", auditor: "", pagination: undefined }; } export const QueryAuditorAttributesRequest = { - $type: 'akash.audit.v1beta2.QueryAuditorAttributesRequest' as const, + $type: "akash.audit.v1beta2.QueryAuditorAttributesRequest" as const, - encode( - message: QueryAuditorAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryAuditorAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } if (message.pagination !== undefined) { @@ -551,12 +451,8 @@ export const QueryAuditorAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAuditorAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuditorAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAuditorAttributesRequest(); while (reader.pos < end) { @@ -588,16 +484,14 @@ export const QueryAuditorAttributesRequest = { fromJSON(object: any): QueryAuditorAttributesRequest { return { $type: QueryAuditorAttributesRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryAuditorAttributesRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.pagination !== undefined) { @@ -606,28 +500,20 @@ export const QueryAuditorAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryAuditorAttributesRequest { + create(base?: DeepPartial): QueryAuditorAttributesRequest { return QueryAuditorAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAuditorAttributesRequest { + fromPartial(object: DeepPartial): QueryAuditorAttributesRequest { const message = createBaseQueryAuditorAttributesRequest(); - message.auditor = object.auditor ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.auditor = object.auditor ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryAuditorAttributesRequest.$type, - QueryAuditorAttributesRequest, -); +messageTypeRegistry.set(QueryAuditorAttributesRequest.$type, QueryAuditorAttributesRequest); /** Query defines the gRPC querier service */ export interface Query { @@ -636,36 +522,28 @@ export interface Query { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest, - ): Promise; + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise; /** * ProviderAttributes queries all provider signed attributes * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAttributes( - request: QueryProviderAttributesRequest, - ): Promise; + ProviderAttributes(request: QueryProviderAttributesRequest): Promise; /** * ProviderAuditorAttributes queries provider signed attributes by specific auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest, - ): Promise; + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise; /** * AuditorAttributes queries all providers signed by this auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AuditorAttributes( - request: QueryAuditorAttributesRequest, - ): Promise; + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise; } -export const QueryServiceName = 'akash.audit.v1beta2.Query'; +export const QueryServiceName = "akash.audit.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -677,83 +555,42 @@ export class QueryClientImpl implements Query { this.ProviderAuditorAttributes = this.ProviderAuditorAttributes.bind(this); this.AuditorAttributes = this.AuditorAttributes.bind(this); } - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest, - ): Promise { + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise { const data = QueryAllProvidersAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'AllProvidersAttributes', - data, - ); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "AllProvidersAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - ProviderAttributes( - request: QueryProviderAttributesRequest, - ): Promise { + ProviderAttributes(request: QueryProviderAttributesRequest): Promise { const data = QueryProviderAttributesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'ProviderAttributes', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ProviderAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest, - ): Promise { + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise { const data = QueryProviderAuditorRequest.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'ProviderAuditorAttributes', - data, - ); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ProviderAuditorAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - AuditorAttributes( - request: QueryAuditorAttributesRequest, - ): Promise { + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise { const data = QueryAuditorAttributesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'AuditorAttributes', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "AuditorAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta3/audit.ts b/ts/src/generated/akash/audit/v1beta3/audit.ts index 39be1523..1be989da 100644 --- a/ts/src/generated/akash/audit/v1beta3/audit.ts +++ b/ts/src/generated/akash/audit/v1beta3/audit.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta3/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta3/attribute"; /** Provider stores owner auditor and attributes details */ export interface Provider { - $type: 'akash.audit.v1beta3.Provider'; + $type: "akash.audit.v1beta3.Provider"; owner: string; auditor: string; attributes: Attribute[]; @@ -14,7 +14,7 @@ export interface Provider { /** Attributes */ export interface AuditedAttributes { - $type: 'akash.audit.v1beta3.AuditedAttributes'; + $type: "akash.audit.v1beta3.AuditedAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -22,20 +22,20 @@ export interface AuditedAttributes { /** AttributesResponse represents details of deployment along with group details */ export interface AttributesResponse { - $type: 'akash.audit.v1beta3.AttributesResponse'; + $type: "akash.audit.v1beta3.AttributesResponse"; attributes: AuditedAttributes[]; } /** AttributesFilters defines filters used to filter deployments */ export interface AttributesFilters { - $type: 'akash.audit.v1beta3.AttributesFilters'; + $type: "akash.audit.v1beta3.AttributesFilters"; auditors: string[]; owners: string[]; } /** MsgSignProviderAttributes defines an SDK message for signing a provider attributes */ export interface MsgSignProviderAttributes { - $type: 'akash.audit.v1beta3.MsgSignProviderAttributes'; + $type: "akash.audit.v1beta3.MsgSignProviderAttributes"; owner: string; auditor: string; attributes: Attribute[]; @@ -43,12 +43,12 @@ export interface MsgSignProviderAttributes { /** MsgSignProviderAttributesResponse defines the Msg/CreateProvider response type. */ export interface MsgSignProviderAttributesResponse { - $type: 'akash.audit.v1beta3.MsgSignProviderAttributesResponse'; + $type: "akash.audit.v1beta3.MsgSignProviderAttributesResponse"; } /** MsgDeleteProviderAttributes defined the Msg/DeleteProviderAttributes */ export interface MsgDeleteProviderAttributes { - $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributes'; + $type: "akash.audit.v1beta3.MsgDeleteProviderAttributes"; owner: string; auditor: string; keys: string[]; @@ -56,29 +56,21 @@ export interface MsgDeleteProviderAttributes { /** MsgDeleteProviderAttributesResponse defines the Msg/ProviderAttributes response type. */ export interface MsgDeleteProviderAttributesResponse { - $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributesResponse'; + $type: "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse"; } function createBaseProvider(): Provider { - return { - $type: 'akash.audit.v1beta3.Provider', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta3.Provider", owner: "", auditor: "", attributes: [] }; } export const Provider = { - $type: 'akash.audit.v1beta3.Provider' as const, + $type: "akash.audit.v1beta3.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -88,8 +80,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -128,8 +119,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -138,10 +129,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -155,10 +146,9 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -166,25 +156,17 @@ export const Provider = { messageTypeRegistry.set(Provider.$type, Provider); function createBaseAuditedAttributes(): AuditedAttributes { - return { - $type: 'akash.audit.v1beta3.AuditedAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta3.AuditedAttributes", owner: "", auditor: "", attributes: [] }; } export const AuditedAttributes = { - $type: 'akash.audit.v1beta3.AuditedAttributes' as const, + $type: "akash.audit.v1beta3.AuditedAttributes" as const, - encode( - message: AuditedAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: AuditedAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -194,8 +176,7 @@ export const AuditedAttributes = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AuditedAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAuditedAttributes(); while (reader.pos < end) { @@ -234,8 +215,8 @@ export const AuditedAttributes = { fromJSON(object: any): AuditedAttributes { return { $type: AuditedAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -244,10 +225,10 @@ export const AuditedAttributes = { toJSON(message: AuditedAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -261,10 +242,9 @@ export const AuditedAttributes = { }, fromPartial(object: DeepPartial): AuditedAttributes { const message = createBaseAuditedAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -272,16 +252,13 @@ export const AuditedAttributes = { messageTypeRegistry.set(AuditedAttributes.$type, AuditedAttributes); function createBaseAttributesResponse(): AttributesResponse { - return { $type: 'akash.audit.v1beta3.AttributesResponse', attributes: [] }; + return { $type: "akash.audit.v1beta3.AttributesResponse", attributes: [] }; } export const AttributesResponse = { - $type: 'akash.audit.v1beta3.AttributesResponse' as const, + $type: "akash.audit.v1beta3.AttributesResponse" as const, - encode( - message: AttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -289,8 +266,7 @@ export const AttributesResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesResponse(); while (reader.pos < end) { @@ -301,9 +277,7 @@ export const AttributesResponse = { break; } - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()), - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -326,9 +300,7 @@ export const AttributesResponse = { toJSON(message: AttributesResponse): unknown { const obj: any = {}; if (message.attributes?.length) { - obj.attributes = message.attributes.map((e) => - AuditedAttributes.toJSON(e), - ); + obj.attributes = message.attributes.map((e) => AuditedAttributes.toJSON(e)); } return obj; }, @@ -338,8 +310,7 @@ export const AttributesResponse = { }, fromPartial(object: DeepPartial): AttributesResponse { const message = createBaseAttributesResponse(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; return message; }, }; @@ -347,20 +318,13 @@ export const AttributesResponse = { messageTypeRegistry.set(AttributesResponse.$type, AttributesResponse); function createBaseAttributesFilters(): AttributesFilters { - return { - $type: 'akash.audit.v1beta3.AttributesFilters', - auditors: [], - owners: [], - }; + return { $type: "akash.audit.v1beta3.AttributesFilters", auditors: [], owners: [] }; } export const AttributesFilters = { - $type: 'akash.audit.v1beta3.AttributesFilters' as const, + $type: "akash.audit.v1beta3.AttributesFilters" as const, - encode( - message: AttributesFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: AttributesFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.auditors) { writer.uint32(10).string(v!); } @@ -371,8 +335,7 @@ export const AttributesFilters = { }, decode(input: _m0.Reader | Uint8Array, length?: number): AttributesFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttributesFilters(); while (reader.pos < end) { @@ -404,12 +367,8 @@ export const AttributesFilters = { fromJSON(object: any): AttributesFilters { return { $type: AttributesFilters.$type, - auditors: globalThis.Array.isArray(object?.auditors) - ? object.auditors.map((e: any) => globalThis.String(e)) - : [], - owners: globalThis.Array.isArray(object?.owners) - ? object.owners.map((e: any) => globalThis.String(e)) - : [], + auditors: globalThis.Array.isArray(object?.auditors) ? object.auditors.map((e: any) => globalThis.String(e)) : [], + owners: globalThis.Array.isArray(object?.owners) ? object.owners.map((e: any) => globalThis.String(e)) : [], }; }, @@ -438,25 +397,17 @@ export const AttributesFilters = { messageTypeRegistry.set(AttributesFilters.$type, AttributesFilters); function createBaseMsgSignProviderAttributes(): MsgSignProviderAttributes { - return { - $type: 'akash.audit.v1beta3.MsgSignProviderAttributes', - owner: '', - auditor: '', - attributes: [], - }; + return { $type: "akash.audit.v1beta3.MsgSignProviderAttributes", owner: "", auditor: "", attributes: [] }; } export const MsgSignProviderAttributes = { - $type: 'akash.audit.v1beta3.MsgSignProviderAttributes' as const, + $type: "akash.audit.v1beta3.MsgSignProviderAttributes" as const, - encode( - message: MsgSignProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgSignProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.attributes) { @@ -465,12 +416,8 @@ export const MsgSignProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributes(); while (reader.pos < end) { @@ -509,8 +456,8 @@ export const MsgSignProviderAttributes = { fromJSON(object: any): MsgSignProviderAttributes { return { $type: MsgSignProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -519,10 +466,10 @@ export const MsgSignProviderAttributes = { toJSON(message: MsgSignProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.attributes?.length) { @@ -531,48 +478,33 @@ export const MsgSignProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributes { + create(base?: DeepPartial): MsgSignProviderAttributes { return MsgSignProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgSignProviderAttributes { + fromPartial(object: DeepPartial): MsgSignProviderAttributes { const message = createBaseMsgSignProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributes.$type, - MsgSignProviderAttributes, -); +messageTypeRegistry.set(MsgSignProviderAttributes.$type, MsgSignProviderAttributes); function createBaseMsgSignProviderAttributesResponse(): MsgSignProviderAttributesResponse { - return { $type: 'akash.audit.v1beta3.MsgSignProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta3.MsgSignProviderAttributesResponse" }; } export const MsgSignProviderAttributesResponse = { - $type: 'akash.audit.v1beta3.MsgSignProviderAttributesResponse' as const, + $type: "akash.audit.v1beta3.MsgSignProviderAttributesResponse" as const, - encode( - _: MsgSignProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgSignProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgSignProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgSignProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgSignProviderAttributesResponse(); while (reader.pos < end) { @@ -596,44 +528,29 @@ export const MsgSignProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgSignProviderAttributesResponse { + create(base?: DeepPartial): MsgSignProviderAttributesResponse { return MsgSignProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgSignProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgSignProviderAttributesResponse { const message = createBaseMsgSignProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgSignProviderAttributesResponse.$type, - MsgSignProviderAttributesResponse, -); +messageTypeRegistry.set(MsgSignProviderAttributesResponse.$type, MsgSignProviderAttributesResponse); function createBaseMsgDeleteProviderAttributes(): MsgDeleteProviderAttributes { - return { - $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributes', - owner: '', - auditor: '', - keys: [], - }; + return { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributes", owner: "", auditor: "", keys: [] }; } export const MsgDeleteProviderAttributes = { - $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributes' as const, + $type: "akash.audit.v1beta3.MsgDeleteProviderAttributes" as const, - encode( - message: MsgDeleteProviderAttributes, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProviderAttributes, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.auditor !== '') { + if (message.auditor !== "") { writer.uint32(18).string(message.auditor); } for (const v of message.keys) { @@ -642,12 +559,8 @@ export const MsgDeleteProviderAttributes = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributes { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributes { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributes(); while (reader.pos < end) { @@ -686,20 +599,18 @@ export const MsgDeleteProviderAttributes = { fromJSON(object: any): MsgDeleteProviderAttributes { return { $type: MsgDeleteProviderAttributes.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - keys: globalThis.Array.isArray(object?.keys) - ? object.keys.map((e: any) => globalThis.String(e)) - : [], + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + keys: globalThis.Array.isArray(object?.keys) ? object.keys.map((e: any) => globalThis.String(e)) : [], }; }, toJSON(message: MsgDeleteProviderAttributes): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.keys?.length) { @@ -708,47 +619,33 @@ export const MsgDeleteProviderAttributes = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributes { + create(base?: DeepPartial): MsgDeleteProviderAttributes { return MsgDeleteProviderAttributes.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MsgDeleteProviderAttributes { + fromPartial(object: DeepPartial): MsgDeleteProviderAttributes { const message = createBaseMsgDeleteProviderAttributes(); - message.owner = object.owner ?? ''; - message.auditor = object.auditor ?? ''; + message.owner = object.owner ?? ""; + message.auditor = object.auditor ?? ""; message.keys = object.keys?.map((e) => e) || []; return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributes.$type, - MsgDeleteProviderAttributes, -); +messageTypeRegistry.set(MsgDeleteProviderAttributes.$type, MsgDeleteProviderAttributes); function createBaseMsgDeleteProviderAttributesResponse(): MsgDeleteProviderAttributesResponse { - return { $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributesResponse' }; + return { $type: "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse" }; } export const MsgDeleteProviderAttributesResponse = { - $type: 'akash.audit.v1beta3.MsgDeleteProviderAttributesResponse' as const, + $type: "akash.audit.v1beta3.MsgDeleteProviderAttributesResponse" as const, - encode( - _: MsgDeleteProviderAttributesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderAttributesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderAttributesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderAttributesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderAttributesResponse(); while (reader.pos < end) { @@ -772,37 +669,26 @@ export const MsgDeleteProviderAttributesResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + create(base?: DeepPartial): MsgDeleteProviderAttributesResponse { return MsgDeleteProviderAttributesResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderAttributesResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderAttributesResponse { const message = createBaseMsgDeleteProviderAttributesResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderAttributesResponse.$type, - MsgDeleteProviderAttributesResponse, -); +messageTypeRegistry.set(MsgDeleteProviderAttributesResponse.$type, MsgDeleteProviderAttributesResponse); /** Msg defines the provider Msg service */ export interface Msg { /** SignProviderAttributes defines a method that signs provider attributes */ - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise; + SignProviderAttributes(request: MsgSignProviderAttributes): Promise; /** DeleteProviderAttributes defines a method that deletes provider attributes */ - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise; + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise; } -export const MsgServiceName = 'akash.audit.v1beta3.Msg'; +export const MsgServiceName = "akash.audit.v1beta3.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -812,63 +698,30 @@ export class MsgClientImpl implements Msg { this.SignProviderAttributes = this.SignProviderAttributes.bind(this); this.DeleteProviderAttributes = this.DeleteProviderAttributes.bind(this); } - SignProviderAttributes( - request: MsgSignProviderAttributes, - ): Promise { + SignProviderAttributes(request: MsgSignProviderAttributes): Promise { const data = MsgSignProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'SignProviderAttributes', - data, - ); - return promise.then((data) => - MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "SignProviderAttributes", data); + return promise.then((data) => MsgSignProviderAttributesResponse.decode(_m0.Reader.create(data))); } - DeleteProviderAttributes( - request: MsgDeleteProviderAttributes, - ): Promise { + DeleteProviderAttributes(request: MsgDeleteProviderAttributes): Promise { const data = MsgDeleteProviderAttributes.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'DeleteProviderAttributes', - data, - ); - return promise.then((data) => - MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProviderAttributes", data); + return promise.then((data) => MsgDeleteProviderAttributesResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta3/genesis.ts b/ts/src/generated/akash/audit/v1beta3/genesis.ts index 9f8fe4db..3924ddb7 100644 --- a/ts/src/generated/akash/audit/v1beta3/genesis.ts +++ b/ts/src/generated/akash/audit/v1beta3/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { AuditedAttributes } from './audit'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { AuditedAttributes } from "./audit"; /** GenesisState defines the basic genesis state used by audit module */ export interface GenesisState { - $type: 'akash.audit.v1beta3.GenesisState'; + $type: "akash.audit.v1beta3.GenesisState"; attributes: AuditedAttributes[]; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.audit.v1beta3.GenesisState', attributes: [] }; + return { $type: "akash.audit.v1beta3.GenesisState", attributes: [] }; } export const GenesisState = { - $type: 'akash.audit.v1beta3.GenesisState' as const, + $type: "akash.audit.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.attributes) { AuditedAttributes.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -40,9 +36,7 @@ export const GenesisState = { break; } - message.attributes.push( - AuditedAttributes.decode(reader, reader.uint32()), - ); + message.attributes.push(AuditedAttributes.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -65,9 +59,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.attributes?.length) { - obj.attributes = message.attributes.map((e) => - AuditedAttributes.toJSON(e), - ); + obj.attributes = message.attributes.map((e) => AuditedAttributes.toJSON(e)); } return obj; }, @@ -77,34 +69,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.attributes = - object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; + message.attributes = object.attributes?.map((e) => AuditedAttributes.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/audit/v1beta3/query.ts b/ts/src/generated/akash/audit/v1beta3/query.ts index e0991fad..0cefad46 100644 --- a/ts/src/generated/akash/audit/v1beta3/query.ts +++ b/ts/src/generated/akash/audit/v1beta3/query.ts @@ -1,87 +1,70 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './audit'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./audit"; /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryProvidersResponse { - $type: 'akash.audit.v1beta3.QueryProvidersResponse'; + $type: "akash.audit.v1beta3.QueryProvidersResponse"; providers: Provider[]; pagination: PageResponse | undefined; } /** QueryProviderRequest is request type for the Query/Provider RPC method */ export interface QueryProviderRequest { - $type: 'akash.audit.v1beta3.QueryProviderRequest'; + $type: "akash.audit.v1beta3.QueryProviderRequest"; auditor: string; owner: string; } /** QueryAllProvidersAttributesRequest is request type for the Query/All Providers RPC method */ export interface QueryAllProvidersAttributesRequest { - $type: 'akash.audit.v1beta3.QueryAllProvidersAttributesRequest'; + $type: "akash.audit.v1beta3.QueryAllProvidersAttributesRequest"; pagination: PageRequest | undefined; } /** QueryProviderAttributesRequest is request type for the Query/Provider RPC method */ export interface QueryProviderAttributesRequest { - $type: 'akash.audit.v1beta3.QueryProviderAttributesRequest'; + $type: "akash.audit.v1beta3.QueryProviderAttributesRequest"; owner: string; pagination: PageRequest | undefined; } /** QueryProviderAuditorRequest is request type for the Query/Providers RPC method */ export interface QueryProviderAuditorRequest { - $type: 'akash.audit.v1beta3.QueryProviderAuditorRequest'; + $type: "akash.audit.v1beta3.QueryProviderAuditorRequest"; auditor: string; owner: string; } /** QueryAuditorAttributesRequest is request type for the Query/Providers RPC method */ export interface QueryAuditorAttributesRequest { - $type: 'akash.audit.v1beta3.QueryAuditorAttributesRequest'; + $type: "akash.audit.v1beta3.QueryAuditorAttributesRequest"; auditor: string; pagination: PageRequest | undefined; } function createBaseQueryProvidersResponse(): QueryProvidersResponse { - return { - $type: 'akash.audit.v1beta3.QueryProvidersResponse', - providers: [], - pagination: undefined, - }; + return { $type: "akash.audit.v1beta3.QueryProvidersResponse", providers: [], pagination: undefined }; } export const QueryProvidersResponse = { - $type: 'akash.audit.v1beta3.QueryProvidersResponse' as const, + $type: "akash.audit.v1beta3.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); while (reader.pos < end) { @@ -116,9 +99,7 @@ export const QueryProvidersResponse = { providers: globalThis.Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -136,16 +117,12 @@ export const QueryProvidersResponse = { create(base?: DeepPartial): QueryProvidersResponse { return QueryProvidersResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersResponse { + fromPartial(object: DeepPartial): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -153,35 +130,24 @@ export const QueryProvidersResponse = { messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); function createBaseQueryProviderRequest(): QueryProviderRequest { - return { - $type: 'akash.audit.v1beta3.QueryProviderRequest', - auditor: '', - owner: '', - }; + return { $type: "akash.audit.v1beta3.QueryProviderRequest", auditor: "", owner: "" }; } export const QueryProviderRequest = { - $type: 'akash.audit.v1beta3.QueryProviderRequest' as const, + $type: "akash.audit.v1beta3.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); while (reader.pos < end) { @@ -213,17 +179,17 @@ export const QueryProviderRequest = { fromJSON(object: any): QueryProviderRequest { return { $type: QueryProviderRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", }; }, toJSON(message: QueryProviderRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -234,8 +200,8 @@ export const QueryProviderRequest = { }, fromPartial(object: DeepPartial): QueryProviderRequest { const message = createBaseQueryProviderRequest(); - message.auditor = object.auditor ?? ''; - message.owner = object.owner ?? ''; + message.auditor = object.auditor ?? ""; + message.owner = object.owner ?? ""; return message; }, }; @@ -243,31 +209,21 @@ export const QueryProviderRequest = { messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryAllProvidersAttributesRequest(): QueryAllProvidersAttributesRequest { - return { - $type: 'akash.audit.v1beta3.QueryAllProvidersAttributesRequest', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta3.QueryAllProvidersAttributesRequest", pagination: undefined }; } export const QueryAllProvidersAttributesRequest = { - $type: 'akash.audit.v1beta3.QueryAllProvidersAttributesRequest' as const, + $type: "akash.audit.v1beta3.QueryAllProvidersAttributesRequest" as const, - encode( - message: QueryAllProvidersAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryAllProvidersAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAllProvidersAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAllProvidersAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAllProvidersAttributesRequest(); while (reader.pos < end) { @@ -292,9 +248,7 @@ export const QueryAllProvidersAttributesRequest = { fromJSON(object: any): QueryAllProvidersAttributesRequest { return { $type: QueryAllProvidersAttributesRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -306,44 +260,29 @@ export const QueryAllProvidersAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryAllProvidersAttributesRequest { + create(base?: DeepPartial): QueryAllProvidersAttributesRequest { return QueryAllProvidersAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAllProvidersAttributesRequest { + fromPartial(object: DeepPartial): QueryAllProvidersAttributesRequest { const message = createBaseQueryAllProvidersAttributesRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryAllProvidersAttributesRequest.$type, - QueryAllProvidersAttributesRequest, -); +messageTypeRegistry.set(QueryAllProvidersAttributesRequest.$type, QueryAllProvidersAttributesRequest); function createBaseQueryProviderAttributesRequest(): QueryProviderAttributesRequest { - return { - $type: 'akash.audit.v1beta3.QueryProviderAttributesRequest', - owner: '', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta3.QueryProviderAttributesRequest", owner: "", pagination: undefined }; } export const QueryProviderAttributesRequest = { - $type: 'akash.audit.v1beta3.QueryProviderAttributesRequest' as const, + $type: "akash.audit.v1beta3.QueryProviderAttributesRequest" as const, - encode( - message: QueryProviderAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: QueryProviderAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.pagination !== undefined) { @@ -352,12 +291,8 @@ export const QueryProviderAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAttributesRequest(); while (reader.pos < end) { @@ -389,16 +324,14 @@ export const QueryProviderAttributesRequest = { fromJSON(object: any): QueryProviderAttributesRequest { return { $type: QueryProviderAttributesRequest.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryProviderAttributesRequest): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.pagination !== undefined) { @@ -407,59 +340,40 @@ export const QueryProviderAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryProviderAttributesRequest { + create(base?: DeepPartial): QueryProviderAttributesRequest { return QueryProviderAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderAttributesRequest { + fromPartial(object: DeepPartial): QueryProviderAttributesRequest { const message = createBaseQueryProviderAttributesRequest(); - message.owner = object.owner ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.owner = object.owner ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryProviderAttributesRequest.$type, - QueryProviderAttributesRequest, -); +messageTypeRegistry.set(QueryProviderAttributesRequest.$type, QueryProviderAttributesRequest); function createBaseQueryProviderAuditorRequest(): QueryProviderAuditorRequest { - return { - $type: 'akash.audit.v1beta3.QueryProviderAuditorRequest', - auditor: '', - owner: '', - }; + return { $type: "akash.audit.v1beta3.QueryProviderAuditorRequest", auditor: "", owner: "" }; } export const QueryProviderAuditorRequest = { - $type: 'akash.audit.v1beta3.QueryProviderAuditorRequest' as const, + $type: "akash.audit.v1beta3.QueryProviderAuditorRequest" as const, - encode( - message: QueryProviderAuditorRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryProviderAuditorRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderAuditorRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderAuditorRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderAuditorRequest(); while (reader.pos < end) { @@ -491,58 +405,44 @@ export const QueryProviderAuditorRequest = { fromJSON(object: any): QueryProviderAuditorRequest { return { $type: QueryProviderAuditorRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", }; }, toJSON(message: QueryProviderAuditorRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; }, - create( - base?: DeepPartial, - ): QueryProviderAuditorRequest { + create(base?: DeepPartial): QueryProviderAuditorRequest { return QueryProviderAuditorRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderAuditorRequest { + fromPartial(object: DeepPartial): QueryProviderAuditorRequest { const message = createBaseQueryProviderAuditorRequest(); - message.auditor = object.auditor ?? ''; - message.owner = object.owner ?? ''; + message.auditor = object.auditor ?? ""; + message.owner = object.owner ?? ""; return message; }, }; -messageTypeRegistry.set( - QueryProviderAuditorRequest.$type, - QueryProviderAuditorRequest, -); +messageTypeRegistry.set(QueryProviderAuditorRequest.$type, QueryProviderAuditorRequest); function createBaseQueryAuditorAttributesRequest(): QueryAuditorAttributesRequest { - return { - $type: 'akash.audit.v1beta3.QueryAuditorAttributesRequest', - auditor: '', - pagination: undefined, - }; + return { $type: "akash.audit.v1beta3.QueryAuditorAttributesRequest", auditor: "", pagination: undefined }; } export const QueryAuditorAttributesRequest = { - $type: 'akash.audit.v1beta3.QueryAuditorAttributesRequest' as const, + $type: "akash.audit.v1beta3.QueryAuditorAttributesRequest" as const, - encode( - message: QueryAuditorAttributesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.auditor !== '') { + encode(message: QueryAuditorAttributesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.auditor !== "") { writer.uint32(10).string(message.auditor); } if (message.pagination !== undefined) { @@ -551,12 +451,8 @@ export const QueryAuditorAttributesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAuditorAttributesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuditorAttributesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAuditorAttributesRequest(); while (reader.pos < end) { @@ -588,16 +484,14 @@ export const QueryAuditorAttributesRequest = { fromJSON(object: any): QueryAuditorAttributesRequest { return { $type: QueryAuditorAttributesRequest.$type, - auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + auditor: isSet(object.auditor) ? globalThis.String(object.auditor) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryAuditorAttributesRequest): unknown { const obj: any = {}; - if (message.auditor !== '') { + if (message.auditor !== "") { obj.auditor = message.auditor; } if (message.pagination !== undefined) { @@ -606,28 +500,20 @@ export const QueryAuditorAttributesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryAuditorAttributesRequest { + create(base?: DeepPartial): QueryAuditorAttributesRequest { return QueryAuditorAttributesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAuditorAttributesRequest { + fromPartial(object: DeepPartial): QueryAuditorAttributesRequest { const message = createBaseQueryAuditorAttributesRequest(); - message.auditor = object.auditor ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.auditor = object.auditor ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryAuditorAttributesRequest.$type, - QueryAuditorAttributesRequest, -); +messageTypeRegistry.set(QueryAuditorAttributesRequest.$type, QueryAuditorAttributesRequest); /** Query defines the gRPC querier service */ export interface Query { @@ -636,36 +522,28 @@ export interface Query { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest, - ): Promise; + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise; /** * ProviderAttributes queries all provider signed attributes * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAttributes( - request: QueryProviderAttributesRequest, - ): Promise; + ProviderAttributes(request: QueryProviderAttributesRequest): Promise; /** * ProviderAuditorAttributes queries provider signed attributes by specific auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest, - ): Promise; + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise; /** * AuditorAttributes queries all providers signed by this auditor * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - AuditorAttributes( - request: QueryAuditorAttributesRequest, - ): Promise; + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise; } -export const QueryServiceName = 'akash.audit.v1beta3.Query'; +export const QueryServiceName = "akash.audit.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -677,83 +555,42 @@ export class QueryClientImpl implements Query { this.ProviderAuditorAttributes = this.ProviderAuditorAttributes.bind(this); this.AuditorAttributes = this.AuditorAttributes.bind(this); } - AllProvidersAttributes( - request: QueryAllProvidersAttributesRequest, - ): Promise { + AllProvidersAttributes(request: QueryAllProvidersAttributesRequest): Promise { const data = QueryAllProvidersAttributesRequest.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'AllProvidersAttributes', - data, - ); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "AllProvidersAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - ProviderAttributes( - request: QueryProviderAttributesRequest, - ): Promise { + ProviderAttributes(request: QueryProviderAttributesRequest): Promise { const data = QueryProviderAttributesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'ProviderAttributes', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ProviderAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - ProviderAuditorAttributes( - request: QueryProviderAuditorRequest, - ): Promise { + ProviderAuditorAttributes(request: QueryProviderAuditorRequest): Promise { const data = QueryProviderAuditorRequest.encode(request).finish(); - const promise = this.rpc.request( - this.service, - 'ProviderAuditorAttributes', - data, - ); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ProviderAuditorAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } - AuditorAttributes( - request: QueryAuditorAttributesRequest, - ): Promise { + AuditorAttributes(request: QueryAuditorAttributesRequest): Promise { const data = QueryAuditorAttributesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'AuditorAttributes', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "AuditorAttributes", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta1/attribute.ts b/ts/src/generated/akash/base/v1beta1/attribute.ts index 32fdb805..029d1803 100644 --- a/ts/src/generated/akash/base/v1beta1/attribute.ts +++ b/ts/src/generated/akash/base/v1beta1/attribute.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Attribute represents key value pair */ export interface Attribute { - $type: 'akash.base.v1beta1.Attribute'; + $type: "akash.base.v1beta1.Attribute"; key: string; value: string; } @@ -17,7 +17,7 @@ export interface Attribute { * this behaviour to be discussed */ export interface SignedBy { - $type: 'akash.base.v1beta1.SignedBy'; + $type: "akash.base.v1beta1.SignedBy"; /** all_of all keys in this list must have signed attributes */ allOf: string[]; /** any_of at least of of the keys from the list must have signed attributes */ @@ -26,36 +26,34 @@ export interface SignedBy { /** PlacementRequirements */ export interface PlacementRequirements { - $type: 'akash.base.v1beta1.PlacementRequirements'; + $type: "akash.base.v1beta1.PlacementRequirements"; /** SignedBy list of keys that tenants expect to have signatures from */ - signedBy: SignedBy | undefined; + signedBy: + | SignedBy + | undefined; /** Attribute list of attributes tenant expects from the provider */ attributes: Attribute[]; } function createBaseAttribute(): Attribute { - return { $type: 'akash.base.v1beta1.Attribute', key: '', value: '' }; + return { $type: "akash.base.v1beta1.Attribute", key: "", value: "" }; } export const Attribute = { - $type: 'akash.base.v1beta1.Attribute' as const, + $type: "akash.base.v1beta1.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== '') { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { writer.uint32(10).string(message.key); } - if (message.value !== '') { + if (message.value !== "") { writer.uint32(18).string(message.value); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Attribute { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttribute(); while (reader.pos < end) { @@ -87,17 +85,17 @@ export const Attribute = { fromJSON(object: any): Attribute { return { $type: Attribute.$type, - key: isSet(object.key) ? globalThis.String(object.key) : '', - value: isSet(object.value) ? globalThis.String(object.value) : '', + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object.value) ? globalThis.String(object.value) : "", }; }, toJSON(message: Attribute): unknown { const obj: any = {}; - if (message.key !== '') { + if (message.key !== "") { obj.key = message.key; } - if (message.value !== '') { + if (message.value !== "") { obj.value = message.value; } return obj; @@ -108,8 +106,8 @@ export const Attribute = { }, fromPartial(object: DeepPartial): Attribute { const message = createBaseAttribute(); - message.key = object.key ?? ''; - message.value = object.value ?? ''; + message.key = object.key ?? ""; + message.value = object.value ?? ""; return message; }, }; @@ -117,16 +115,13 @@ export const Attribute = { messageTypeRegistry.set(Attribute.$type, Attribute); function createBaseSignedBy(): SignedBy { - return { $type: 'akash.base.v1beta1.SignedBy', allOf: [], anyOf: [] }; + return { $type: "akash.base.v1beta1.SignedBy", allOf: [], anyOf: [] }; } export const SignedBy = { - $type: 'akash.base.v1beta1.SignedBy' as const, + $type: "akash.base.v1beta1.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -137,8 +132,7 @@ export const SignedBy = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SignedBy { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignedBy(); while (reader.pos < end) { @@ -170,12 +164,8 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: globalThis.Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => globalThis.String(e)) - : [], - anyOf: globalThis.Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => globalThis.String(e)) - : [], + allOf: globalThis.Array.isArray(object?.allOf) ? object.allOf.map((e: any) => globalThis.String(e)) : [], + anyOf: globalThis.Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => globalThis.String(e)) : [], }; }, @@ -204,20 +194,13 @@ export const SignedBy = { messageTypeRegistry.set(SignedBy.$type, SignedBy); function createBasePlacementRequirements(): PlacementRequirements { - return { - $type: 'akash.base.v1beta1.PlacementRequirements', - signedBy: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta1.PlacementRequirements", signedBy: undefined, attributes: [] }; } export const PlacementRequirements = { - $type: 'akash.base.v1beta1.PlacementRequirements' as const, + $type: "akash.base.v1beta1.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -227,12 +210,8 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): PlacementRequirements { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); while (reader.pos < end) { @@ -264,9 +243,7 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -287,42 +264,25 @@ export const PlacementRequirements = { create(base?: DeepPartial): PlacementRequirements { return PlacementRequirements.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): PlacementRequirements { + fromPartial(object: DeepPartial): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = (object.signedBy !== undefined && object.signedBy !== null) + ? SignedBy.fromPartial(object.signedBy) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta1/endpoint.ts b/ts/src/generated/akash/base/v1beta1/endpoint.ts index d9e64585..f28432d6 100644 --- a/ts/src/generated/akash/base/v1beta1/endpoint.ts +++ b/ts/src/generated/akash/base/v1beta1/endpoint.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Endpoint describes a publicly accessible IP service */ export interface Endpoint { - $type: 'akash.base.v1beta1.Endpoint'; + $type: "akash.base.v1beta1.Endpoint"; kind: Endpoint_Kind; } @@ -21,13 +21,13 @@ export enum Endpoint_Kind { export function endpoint_KindFromJSON(object: any): Endpoint_Kind { switch (object) { case 0: - case 'SHARED_HTTP': + case "SHARED_HTTP": return Endpoint_Kind.SHARED_HTTP; case 1: - case 'RANDOM_PORT': + case "RANDOM_PORT": return Endpoint_Kind.RANDOM_PORT; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Endpoint_Kind.UNRECOGNIZED; } @@ -36,26 +36,23 @@ export function endpoint_KindFromJSON(object: any): Endpoint_Kind { export function endpoint_KindToJSON(object: Endpoint_Kind): string { switch (object) { case Endpoint_Kind.SHARED_HTTP: - return 'SHARED_HTTP'; + return "SHARED_HTTP"; case Endpoint_Kind.RANDOM_PORT: - return 'RANDOM_PORT'; + return "RANDOM_PORT"; case Endpoint_Kind.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseEndpoint(): Endpoint { - return { $type: 'akash.base.v1beta1.Endpoint', kind: 0 }; + return { $type: "akash.base.v1beta1.Endpoint", kind: 0 }; } export const Endpoint = { - $type: 'akash.base.v1beta1.Endpoint' as const, + $type: "akash.base.v1beta1.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -63,8 +60,7 @@ export const Endpoint = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Endpoint { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEndpoint(); while (reader.pos < end) { @@ -87,10 +83,7 @@ export const Endpoint = { }, fromJSON(object: any): Endpoint { - return { - $type: Endpoint.$type, - kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, - }; + return { $type: Endpoint.$type, kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0 }; }, toJSON(message: Endpoint): unknown { @@ -113,26 +106,13 @@ export const Endpoint = { messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta1/resource.ts b/ts/src/generated/akash/base/v1beta1/resource.ts index 05f89531..d6d67a14 100644 --- a/ts/src/generated/akash/base/v1beta1/resource.ts +++ b/ts/src/generated/akash/base/v1beta1/resource.ts @@ -1,28 +1,28 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { Endpoint } from './endpoint'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { Endpoint } from "./endpoint"; +import { ResourceValue } from "./resourcevalue"; /** CPU stores resource units and cpu config attributes */ export interface CPU { - $type: 'akash.base.v1beta1.CPU'; + $type: "akash.base.v1beta1.CPU"; units: ResourceValue | undefined; attributes: Attribute[]; } /** Memory stores resource quantity and memory attributes */ export interface Memory { - $type: 'akash.base.v1beta1.Memory'; + $type: "akash.base.v1beta1.Memory"; quantity: ResourceValue | undefined; attributes: Attribute[]; } /** Storage stores resource quantity and storage attributes */ export interface Storage { - $type: 'akash.base.v1beta1.Storage'; + $type: "akash.base.v1beta1.Storage"; quantity: ResourceValue | undefined; attributes: Attribute[]; } @@ -32,7 +32,7 @@ export interface Storage { * if field is nil resource is not present in the given data-structure */ export interface ResourceUnits { - $type: 'akash.base.v1beta1.ResourceUnits'; + $type: "akash.base.v1beta1.ResourceUnits"; cpu: CPU | undefined; memory: Memory | undefined; storage: Storage | undefined; @@ -40,11 +40,11 @@ export interface ResourceUnits { } function createBaseCPU(): CPU { - return { $type: 'akash.base.v1beta1.CPU', units: undefined, attributes: [] }; + return { $type: "akash.base.v1beta1.CPU", units: undefined, attributes: [] }; } export const CPU = { - $type: 'akash.base.v1beta1.CPU' as const, + $type: "akash.base.v1beta1.CPU" as const, encode(message: CPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.units !== undefined) { @@ -57,8 +57,7 @@ export const CPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCPU(); while (reader.pos < end) { @@ -90,9 +89,7 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -115,12 +112,10 @@ export const CPU = { }, fromPartial(object: DeepPartial): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = (object.units !== undefined && object.units !== null) + ? ResourceValue.fromPartial(object.units) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -128,20 +123,13 @@ export const CPU = { messageTypeRegistry.set(CPU.$type, CPU); function createBaseMemory(): Memory { - return { - $type: 'akash.base.v1beta1.Memory', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta1.Memory", quantity: undefined, attributes: [] }; } export const Memory = { - $type: 'akash.base.v1beta1.Memory' as const, + $type: "akash.base.v1beta1.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -152,8 +140,7 @@ export const Memory = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Memory { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMemory(); while (reader.pos < end) { @@ -185,9 +172,7 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -210,12 +195,10 @@ export const Memory = { }, fromPartial(object: DeepPartial): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -223,20 +206,13 @@ export const Memory = { messageTypeRegistry.set(Memory.$type, Memory); function createBaseStorage(): Storage { - return { - $type: 'akash.base.v1beta1.Storage', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta1.Storage", quantity: undefined, attributes: [] }; } export const Storage = { - $type: 'akash.base.v1beta1.Storage' as const, + $type: "akash.base.v1beta1.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -247,8 +223,7 @@ export const Storage = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Storage { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorage(); while (reader.pos < end) { @@ -280,9 +255,7 @@ export const Storage = { fromJSON(object: any): Storage { return { $type: Storage.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -305,12 +278,10 @@ export const Storage = { }, fromPartial(object: DeepPartial): Storage { const message = createBaseStorage(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -319,7 +290,7 @@ messageTypeRegistry.set(Storage.$type, Storage); function createBaseResourceUnits(): ResourceUnits { return { - $type: 'akash.base.v1beta1.ResourceUnits', + $type: "akash.base.v1beta1.ResourceUnits", cpu: undefined, memory: undefined, storage: undefined, @@ -328,12 +299,9 @@ function createBaseResourceUnits(): ResourceUnits { } export const ResourceUnits = { - $type: 'akash.base.v1beta1.ResourceUnits' as const, + $type: "akash.base.v1beta1.ResourceUnits" as const, - encode( - message: ResourceUnits, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceUnits, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -350,8 +318,7 @@ export const ResourceUnits = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceUnits { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceUnits(); while (reader.pos < end) { @@ -399,9 +366,7 @@ export const ResourceUnits = { $type: ResourceUnits.$type, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: isSet(object.storage) - ? Storage.fromJSON(object.storage) - : undefined, + storage: isSet(object.storage) ? Storage.fromJSON(object.storage) : undefined, endpoints: globalThis.Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [], @@ -430,46 +395,27 @@ export const ResourceUnits = { }, fromPartial(object: DeepPartial): ResourceUnits { const message = createBaseResourceUnits(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.storage = - object.storage !== undefined && object.storage !== null - ? Storage.fromPartial(object.storage) - : undefined; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.cpu = (object.cpu !== undefined && object.cpu !== null) ? CPU.fromPartial(object.cpu) : undefined; + message.memory = (object.memory !== undefined && object.memory !== null) + ? Memory.fromPartial(object.memory) + : undefined; + message.storage = (object.storage !== undefined && object.storage !== null) + ? Storage.fromPartial(object.storage) + : undefined; + message.endpoints = object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(ResourceUnits.$type, ResourceUnits); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta1/resourcevalue.ts b/ts/src/generated/akash/base/v1beta1/resourcevalue.ts index fcdda9d1..42e8559e 100644 --- a/ts/src/generated/akash/base/v1beta1/resourcevalue.ts +++ b/ts/src/generated/akash/base/v1beta1/resourcevalue.ts @@ -1,25 +1,22 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Unit stores cpu, memory and storage metrics */ export interface ResourceValue { - $type: 'akash.base.v1beta1.ResourceValue'; + $type: "akash.base.v1beta1.ResourceValue"; val: Uint8Array; } function createBaseResourceValue(): ResourceValue { - return { $type: 'akash.base.v1beta1.ResourceValue', val: new Uint8Array(0) }; + return { $type: "akash.base.v1beta1.ResourceValue", val: new Uint8Array(0) }; } export const ResourceValue = { - $type: 'akash.base.v1beta1.ResourceValue' as const, + $type: "akash.base.v1beta1.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -27,8 +24,7 @@ export const ResourceValue = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceValue { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceValue(); while (reader.pos < end) { @@ -51,10 +47,7 @@ export const ResourceValue = { }, fromJSON(object: any): ResourceValue { - return { - $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0), - }; + return { $type: ResourceValue.$type, val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0) }; }, toJSON(message: ResourceValue): unknown { @@ -79,7 +72,7 @@ messageTypeRegistry.set(ResourceValue.$type, ResourceValue); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -92,36 +85,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta2/attribute.ts b/ts/src/generated/akash/base/v1beta2/attribute.ts index ec545f92..d62582c9 100644 --- a/ts/src/generated/akash/base/v1beta2/attribute.ts +++ b/ts/src/generated/akash/base/v1beta2/attribute.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Attribute represents key value pair */ export interface Attribute { - $type: 'akash.base.v1beta2.Attribute'; + $type: "akash.base.v1beta2.Attribute"; key: string; value: string; } @@ -17,7 +17,7 @@ export interface Attribute { * this behaviour to be discussed */ export interface SignedBy { - $type: 'akash.base.v1beta2.SignedBy'; + $type: "akash.base.v1beta2.SignedBy"; /** all_of all keys in this list must have signed attributes */ allOf: string[]; /** any_of at least of of the keys from the list must have signed attributes */ @@ -26,36 +26,34 @@ export interface SignedBy { /** PlacementRequirements */ export interface PlacementRequirements { - $type: 'akash.base.v1beta2.PlacementRequirements'; + $type: "akash.base.v1beta2.PlacementRequirements"; /** SignedBy list of keys that tenants expect to have signatures from */ - signedBy: SignedBy | undefined; + signedBy: + | SignedBy + | undefined; /** Attribute list of attributes tenant expects from the provider */ attributes: Attribute[]; } function createBaseAttribute(): Attribute { - return { $type: 'akash.base.v1beta2.Attribute', key: '', value: '' }; + return { $type: "akash.base.v1beta2.Attribute", key: "", value: "" }; } export const Attribute = { - $type: 'akash.base.v1beta2.Attribute' as const, + $type: "akash.base.v1beta2.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== '') { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { writer.uint32(10).string(message.key); } - if (message.value !== '') { + if (message.value !== "") { writer.uint32(18).string(message.value); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Attribute { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttribute(); while (reader.pos < end) { @@ -87,17 +85,17 @@ export const Attribute = { fromJSON(object: any): Attribute { return { $type: Attribute.$type, - key: isSet(object.key) ? globalThis.String(object.key) : '', - value: isSet(object.value) ? globalThis.String(object.value) : '', + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object.value) ? globalThis.String(object.value) : "", }; }, toJSON(message: Attribute): unknown { const obj: any = {}; - if (message.key !== '') { + if (message.key !== "") { obj.key = message.key; } - if (message.value !== '') { + if (message.value !== "") { obj.value = message.value; } return obj; @@ -108,8 +106,8 @@ export const Attribute = { }, fromPartial(object: DeepPartial): Attribute { const message = createBaseAttribute(); - message.key = object.key ?? ''; - message.value = object.value ?? ''; + message.key = object.key ?? ""; + message.value = object.value ?? ""; return message; }, }; @@ -117,16 +115,13 @@ export const Attribute = { messageTypeRegistry.set(Attribute.$type, Attribute); function createBaseSignedBy(): SignedBy { - return { $type: 'akash.base.v1beta2.SignedBy', allOf: [], anyOf: [] }; + return { $type: "akash.base.v1beta2.SignedBy", allOf: [], anyOf: [] }; } export const SignedBy = { - $type: 'akash.base.v1beta2.SignedBy' as const, + $type: "akash.base.v1beta2.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -137,8 +132,7 @@ export const SignedBy = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SignedBy { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignedBy(); while (reader.pos < end) { @@ -170,12 +164,8 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: globalThis.Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => globalThis.String(e)) - : [], - anyOf: globalThis.Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => globalThis.String(e)) - : [], + allOf: globalThis.Array.isArray(object?.allOf) ? object.allOf.map((e: any) => globalThis.String(e)) : [], + anyOf: globalThis.Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => globalThis.String(e)) : [], }; }, @@ -204,20 +194,13 @@ export const SignedBy = { messageTypeRegistry.set(SignedBy.$type, SignedBy); function createBasePlacementRequirements(): PlacementRequirements { - return { - $type: 'akash.base.v1beta2.PlacementRequirements', - signedBy: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta2.PlacementRequirements", signedBy: undefined, attributes: [] }; } export const PlacementRequirements = { - $type: 'akash.base.v1beta2.PlacementRequirements' as const, + $type: "akash.base.v1beta2.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -227,12 +210,8 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): PlacementRequirements { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); while (reader.pos < end) { @@ -264,9 +243,7 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -287,42 +264,25 @@ export const PlacementRequirements = { create(base?: DeepPartial): PlacementRequirements { return PlacementRequirements.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): PlacementRequirements { + fromPartial(object: DeepPartial): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = (object.signedBy !== undefined && object.signedBy !== null) + ? SignedBy.fromPartial(object.signedBy) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta2/endpoint.ts b/ts/src/generated/akash/base/v1beta2/endpoint.ts index 84818acf..44653a27 100644 --- a/ts/src/generated/akash/base/v1beta2/endpoint.ts +++ b/ts/src/generated/akash/base/v1beta2/endpoint.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Endpoint describes a publicly accessible IP service */ export interface Endpoint { - $type: 'akash.base.v1beta2.Endpoint'; + $type: "akash.base.v1beta2.Endpoint"; kind: Endpoint_Kind; sequenceNumber: number; } @@ -24,16 +24,16 @@ export enum Endpoint_Kind { export function endpoint_KindFromJSON(object: any): Endpoint_Kind { switch (object) { case 0: - case 'SHARED_HTTP': + case "SHARED_HTTP": return Endpoint_Kind.SHARED_HTTP; case 1: - case 'RANDOM_PORT': + case "RANDOM_PORT": return Endpoint_Kind.RANDOM_PORT; case 2: - case 'LEASED_IP': + case "LEASED_IP": return Endpoint_Kind.LEASED_IP; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Endpoint_Kind.UNRECOGNIZED; } @@ -42,28 +42,25 @@ export function endpoint_KindFromJSON(object: any): Endpoint_Kind { export function endpoint_KindToJSON(object: Endpoint_Kind): string { switch (object) { case Endpoint_Kind.SHARED_HTTP: - return 'SHARED_HTTP'; + return "SHARED_HTTP"; case Endpoint_Kind.RANDOM_PORT: - return 'RANDOM_PORT'; + return "RANDOM_PORT"; case Endpoint_Kind.LEASED_IP: - return 'LEASED_IP'; + return "LEASED_IP"; case Endpoint_Kind.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseEndpoint(): Endpoint { - return { $type: 'akash.base.v1beta2.Endpoint', kind: 0, sequenceNumber: 0 }; + return { $type: "akash.base.v1beta2.Endpoint", kind: 0, sequenceNumber: 0 }; } export const Endpoint = { - $type: 'akash.base.v1beta2.Endpoint' as const, + $type: "akash.base.v1beta2.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -74,8 +71,7 @@ export const Endpoint = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Endpoint { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEndpoint(); while (reader.pos < end) { @@ -108,9 +104,7 @@ export const Endpoint = { return { $type: Endpoint.$type, kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, - sequenceNumber: isSet(object.sequenceNumber) - ? globalThis.Number(object.sequenceNumber) - : 0, + sequenceNumber: isSet(object.sequenceNumber) ? globalThis.Number(object.sequenceNumber) : 0, }; }, @@ -138,26 +132,13 @@ export const Endpoint = { messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta2/resource.ts b/ts/src/generated/akash/base/v1beta2/resource.ts index 3365d44b..9efec938 100644 --- a/ts/src/generated/akash/base/v1beta2/resource.ts +++ b/ts/src/generated/akash/base/v1beta2/resource.ts @@ -1,38 +1,38 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { ResourceValue } from "./resourcevalue"; /** CPU stores resource units and cpu config attributes */ export interface CPU { - $type: 'akash.base.v1beta2.CPU'; + $type: "akash.base.v1beta2.CPU"; units: ResourceValue | undefined; attributes: Attribute[]; } /** Memory stores resource quantity and memory attributes */ export interface Memory { - $type: 'akash.base.v1beta2.Memory'; + $type: "akash.base.v1beta2.Memory"; quantity: ResourceValue | undefined; attributes: Attribute[]; } /** Storage stores resource quantity and storage attributes */ export interface Storage { - $type: 'akash.base.v1beta2.Storage'; + $type: "akash.base.v1beta2.Storage"; name: string; quantity: ResourceValue | undefined; attributes: Attribute[]; } function createBaseCPU(): CPU { - return { $type: 'akash.base.v1beta2.CPU', units: undefined, attributes: [] }; + return { $type: "akash.base.v1beta2.CPU", units: undefined, attributes: [] }; } export const CPU = { - $type: 'akash.base.v1beta2.CPU' as const, + $type: "akash.base.v1beta2.CPU" as const, encode(message: CPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.units !== undefined) { @@ -45,8 +45,7 @@ export const CPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCPU(); while (reader.pos < end) { @@ -78,9 +77,7 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -103,12 +100,10 @@ export const CPU = { }, fromPartial(object: DeepPartial): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = (object.units !== undefined && object.units !== null) + ? ResourceValue.fromPartial(object.units) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -116,20 +111,13 @@ export const CPU = { messageTypeRegistry.set(CPU.$type, CPU); function createBaseMemory(): Memory { - return { - $type: 'akash.base.v1beta2.Memory', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta2.Memory", quantity: undefined, attributes: [] }; } export const Memory = { - $type: 'akash.base.v1beta2.Memory' as const, + $type: "akash.base.v1beta2.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -140,8 +128,7 @@ export const Memory = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Memory { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMemory(); while (reader.pos < end) { @@ -173,9 +160,7 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -198,12 +183,10 @@ export const Memory = { }, fromPartial(object: DeepPartial): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; @@ -211,22 +194,14 @@ export const Memory = { messageTypeRegistry.set(Memory.$type, Memory); function createBaseStorage(): Storage { - return { - $type: 'akash.base.v1beta2.Storage', - name: '', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta2.Storage", name: "", quantity: undefined, attributes: [] }; } export const Storage = { - $type: 'akash.base.v1beta2.Storage' as const, + $type: "akash.base.v1beta2.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.quantity !== undefined) { @@ -239,8 +214,7 @@ export const Storage = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Storage { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorage(); while (reader.pos < end) { @@ -279,10 +253,8 @@ export const Storage = { fromJSON(object: any): Storage { return { $type: Storage.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -291,7 +263,7 @@ export const Storage = { toJSON(message: Storage): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.quantity !== undefined) { @@ -308,39 +280,24 @@ export const Storage = { }, fromPartial(object: DeepPartial): Storage { const message = createBaseStorage(); - message.name = object.name ?? ''; - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Storage.$type, Storage); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta2/resourceunits.ts b/ts/src/generated/akash/base/v1beta2/resourceunits.ts index 46decf00..83c044cd 100644 --- a/ts/src/generated/akash/base/v1beta2/resourceunits.ts +++ b/ts/src/generated/akash/base/v1beta2/resourceunits.ts @@ -1,16 +1,16 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Endpoint } from './endpoint'; -import { CPU, Memory, Storage } from './resource'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Endpoint } from "./endpoint"; +import { CPU, Memory, Storage } from "./resource"; /** * ResourceUnits describes all available resources types for deployment/node etc * if field is nil resource is not present in the given data-structure */ export interface ResourceUnits { - $type: 'akash.base.v1beta2.ResourceUnits'; + $type: "akash.base.v1beta2.ResourceUnits"; cpu: CPU | undefined; memory: Memory | undefined; storage: Storage[]; @@ -18,22 +18,13 @@ export interface ResourceUnits { } function createBaseResourceUnits(): ResourceUnits { - return { - $type: 'akash.base.v1beta2.ResourceUnits', - cpu: undefined, - memory: undefined, - storage: [], - endpoints: [], - }; + return { $type: "akash.base.v1beta2.ResourceUnits", cpu: undefined, memory: undefined, storage: [], endpoints: [] }; } export const ResourceUnits = { - $type: 'akash.base.v1beta2.ResourceUnits' as const, + $type: "akash.base.v1beta2.ResourceUnits" as const, - encode( - message: ResourceUnits, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceUnits, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -50,8 +41,7 @@ export const ResourceUnits = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceUnits { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceUnits(); while (reader.pos < end) { @@ -99,9 +89,7 @@ export const ResourceUnits = { $type: ResourceUnits.$type, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: globalThis.Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], + storage: globalThis.Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], endpoints: globalThis.Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) : [], @@ -130,43 +118,25 @@ export const ResourceUnits = { }, fromPartial(object: DeepPartial): ResourceUnits { const message = createBaseResourceUnits(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; + message.cpu = (object.cpu !== undefined && object.cpu !== null) ? CPU.fromPartial(object.cpu) : undefined; + message.memory = (object.memory !== undefined && object.memory !== null) + ? Memory.fromPartial(object.memory) + : undefined; message.storage = object.storage?.map((e) => Storage.fromPartial(e)) || []; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.endpoints = object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(ResourceUnits.$type, ResourceUnits); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta2/resourcevalue.ts b/ts/src/generated/akash/base/v1beta2/resourcevalue.ts index 9d457f32..0a41cff0 100644 --- a/ts/src/generated/akash/base/v1beta2/resourcevalue.ts +++ b/ts/src/generated/akash/base/v1beta2/resourcevalue.ts @@ -1,25 +1,22 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Unit stores cpu, memory and storage metrics */ export interface ResourceValue { - $type: 'akash.base.v1beta2.ResourceValue'; + $type: "akash.base.v1beta2.ResourceValue"; val: Uint8Array; } function createBaseResourceValue(): ResourceValue { - return { $type: 'akash.base.v1beta2.ResourceValue', val: new Uint8Array(0) }; + return { $type: "akash.base.v1beta2.ResourceValue", val: new Uint8Array(0) }; } export const ResourceValue = { - $type: 'akash.base.v1beta2.ResourceValue' as const, + $type: "akash.base.v1beta2.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -27,8 +24,7 @@ export const ResourceValue = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceValue { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceValue(); while (reader.pos < end) { @@ -51,10 +47,7 @@ export const ResourceValue = { }, fromJSON(object: any): ResourceValue { - return { - $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0), - }; + return { $type: ResourceValue.$type, val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0) }; }, toJSON(message: ResourceValue): unknown { @@ -79,7 +72,7 @@ messageTypeRegistry.set(ResourceValue.$type, ResourceValue); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -92,36 +85,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/attribute.ts b/ts/src/generated/akash/base/v1beta3/attribute.ts index aba8cc73..7feb35d1 100644 --- a/ts/src/generated/akash/base/v1beta3/attribute.ts +++ b/ts/src/generated/akash/base/v1beta3/attribute.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Attribute represents key value pair */ export interface Attribute { - $type: 'akash.base.v1beta3.Attribute'; + $type: "akash.base.v1beta3.Attribute"; key: string; value: string; } @@ -17,7 +17,7 @@ export interface Attribute { * this behaviour to be discussed */ export interface SignedBy { - $type: 'akash.base.v1beta3.SignedBy'; + $type: "akash.base.v1beta3.SignedBy"; /** all_of all keys in this list must have signed attributes */ allOf: string[]; /** any_of at least of of the keys from the list must have signed attributes */ @@ -26,36 +26,34 @@ export interface SignedBy { /** PlacementRequirements */ export interface PlacementRequirements { - $type: 'akash.base.v1beta3.PlacementRequirements'; + $type: "akash.base.v1beta3.PlacementRequirements"; /** SignedBy list of keys that tenants expect to have signatures from */ - signedBy: SignedBy | undefined; + signedBy: + | SignedBy + | undefined; /** Attribute list of attributes tenant expects from the provider */ attributes: Attribute[]; } function createBaseAttribute(): Attribute { - return { $type: 'akash.base.v1beta3.Attribute', key: '', value: '' }; + return { $type: "akash.base.v1beta3.Attribute", key: "", value: "" }; } export const Attribute = { - $type: 'akash.base.v1beta3.Attribute' as const, + $type: "akash.base.v1beta3.Attribute" as const, - encode( - message: Attribute, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== '') { + encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { writer.uint32(10).string(message.key); } - if (message.value !== '') { + if (message.value !== "") { writer.uint32(18).string(message.value); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Attribute { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAttribute(); while (reader.pos < end) { @@ -87,17 +85,17 @@ export const Attribute = { fromJSON(object: any): Attribute { return { $type: Attribute.$type, - key: isSet(object.key) ? globalThis.String(object.key) : '', - value: isSet(object.value) ? globalThis.String(object.value) : '', + key: isSet(object.key) ? globalThis.String(object.key) : "", + value: isSet(object.value) ? globalThis.String(object.value) : "", }; }, toJSON(message: Attribute): unknown { const obj: any = {}; - if (message.key !== '') { + if (message.key !== "") { obj.key = message.key; } - if (message.value !== '') { + if (message.value !== "") { obj.value = message.value; } return obj; @@ -108,8 +106,8 @@ export const Attribute = { }, fromPartial(object: DeepPartial): Attribute { const message = createBaseAttribute(); - message.key = object.key ?? ''; - message.value = object.value ?? ''; + message.key = object.key ?? ""; + message.value = object.value ?? ""; return message; }, }; @@ -117,16 +115,13 @@ export const Attribute = { messageTypeRegistry.set(Attribute.$type, Attribute); function createBaseSignedBy(): SignedBy { - return { $type: 'akash.base.v1beta3.SignedBy', allOf: [], anyOf: [] }; + return { $type: "akash.base.v1beta3.SignedBy", allOf: [], anyOf: [] }; } export const SignedBy = { - $type: 'akash.base.v1beta3.SignedBy' as const, + $type: "akash.base.v1beta3.SignedBy" as const, - encode( - message: SignedBy, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SignedBy, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.allOf) { writer.uint32(10).string(v!); } @@ -137,8 +132,7 @@ export const SignedBy = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SignedBy { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSignedBy(); while (reader.pos < end) { @@ -170,12 +164,8 @@ export const SignedBy = { fromJSON(object: any): SignedBy { return { $type: SignedBy.$type, - allOf: globalThis.Array.isArray(object?.allOf) - ? object.allOf.map((e: any) => globalThis.String(e)) - : [], - anyOf: globalThis.Array.isArray(object?.anyOf) - ? object.anyOf.map((e: any) => globalThis.String(e)) - : [], + allOf: globalThis.Array.isArray(object?.allOf) ? object.allOf.map((e: any) => globalThis.String(e)) : [], + anyOf: globalThis.Array.isArray(object?.anyOf) ? object.anyOf.map((e: any) => globalThis.String(e)) : [], }; }, @@ -204,20 +194,13 @@ export const SignedBy = { messageTypeRegistry.set(SignedBy.$type, SignedBy); function createBasePlacementRequirements(): PlacementRequirements { - return { - $type: 'akash.base.v1beta3.PlacementRequirements', - signedBy: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta3.PlacementRequirements", signedBy: undefined, attributes: [] }; } export const PlacementRequirements = { - $type: 'akash.base.v1beta3.PlacementRequirements' as const, + $type: "akash.base.v1beta3.PlacementRequirements" as const, - encode( - message: PlacementRequirements, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: PlacementRequirements, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.signedBy !== undefined) { SignedBy.encode(message.signedBy, writer.uint32(10).fork()).ldelim(); } @@ -227,12 +210,8 @@ export const PlacementRequirements = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): PlacementRequirements { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): PlacementRequirements { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePlacementRequirements(); while (reader.pos < end) { @@ -264,9 +243,7 @@ export const PlacementRequirements = { fromJSON(object: any): PlacementRequirements { return { $type: PlacementRequirements.$type, - signedBy: isSet(object.signedBy) - ? SignedBy.fromJSON(object.signedBy) - : undefined, + signedBy: isSet(object.signedBy) ? SignedBy.fromJSON(object.signedBy) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -287,42 +264,25 @@ export const PlacementRequirements = { create(base?: DeepPartial): PlacementRequirements { return PlacementRequirements.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): PlacementRequirements { + fromPartial(object: DeepPartial): PlacementRequirements { const message = createBasePlacementRequirements(); - message.signedBy = - object.signedBy !== undefined && object.signedBy !== null - ? SignedBy.fromPartial(object.signedBy) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.signedBy = (object.signedBy !== undefined && object.signedBy !== null) + ? SignedBy.fromPartial(object.signedBy) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(PlacementRequirements.$type, PlacementRequirements); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/cpu.ts b/ts/src/generated/akash/base/v1beta3/cpu.ts index 842a3575..3635f2b7 100644 --- a/ts/src/generated/akash/base/v1beta3/cpu.ts +++ b/ts/src/generated/akash/base/v1beta3/cpu.ts @@ -1,23 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { ResourceValue } from "./resourcevalue"; /** CPU stores resource units and cpu config attributes */ export interface CPU { - $type: 'akash.base.v1beta3.CPU'; + $type: "akash.base.v1beta3.CPU"; units: ResourceValue | undefined; attributes: Attribute[]; } function createBaseCPU(): CPU { - return { $type: 'akash.base.v1beta3.CPU', units: undefined, attributes: [] }; + return { $type: "akash.base.v1beta3.CPU", units: undefined, attributes: [] }; } export const CPU = { - $type: 'akash.base.v1beta3.CPU' as const, + $type: "akash.base.v1beta3.CPU" as const, encode(message: CPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.units !== undefined) { @@ -30,8 +30,7 @@ export const CPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCPU(); while (reader.pos < end) { @@ -63,9 +62,7 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -88,38 +85,23 @@ export const CPU = { }, fromPartial(object: DeepPartial): CPU { const message = createBaseCPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = (object.units !== undefined && object.units !== null) + ? ResourceValue.fromPartial(object.units) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(CPU.$type, CPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/endpoint.ts b/ts/src/generated/akash/base/v1beta3/endpoint.ts index 3f405e43..21fd102e 100644 --- a/ts/src/generated/akash/base/v1beta3/endpoint.ts +++ b/ts/src/generated/akash/base/v1beta3/endpoint.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Endpoint describes a publicly accessible IP service */ export interface Endpoint { - $type: 'akash.base.v1beta3.Endpoint'; + $type: "akash.base.v1beta3.Endpoint"; kind: Endpoint_Kind; sequenceNumber: number; } @@ -24,16 +24,16 @@ export enum Endpoint_Kind { export function endpoint_KindFromJSON(object: any): Endpoint_Kind { switch (object) { case 0: - case 'SHARED_HTTP': + case "SHARED_HTTP": return Endpoint_Kind.SHARED_HTTP; case 1: - case 'RANDOM_PORT': + case "RANDOM_PORT": return Endpoint_Kind.RANDOM_PORT; case 2: - case 'LEASED_IP': + case "LEASED_IP": return Endpoint_Kind.LEASED_IP; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Endpoint_Kind.UNRECOGNIZED; } @@ -42,28 +42,25 @@ export function endpoint_KindFromJSON(object: any): Endpoint_Kind { export function endpoint_KindToJSON(object: Endpoint_Kind): string { switch (object) { case Endpoint_Kind.SHARED_HTTP: - return 'SHARED_HTTP'; + return "SHARED_HTTP"; case Endpoint_Kind.RANDOM_PORT: - return 'RANDOM_PORT'; + return "RANDOM_PORT"; case Endpoint_Kind.LEASED_IP: - return 'LEASED_IP'; + return "LEASED_IP"; case Endpoint_Kind.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseEndpoint(): Endpoint { - return { $type: 'akash.base.v1beta3.Endpoint', kind: 0, sequenceNumber: 0 }; + return { $type: "akash.base.v1beta3.Endpoint", kind: 0, sequenceNumber: 0 }; } export const Endpoint = { - $type: 'akash.base.v1beta3.Endpoint' as const, + $type: "akash.base.v1beta3.Endpoint" as const, - encode( - message: Endpoint, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Endpoint, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.kind !== 0) { writer.uint32(8).int32(message.kind); } @@ -74,8 +71,7 @@ export const Endpoint = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Endpoint { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEndpoint(); while (reader.pos < end) { @@ -108,9 +104,7 @@ export const Endpoint = { return { $type: Endpoint.$type, kind: isSet(object.kind) ? endpoint_KindFromJSON(object.kind) : 0, - sequenceNumber: isSet(object.sequenceNumber) - ? globalThis.Number(object.sequenceNumber) - : 0, + sequenceNumber: isSet(object.sequenceNumber) ? globalThis.Number(object.sequenceNumber) : 0, }; }, @@ -138,26 +132,13 @@ export const Endpoint = { messageTypeRegistry.set(Endpoint.$type, Endpoint); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/gpu.ts b/ts/src/generated/akash/base/v1beta3/gpu.ts index 38050ddb..1a7477f9 100644 --- a/ts/src/generated/akash/base/v1beta3/gpu.ts +++ b/ts/src/generated/akash/base/v1beta3/gpu.ts @@ -1,23 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { ResourceValue } from "./resourcevalue"; /** GPU stores resource units and cpu config attributes */ export interface GPU { - $type: 'akash.base.v1beta3.GPU'; + $type: "akash.base.v1beta3.GPU"; units: ResourceValue | undefined; attributes: Attribute[]; } function createBaseGPU(): GPU { - return { $type: 'akash.base.v1beta3.GPU', units: undefined, attributes: [] }; + return { $type: "akash.base.v1beta3.GPU", units: undefined, attributes: [] }; } export const GPU = { - $type: 'akash.base.v1beta3.GPU' as const, + $type: "akash.base.v1beta3.GPU" as const, encode(message: GPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.units !== undefined) { @@ -30,8 +30,7 @@ export const GPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGPU(); while (reader.pos < end) { @@ -63,9 +62,7 @@ export const GPU = { fromJSON(object: any): GPU { return { $type: GPU.$type, - units: isSet(object.units) - ? ResourceValue.fromJSON(object.units) - : undefined, + units: isSet(object.units) ? ResourceValue.fromJSON(object.units) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -88,38 +85,23 @@ export const GPU = { }, fromPartial(object: DeepPartial): GPU { const message = createBaseGPU(); - message.units = - object.units !== undefined && object.units !== null - ? ResourceValue.fromPartial(object.units) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.units = (object.units !== undefined && object.units !== null) + ? ResourceValue.fromPartial(object.units) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GPU.$type, GPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/memory.ts b/ts/src/generated/akash/base/v1beta3/memory.ts index 9decb51a..84de71d5 100644 --- a/ts/src/generated/akash/base/v1beta3/memory.ts +++ b/ts/src/generated/akash/base/v1beta3/memory.ts @@ -1,32 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { ResourceValue } from "./resourcevalue"; /** Memory stores resource quantity and memory attributes */ export interface Memory { - $type: 'akash.base.v1beta3.Memory'; + $type: "akash.base.v1beta3.Memory"; quantity: ResourceValue | undefined; attributes: Attribute[]; } function createBaseMemory(): Memory { - return { - $type: 'akash.base.v1beta3.Memory', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta3.Memory", quantity: undefined, attributes: [] }; } export const Memory = { - $type: 'akash.base.v1beta3.Memory' as const, + $type: "akash.base.v1beta3.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourceValue.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -37,8 +30,7 @@ export const Memory = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Memory { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMemory(); while (reader.pos < end) { @@ -70,9 +62,7 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -95,38 +85,23 @@ export const Memory = { }, fromPartial(object: DeepPartial): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Memory.$type, Memory); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/resources.ts b/ts/src/generated/akash/base/v1beta3/resources.ts index 0e81b6c9..9c08fde0 100644 --- a/ts/src/generated/akash/base/v1beta3/resources.ts +++ b/ts/src/generated/akash/base/v1beta3/resources.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { CPU } from './cpu'; -import { Endpoint } from './endpoint'; -import { GPU } from './gpu'; -import { Memory } from './memory'; -import { Storage } from './storage'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { CPU } from "./cpu"; +import { Endpoint } from "./endpoint"; +import { GPU } from "./gpu"; +import { Memory } from "./memory"; +import { Storage } from "./storage"; /** * Resources describes all available resources types for deployment/node etc * if field is nil resource is not present in the given data-structure */ export interface Resources { - $type: 'akash.base.v1beta3.Resources'; + $type: "akash.base.v1beta3.Resources"; id: number; cpu: CPU | undefined; memory: Memory | undefined; @@ -24,7 +24,7 @@ export interface Resources { function createBaseResources(): Resources { return { - $type: 'akash.base.v1beta3.Resources', + $type: "akash.base.v1beta3.Resources", id: 0, cpu: undefined, memory: undefined, @@ -35,12 +35,9 @@ function createBaseResources(): Resources { } export const Resources = { - $type: 'akash.base.v1beta3.Resources' as const, + $type: "akash.base.v1beta3.Resources" as const, - encode( - message: Resources, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Resources, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== 0) { writer.uint32(8).uint32(message.id); } @@ -63,8 +60,7 @@ export const Resources = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Resources { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResources(); while (reader.pos < end) { @@ -127,9 +123,7 @@ export const Resources = { id: isSet(object.id) ? globalThis.Number(object.id) : 0, cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, - storage: globalThis.Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], + storage: globalThis.Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], gpu: isSet(object.gpu) ? GPU.fromJSON(object.gpu) : undefined, endpoints: globalThis.Array.isArray(object?.endpoints) ? object.endpoints.map((e: any) => Endpoint.fromJSON(e)) @@ -166,47 +160,26 @@ export const Resources = { fromPartial(object: DeepPartial): Resources { const message = createBaseResources(); message.id = object.id ?? 0; - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; + message.cpu = (object.cpu !== undefined && object.cpu !== null) ? CPU.fromPartial(object.cpu) : undefined; + message.memory = (object.memory !== undefined && object.memory !== null) + ? Memory.fromPartial(object.memory) + : undefined; message.storage = object.storage?.map((e) => Storage.fromPartial(e)) || []; - message.gpu = - object.gpu !== undefined && object.gpu !== null - ? GPU.fromPartial(object.gpu) - : undefined; - message.endpoints = - object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; + message.gpu = (object.gpu !== undefined && object.gpu !== null) ? GPU.fromPartial(object.gpu) : undefined; + message.endpoints = object.endpoints?.map((e) => Endpoint.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Resources.$type, Resources); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/resourcevalue.ts b/ts/src/generated/akash/base/v1beta3/resourcevalue.ts index f388ac21..33660473 100644 --- a/ts/src/generated/akash/base/v1beta3/resourcevalue.ts +++ b/ts/src/generated/akash/base/v1beta3/resourcevalue.ts @@ -1,25 +1,22 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Unit stores cpu, memory and storage metrics */ export interface ResourceValue { - $type: 'akash.base.v1beta3.ResourceValue'; + $type: "akash.base.v1beta3.ResourceValue"; val: Uint8Array; } function createBaseResourceValue(): ResourceValue { - return { $type: 'akash.base.v1beta3.ResourceValue', val: new Uint8Array(0) }; + return { $type: "akash.base.v1beta3.ResourceValue", val: new Uint8Array(0) }; } export const ResourceValue = { - $type: 'akash.base.v1beta3.ResourceValue' as const, + $type: "akash.base.v1beta3.ResourceValue" as const, - encode( - message: ResourceValue, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.val.length !== 0) { writer.uint32(10).bytes(message.val); } @@ -27,8 +24,7 @@ export const ResourceValue = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceValue { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceValue(); while (reader.pos < end) { @@ -51,10 +47,7 @@ export const ResourceValue = { }, fromJSON(object: any): ResourceValue { - return { - $type: ResourceValue.$type, - val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0), - }; + return { $type: ResourceValue.$type, val: isSet(object.val) ? bytesFromBase64(object.val) : new Uint8Array(0) }; }, toJSON(message: ResourceValue): unknown { @@ -79,7 +72,7 @@ messageTypeRegistry.set(ResourceValue.$type, ResourceValue); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -92,36 +85,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/base/v1beta3/storage.ts b/ts/src/generated/akash/base/v1beta3/storage.ts index a95f3622..97b51adc 100644 --- a/ts/src/generated/akash/base/v1beta3/storage.ts +++ b/ts/src/generated/akash/base/v1beta3/storage.ts @@ -1,35 +1,27 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from './attribute'; -import { ResourceValue } from './resourcevalue'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "./attribute"; +import { ResourceValue } from "./resourcevalue"; /** Storage stores resource quantity and storage attributes */ export interface Storage { - $type: 'akash.base.v1beta3.Storage'; + $type: "akash.base.v1beta3.Storage"; name: string; quantity: ResourceValue | undefined; attributes: Attribute[]; } function createBaseStorage(): Storage { - return { - $type: 'akash.base.v1beta3.Storage', - name: '', - quantity: undefined, - attributes: [], - }; + return { $type: "akash.base.v1beta3.Storage", name: "", quantity: undefined, attributes: [] }; } export const Storage = { - $type: 'akash.base.v1beta3.Storage' as const, + $type: "akash.base.v1beta3.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.quantity !== undefined) { @@ -42,8 +34,7 @@ export const Storage = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Storage { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorage(); while (reader.pos < end) { @@ -82,10 +73,8 @@ export const Storage = { fromJSON(object: any): Storage { return { $type: Storage.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - quantity: isSet(object.quantity) - ? ResourceValue.fromJSON(object.quantity) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + quantity: isSet(object.quantity) ? ResourceValue.fromJSON(object.quantity) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -94,7 +83,7 @@ export const Storage = { toJSON(message: Storage): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.quantity !== undefined) { @@ -111,39 +100,24 @@ export const Storage = { }, fromPartial(object: DeepPartial): Storage { const message = createBaseStorage(); - message.name = object.name ?? ''; - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourceValue.fromPartial(object.quantity) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourceValue.fromPartial(object.quantity) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Storage.$type, Storage); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta2/cert.ts b/ts/src/generated/akash/cert/v1beta2/cert.ts index 632be979..4e5b3e8a 100644 --- a/ts/src/generated/akash/cert/v1beta2/cert.ts +++ b/ts/src/generated/akash/cert/v1beta2/cert.ts @@ -1,18 +1,18 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** CertificateID stores owner and sequence number */ export interface CertificateID { - $type: 'akash.cert.v1beta2.CertificateID'; + $type: "akash.cert.v1beta2.CertificateID"; owner: string; serial: string; } /** Certificate stores state, certificate and it's public key */ export interface Certificate { - $type: 'akash.cert.v1beta2.Certificate'; + $type: "akash.cert.v1beta2.Certificate"; state: Certificate_State; cert: Uint8Array; pubkey: Uint8Array; @@ -32,16 +32,16 @@ export enum Certificate_State { export function certificate_StateFromJSON(object: any): Certificate_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Certificate_State.invalid; case 1: - case 'valid': + case "valid": return Certificate_State.valid; case 2: - case 'revoked': + case "revoked": return Certificate_State.revoked; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Certificate_State.UNRECOGNIZED; } @@ -50,20 +50,20 @@ export function certificate_StateFromJSON(object: any): Certificate_State { export function certificate_StateToJSON(object: Certificate_State): string { switch (object) { case Certificate_State.invalid: - return 'invalid'; + return "invalid"; case Certificate_State.valid: - return 'valid'; + return "valid"; case Certificate_State.revoked: - return 'revoked'; + return "revoked"; case Certificate_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** CertificateFilter defines filters used to filter certificates */ export interface CertificateFilter { - $type: 'akash.cert.v1beta2.CertificateFilter'; + $type: "akash.cert.v1beta2.CertificateFilter"; owner: string; serial: string; state: string; @@ -71,7 +71,7 @@ export interface CertificateFilter { /** MsgCreateCertificate defines an SDK message for creating certificate */ export interface MsgCreateCertificate { - $type: 'akash.cert.v1beta2.MsgCreateCertificate'; + $type: "akash.cert.v1beta2.MsgCreateCertificate"; owner: string; cert: Uint8Array; pubkey: Uint8Array; @@ -79,43 +79,39 @@ export interface MsgCreateCertificate { /** MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. */ export interface MsgCreateCertificateResponse { - $type: 'akash.cert.v1beta2.MsgCreateCertificateResponse'; + $type: "akash.cert.v1beta2.MsgCreateCertificateResponse"; } /** MsgRevokeCertificate defines an SDK message for revoking certificate */ export interface MsgRevokeCertificate { - $type: 'akash.cert.v1beta2.MsgRevokeCertificate'; + $type: "akash.cert.v1beta2.MsgRevokeCertificate"; id: CertificateID | undefined; } /** MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. */ export interface MsgRevokeCertificateResponse { - $type: 'akash.cert.v1beta2.MsgRevokeCertificateResponse'; + $type: "akash.cert.v1beta2.MsgRevokeCertificateResponse"; } function createBaseCertificateID(): CertificateID { - return { $type: 'akash.cert.v1beta2.CertificateID', owner: '', serial: '' }; + return { $type: "akash.cert.v1beta2.CertificateID", owner: "", serial: "" }; } export const CertificateID = { - $type: 'akash.cert.v1beta2.CertificateID' as const, + $type: "akash.cert.v1beta2.CertificateID" as const, - encode( - message: CertificateID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: CertificateID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateID(); while (reader.pos < end) { @@ -147,17 +143,17 @@ export const CertificateID = { fromJSON(object: any): CertificateID { return { $type: CertificateID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", }; }, toJSON(message: CertificateID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } return obj; @@ -168,8 +164,8 @@ export const CertificateID = { }, fromPartial(object: DeepPartial): CertificateID { const message = createBaseCertificateID(); - message.owner = object.owner ?? ''; - message.serial = object.serial ?? ''; + message.owner = object.owner ?? ""; + message.serial = object.serial ?? ""; return message; }, }; @@ -177,21 +173,13 @@ export const CertificateID = { messageTypeRegistry.set(CertificateID.$type, CertificateID); function createBaseCertificate(): Certificate { - return { - $type: 'akash.cert.v1beta2.Certificate', - state: 0, - cert: new Uint8Array(0), - pubkey: new Uint8Array(0), - }; + return { $type: "akash.cert.v1beta2.Certificate", state: 0, cert: new Uint8Array(0), pubkey: new Uint8Array(0) }; } export const Certificate = { - $type: 'akash.cert.v1beta2.Certificate' as const, + $type: "akash.cert.v1beta2.Certificate" as const, - encode( - message: Certificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Certificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.state !== 0) { writer.uint32(16).int32(message.state); } @@ -205,8 +193,7 @@ export const Certificate = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Certificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificate(); while (reader.pos < end) { @@ -246,12 +233,8 @@ export const Certificate = { return { $type: Certificate.$type, state: isSet(object.state) ? certificate_StateFromJSON(object.state) : 0, - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(0), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(0), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(0), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0), }; }, @@ -284,36 +267,27 @@ export const Certificate = { messageTypeRegistry.set(Certificate.$type, Certificate); function createBaseCertificateFilter(): CertificateFilter { - return { - $type: 'akash.cert.v1beta2.CertificateFilter', - owner: '', - serial: '', - state: '', - }; + return { $type: "akash.cert.v1beta2.CertificateFilter", owner: "", serial: "", state: "" }; } export const CertificateFilter = { - $type: 'akash.cert.v1beta2.CertificateFilter' as const, + $type: "akash.cert.v1beta2.CertificateFilter" as const, - encode( - message: CertificateFilter, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: CertificateFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(26).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateFilter { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateFilter(); while (reader.pos < end) { @@ -352,21 +326,21 @@ export const CertificateFilter = { fromJSON(object: any): CertificateFilter { return { $type: CertificateFilter.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: CertificateFilter): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -377,9 +351,9 @@ export const CertificateFilter = { }, fromPartial(object: DeepPartial): CertificateFilter { const message = createBaseCertificateFilter(); - message.owner = object.owner ?? ''; - message.serial = object.serial ?? ''; - message.state = object.state ?? ''; + message.owner = object.owner ?? ""; + message.serial = object.serial ?? ""; + message.state = object.state ?? ""; return message; }, }; @@ -388,21 +362,18 @@ messageTypeRegistry.set(CertificateFilter.$type, CertificateFilter); function createBaseMsgCreateCertificate(): MsgCreateCertificate { return { - $type: 'akash.cert.v1beta2.MsgCreateCertificate', - owner: '', + $type: "akash.cert.v1beta2.MsgCreateCertificate", + owner: "", cert: new Uint8Array(0), pubkey: new Uint8Array(0), }; } export const MsgCreateCertificate = { - $type: 'akash.cert.v1beta2.MsgCreateCertificate' as const, + $type: "akash.cert.v1beta2.MsgCreateCertificate" as const, - encode( - message: MsgCreateCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgCreateCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.cert.length !== 0) { @@ -414,12 +385,8 @@ export const MsgCreateCertificate = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificate { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificate(); while (reader.pos < end) { @@ -458,19 +425,15 @@ export const MsgCreateCertificate = { fromJSON(object: any): MsgCreateCertificate { return { $type: MsgCreateCertificate.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(0), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(0), + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(0), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0), }; }, toJSON(message: MsgCreateCertificate): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.cert.length !== 0) { @@ -487,7 +450,7 @@ export const MsgCreateCertificate = { }, fromPartial(object: DeepPartial): MsgCreateCertificate { const message = createBaseMsgCreateCertificate(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; message.cert = object.cert ?? new Uint8Array(0); message.pubkey = object.pubkey ?? new Uint8Array(0); return message; @@ -497,25 +460,18 @@ export const MsgCreateCertificate = { messageTypeRegistry.set(MsgCreateCertificate.$type, MsgCreateCertificate); function createBaseMsgCreateCertificateResponse(): MsgCreateCertificateResponse { - return { $type: 'akash.cert.v1beta2.MsgCreateCertificateResponse' }; + return { $type: "akash.cert.v1beta2.MsgCreateCertificateResponse" }; } export const MsgCreateCertificateResponse = { - $type: 'akash.cert.v1beta2.MsgCreateCertificateResponse' as const, + $type: "akash.cert.v1beta2.MsgCreateCertificateResponse" as const, - encode( - _: MsgCreateCertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateCertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificateResponse(); while (reader.pos < end) { @@ -539,47 +495,33 @@ export const MsgCreateCertificateResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateCertificateResponse { + create(base?: DeepPartial): MsgCreateCertificateResponse { return MsgCreateCertificateResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateCertificateResponse { + fromPartial(_: DeepPartial): MsgCreateCertificateResponse { const message = createBaseMsgCreateCertificateResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateCertificateResponse.$type, - MsgCreateCertificateResponse, -); +messageTypeRegistry.set(MsgCreateCertificateResponse.$type, MsgCreateCertificateResponse); function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { - return { $type: 'akash.cert.v1beta2.MsgRevokeCertificate', id: undefined }; + return { $type: "akash.cert.v1beta2.MsgRevokeCertificate", id: undefined }; } export const MsgRevokeCertificate = { - $type: 'akash.cert.v1beta2.MsgRevokeCertificate' as const, + $type: "akash.cert.v1beta2.MsgRevokeCertificate" as const, - encode( - message: MsgRevokeCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgRevokeCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { CertificateID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgRevokeCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificate { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificate(); while (reader.pos < end) { @@ -602,10 +544,7 @@ export const MsgRevokeCertificate = { }, fromJSON(object: any): MsgRevokeCertificate { - return { - $type: MsgRevokeCertificate.$type, - id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined, - }; + return { $type: MsgRevokeCertificate.$type, id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgRevokeCertificate): unknown { @@ -621,10 +560,7 @@ export const MsgRevokeCertificate = { }, fromPartial(object: DeepPartial): MsgRevokeCertificate { const message = createBaseMsgRevokeCertificate(); - message.id = - object.id !== undefined && object.id !== null - ? CertificateID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? CertificateID.fromPartial(object.id) : undefined; return message; }, }; @@ -632,25 +568,18 @@ export const MsgRevokeCertificate = { messageTypeRegistry.set(MsgRevokeCertificate.$type, MsgRevokeCertificate); function createBaseMsgRevokeCertificateResponse(): MsgRevokeCertificateResponse { - return { $type: 'akash.cert.v1beta2.MsgRevokeCertificateResponse' }; + return { $type: "akash.cert.v1beta2.MsgRevokeCertificateResponse" }; } export const MsgRevokeCertificateResponse = { - $type: 'akash.cert.v1beta2.MsgRevokeCertificateResponse' as const, + $type: "akash.cert.v1beta2.MsgRevokeCertificateResponse" as const, - encode( - _: MsgRevokeCertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgRevokeCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgRevokeCertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificateResponse(); while (reader.pos < end) { @@ -674,37 +603,26 @@ export const MsgRevokeCertificateResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgRevokeCertificateResponse { + create(base?: DeepPartial): MsgRevokeCertificateResponse { return MsgRevokeCertificateResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgRevokeCertificateResponse { + fromPartial(_: DeepPartial): MsgRevokeCertificateResponse { const message = createBaseMsgRevokeCertificateResponse(); return message; }, }; -messageTypeRegistry.set( - MsgRevokeCertificateResponse.$type, - MsgRevokeCertificateResponse, -); +messageTypeRegistry.set(MsgRevokeCertificateResponse.$type, MsgRevokeCertificateResponse); /** Msg defines the provider Msg service */ export interface Msg { /** CreateCertificate defines a method to create new certificate given proper inputs. */ - CreateCertificate( - request: MsgCreateCertificate, - ): Promise; + CreateCertificate(request: MsgCreateCertificate): Promise; /** RevokeCertificate defines a method to revoke the certificate */ - RevokeCertificate( - request: MsgRevokeCertificate, - ): Promise; + RevokeCertificate(request: MsgRevokeCertificate): Promise; } -export const MsgServiceName = 'akash.cert.v1beta2.Msg'; +export const MsgServiceName = "akash.cert.v1beta2.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -714,38 +632,26 @@ export class MsgClientImpl implements Msg { this.CreateCertificate = this.CreateCertificate.bind(this); this.RevokeCertificate = this.RevokeCertificate.bind(this); } - CreateCertificate( - request: MsgCreateCertificate, - ): Promise { + CreateCertificate(request: MsgCreateCertificate): Promise { const data = MsgCreateCertificate.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateCertificate', data); - return promise.then((data) => - MsgCreateCertificateResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateCertificate", data); + return promise.then((data) => MsgCreateCertificateResponse.decode(_m0.Reader.create(data))); } - RevokeCertificate( - request: MsgRevokeCertificate, - ): Promise { + RevokeCertificate(request: MsgRevokeCertificate): Promise { const data = MsgRevokeCertificate.encode(request).finish(); - const promise = this.rpc.request(this.service, 'RevokeCertificate', data); - return promise.then((data) => - MsgRevokeCertificateResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "RevokeCertificate", data); + return promise.then((data) => MsgRevokeCertificateResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -758,36 +664,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta2/genesis.ts b/ts/src/generated/akash/cert/v1beta2/genesis.ts index ac10ce73..baab4dd3 100644 --- a/ts/src/generated/akash/cert/v1beta2/genesis.ts +++ b/ts/src/generated/akash/cert/v1beta2/genesis.ts @@ -1,52 +1,41 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Certificate } from './cert'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Certificate } from "./cert"; /** GenesisCertificate defines certificate entry at genesis */ export interface GenesisCertificate { - $type: 'akash.cert.v1beta2.GenesisCertificate'; + $type: "akash.cert.v1beta2.GenesisCertificate"; owner: string; certificate: Certificate | undefined; } /** GenesisState defines the basic genesis state used by cert module */ export interface GenesisState { - $type: 'akash.cert.v1beta2.GenesisState'; + $type: "akash.cert.v1beta2.GenesisState"; certificates: GenesisCertificate[]; } function createBaseGenesisCertificate(): GenesisCertificate { - return { - $type: 'akash.cert.v1beta2.GenesisCertificate', - owner: '', - certificate: undefined, - }; + return { $type: "akash.cert.v1beta2.GenesisCertificate", owner: "", certificate: undefined }; } export const GenesisCertificate = { - $type: 'akash.cert.v1beta2.GenesisCertificate' as const, + $type: "akash.cert.v1beta2.GenesisCertificate" as const, - encode( - message: GenesisCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: GenesisCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(18).fork(), - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisCertificate(); while (reader.pos < end) { @@ -78,16 +67,14 @@ export const GenesisCertificate = { fromJSON(object: any): GenesisCertificate { return { $type: GenesisCertificate.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, }; }, toJSON(message: GenesisCertificate): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.certificate !== undefined) { @@ -101,11 +88,10 @@ export const GenesisCertificate = { }, fromPartial(object: DeepPartial): GenesisCertificate { const message = createBaseGenesisCertificate(); - message.owner = object.owner ?? ''; - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.owner = object.owner ?? ""; + message.certificate = (object.certificate !== undefined && object.certificate !== null) + ? Certificate.fromPartial(object.certificate) + : undefined; return message; }, }; @@ -113,16 +99,13 @@ export const GenesisCertificate = { messageTypeRegistry.set(GenesisCertificate.$type, GenesisCertificate); function createBaseGenesisState(): GenesisState { - return { $type: 'akash.cert.v1beta2.GenesisState', certificates: [] }; + return { $type: "akash.cert.v1beta2.GenesisState", certificates: [] }; } export const GenesisState = { - $type: 'akash.cert.v1beta2.GenesisState' as const, + $type: "akash.cert.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { GenesisCertificate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -130,8 +113,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -142,9 +124,7 @@ export const GenesisState = { break; } - message.certificates.push( - GenesisCertificate.decode(reader, reader.uint32()), - ); + message.certificates.push(GenesisCertificate.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -167,9 +147,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.certificates?.length) { - obj.certificates = message.certificates.map((e) => - GenesisCertificate.toJSON(e), - ); + obj.certificates = message.certificates.map((e) => GenesisCertificate.toJSON(e)); } return obj; }, @@ -179,34 +157,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.certificates = - object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; + message.certificates = object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta2/query.ts b/ts/src/generated/akash/cert/v1beta2/query.ts index 6f79d467..ebd76c06 100644 --- a/ts/src/generated/akash/cert/v1beta2/query.ts +++ b/ts/src/generated/akash/cert/v1beta2/query.ts @@ -1,64 +1,50 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Certificate, CertificateFilter } from './cert'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Certificate, CertificateFilter } from "./cert"; /** CertificateResponse contains a single X509 certificate and its serial number */ export interface CertificateResponse { - $type: 'akash.cert.v1beta2.CertificateResponse'; + $type: "akash.cert.v1beta2.CertificateResponse"; certificate: Certificate | undefined; serial: string; } /** QueryDeploymentsRequest is request type for the Query/Deployments RPC method */ export interface QueryCertificatesRequest { - $type: 'akash.cert.v1beta2.QueryCertificatesRequest'; + $type: "akash.cert.v1beta2.QueryCertificatesRequest"; filter: CertificateFilter | undefined; pagination: PageRequest | undefined; } /** QueryCertificatesResponse is response type for the Query/Certificates RPC method */ export interface QueryCertificatesResponse { - $type: 'akash.cert.v1beta2.QueryCertificatesResponse'; + $type: "akash.cert.v1beta2.QueryCertificatesResponse"; certificates: CertificateResponse[]; pagination: PageResponse | undefined; } function createBaseCertificateResponse(): CertificateResponse { - return { - $type: 'akash.cert.v1beta2.CertificateResponse', - certificate: undefined, - serial: '', - }; + return { $type: "akash.cert.v1beta2.CertificateResponse", certificate: undefined, serial: "" }; } export const CertificateResponse = { - $type: 'akash.cert.v1beta2.CertificateResponse' as const, + $type: "akash.cert.v1beta2.CertificateResponse" as const, - encode( - message: CertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: CertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(10).fork(), - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(10).fork()).ldelim(); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateResponse(); while (reader.pos < end) { @@ -90,10 +76,8 @@ export const CertificateResponse = { fromJSON(object: any): CertificateResponse { return { $type: CertificateResponse.$type, - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", }; }, @@ -102,7 +86,7 @@ export const CertificateResponse = { if (message.certificate !== undefined) { obj.certificate = Certificate.toJSON(message.certificate); } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } return obj; @@ -113,11 +97,10 @@ export const CertificateResponse = { }, fromPartial(object: DeepPartial): CertificateResponse { const message = createBaseCertificateResponse(); - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; - message.serial = object.serial ?? ''; + message.certificate = (object.certificate !== undefined && object.certificate !== null) + ? Certificate.fromPartial(object.certificate) + : undefined; + message.serial = object.serial ?? ""; return message; }, }; @@ -125,25 +108,15 @@ export const CertificateResponse = { messageTypeRegistry.set(CertificateResponse.$type, CertificateResponse); function createBaseQueryCertificatesRequest(): QueryCertificatesRequest { - return { - $type: 'akash.cert.v1beta2.QueryCertificatesRequest', - filter: undefined, - pagination: undefined, - }; + return { $type: "akash.cert.v1beta2.QueryCertificatesRequest", filter: undefined, pagination: undefined }; } export const QueryCertificatesRequest = { - $type: 'akash.cert.v1beta2.QueryCertificatesRequest' as const, + $type: "akash.cert.v1beta2.QueryCertificatesRequest" as const, - encode( - message: QueryCertificatesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryCertificatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filter !== undefined) { - CertificateFilter.encode( - message.filter, - writer.uint32(10).fork(), - ).ldelim(); + CertificateFilter.encode(message.filter, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -151,12 +124,8 @@ export const QueryCertificatesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryCertificatesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesRequest(); while (reader.pos < end) { @@ -188,12 +157,8 @@ export const QueryCertificatesRequest = { fromJSON(object: any): QueryCertificatesRequest { return { $type: QueryCertificatesRequest.$type, - filter: isSet(object.filter) - ? CertificateFilter.fromJSON(object.filter) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filter: isSet(object.filter) ? CertificateFilter.fromJSON(object.filter) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -208,65 +173,42 @@ export const QueryCertificatesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryCertificatesRequest { + create(base?: DeepPartial): QueryCertificatesRequest { return QueryCertificatesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryCertificatesRequest { + fromPartial(object: DeepPartial): QueryCertificatesRequest { const message = createBaseQueryCertificatesRequest(); - message.filter = - object.filter !== undefined && object.filter !== null - ? CertificateFilter.fromPartial(object.filter) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filter = (object.filter !== undefined && object.filter !== null) + ? CertificateFilter.fromPartial(object.filter) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryCertificatesRequest.$type, - QueryCertificatesRequest, -); +messageTypeRegistry.set(QueryCertificatesRequest.$type, QueryCertificatesRequest); function createBaseQueryCertificatesResponse(): QueryCertificatesResponse { - return { - $type: 'akash.cert.v1beta2.QueryCertificatesResponse', - certificates: [], - pagination: undefined, - }; + return { $type: "akash.cert.v1beta2.QueryCertificatesResponse", certificates: [], pagination: undefined }; } export const QueryCertificatesResponse = { - $type: 'akash.cert.v1beta2.QueryCertificatesResponse' as const, + $type: "akash.cert.v1beta2.QueryCertificatesResponse" as const, - encode( - message: QueryCertificatesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryCertificatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { CertificateResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryCertificatesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesResponse(); while (reader.pos < end) { @@ -277,9 +219,7 @@ export const QueryCertificatesResponse = { break; } - message.certificates.push( - CertificateResponse.decode(reader, reader.uint32()), - ); + message.certificates.push(CertificateResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -303,18 +243,14 @@ export const QueryCertificatesResponse = { certificates: globalThis.Array.isArray(object?.certificates) ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryCertificatesResponse): unknown { const obj: any = {}; if (message.certificates?.length) { - obj.certificates = message.certificates.map((e) => - CertificateResponse.toJSON(e), - ); + obj.certificates = message.certificates.map((e) => CertificateResponse.toJSON(e)); } if (message.pagination !== undefined) { obj.pagination = PageResponse.toJSON(message.pagination); @@ -322,39 +258,28 @@ export const QueryCertificatesResponse = { return obj; }, - create( - base?: DeepPartial, - ): QueryCertificatesResponse { + create(base?: DeepPartial): QueryCertificatesResponse { return QueryCertificatesResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryCertificatesResponse { + fromPartial(object: DeepPartial): QueryCertificatesResponse { const message = createBaseQueryCertificatesResponse(); - message.certificates = - object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.certificates = object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryCertificatesResponse.$type, - QueryCertificatesResponse, -); +messageTypeRegistry.set(QueryCertificatesResponse.$type, QueryCertificatesResponse); /** Query defines the gRPC querier service */ export interface Query { /** Certificates queries certificates */ - Certificates( - request: QueryCertificatesRequest, - ): Promise; + Certificates(request: QueryCertificatesRequest): Promise; } -export const QueryServiceName = 'akash.cert.v1beta2.Query'; +export const QueryServiceName = "akash.cert.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -363,45 +288,24 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Certificates = this.Certificates.bind(this); } - Certificates( - request: QueryCertificatesRequest, - ): Promise { + Certificates(request: QueryCertificatesRequest): Promise { const data = QueryCertificatesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Certificates', data); - return promise.then((data) => - QueryCertificatesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Certificates", data); + return promise.then((data) => QueryCertificatesResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta3/cert.ts b/ts/src/generated/akash/cert/v1beta3/cert.ts index 80579b6a..029651de 100644 --- a/ts/src/generated/akash/cert/v1beta3/cert.ts +++ b/ts/src/generated/akash/cert/v1beta3/cert.ts @@ -1,18 +1,18 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** CertificateID stores owner and sequence number */ export interface CertificateID { - $type: 'akash.cert.v1beta3.CertificateID'; + $type: "akash.cert.v1beta3.CertificateID"; owner: string; serial: string; } /** Certificate stores state, certificate and it's public key */ export interface Certificate { - $type: 'akash.cert.v1beta3.Certificate'; + $type: "akash.cert.v1beta3.Certificate"; state: Certificate_State; cert: Uint8Array; pubkey: Uint8Array; @@ -32,16 +32,16 @@ export enum Certificate_State { export function certificate_StateFromJSON(object: any): Certificate_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Certificate_State.invalid; case 1: - case 'valid': + case "valid": return Certificate_State.valid; case 2: - case 'revoked': + case "revoked": return Certificate_State.revoked; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Certificate_State.UNRECOGNIZED; } @@ -50,20 +50,20 @@ export function certificate_StateFromJSON(object: any): Certificate_State { export function certificate_StateToJSON(object: Certificate_State): string { switch (object) { case Certificate_State.invalid: - return 'invalid'; + return "invalid"; case Certificate_State.valid: - return 'valid'; + return "valid"; case Certificate_State.revoked: - return 'revoked'; + return "revoked"; case Certificate_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** CertificateFilter defines filters used to filter certificates */ export interface CertificateFilter { - $type: 'akash.cert.v1beta3.CertificateFilter'; + $type: "akash.cert.v1beta3.CertificateFilter"; owner: string; serial: string; state: string; @@ -71,7 +71,7 @@ export interface CertificateFilter { /** MsgCreateCertificate defines an SDK message for creating certificate */ export interface MsgCreateCertificate { - $type: 'akash.cert.v1beta3.MsgCreateCertificate'; + $type: "akash.cert.v1beta3.MsgCreateCertificate"; owner: string; cert: Uint8Array; pubkey: Uint8Array; @@ -79,43 +79,39 @@ export interface MsgCreateCertificate { /** MsgCreateCertificateResponse defines the Msg/CreateCertificate response type. */ export interface MsgCreateCertificateResponse { - $type: 'akash.cert.v1beta3.MsgCreateCertificateResponse'; + $type: "akash.cert.v1beta3.MsgCreateCertificateResponse"; } /** MsgRevokeCertificate defines an SDK message for revoking certificate */ export interface MsgRevokeCertificate { - $type: 'akash.cert.v1beta3.MsgRevokeCertificate'; + $type: "akash.cert.v1beta3.MsgRevokeCertificate"; id: CertificateID | undefined; } /** MsgRevokeCertificateResponse defines the Msg/RevokeCertificate response type. */ export interface MsgRevokeCertificateResponse { - $type: 'akash.cert.v1beta3.MsgRevokeCertificateResponse'; + $type: "akash.cert.v1beta3.MsgRevokeCertificateResponse"; } function createBaseCertificateID(): CertificateID { - return { $type: 'akash.cert.v1beta3.CertificateID', owner: '', serial: '' }; + return { $type: "akash.cert.v1beta3.CertificateID", owner: "", serial: "" }; } export const CertificateID = { - $type: 'akash.cert.v1beta3.CertificateID' as const, + $type: "akash.cert.v1beta3.CertificateID" as const, - encode( - message: CertificateID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: CertificateID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateID(); while (reader.pos < end) { @@ -147,17 +143,17 @@ export const CertificateID = { fromJSON(object: any): CertificateID { return { $type: CertificateID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", }; }, toJSON(message: CertificateID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } return obj; @@ -168,8 +164,8 @@ export const CertificateID = { }, fromPartial(object: DeepPartial): CertificateID { const message = createBaseCertificateID(); - message.owner = object.owner ?? ''; - message.serial = object.serial ?? ''; + message.owner = object.owner ?? ""; + message.serial = object.serial ?? ""; return message; }, }; @@ -177,21 +173,13 @@ export const CertificateID = { messageTypeRegistry.set(CertificateID.$type, CertificateID); function createBaseCertificate(): Certificate { - return { - $type: 'akash.cert.v1beta3.Certificate', - state: 0, - cert: new Uint8Array(0), - pubkey: new Uint8Array(0), - }; + return { $type: "akash.cert.v1beta3.Certificate", state: 0, cert: new Uint8Array(0), pubkey: new Uint8Array(0) }; } export const Certificate = { - $type: 'akash.cert.v1beta3.Certificate' as const, + $type: "akash.cert.v1beta3.Certificate" as const, - encode( - message: Certificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Certificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.state !== 0) { writer.uint32(16).int32(message.state); } @@ -205,8 +193,7 @@ export const Certificate = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Certificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificate(); while (reader.pos < end) { @@ -246,12 +233,8 @@ export const Certificate = { return { $type: Certificate.$type, state: isSet(object.state) ? certificate_StateFromJSON(object.state) : 0, - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(0), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(0), + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(0), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0), }; }, @@ -284,36 +267,27 @@ export const Certificate = { messageTypeRegistry.set(Certificate.$type, Certificate); function createBaseCertificateFilter(): CertificateFilter { - return { - $type: 'akash.cert.v1beta3.CertificateFilter', - owner: '', - serial: '', - state: '', - }; + return { $type: "akash.cert.v1beta3.CertificateFilter", owner: "", serial: "", state: "" }; } export const CertificateFilter = { - $type: 'akash.cert.v1beta3.CertificateFilter' as const, + $type: "akash.cert.v1beta3.CertificateFilter" as const, - encode( - message: CertificateFilter, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: CertificateFilter, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(26).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateFilter { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateFilter(); while (reader.pos < end) { @@ -352,21 +326,21 @@ export const CertificateFilter = { fromJSON(object: any): CertificateFilter { return { $type: CertificateFilter.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: CertificateFilter): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -377,9 +351,9 @@ export const CertificateFilter = { }, fromPartial(object: DeepPartial): CertificateFilter { const message = createBaseCertificateFilter(); - message.owner = object.owner ?? ''; - message.serial = object.serial ?? ''; - message.state = object.state ?? ''; + message.owner = object.owner ?? ""; + message.serial = object.serial ?? ""; + message.state = object.state ?? ""; return message; }, }; @@ -388,21 +362,18 @@ messageTypeRegistry.set(CertificateFilter.$type, CertificateFilter); function createBaseMsgCreateCertificate(): MsgCreateCertificate { return { - $type: 'akash.cert.v1beta3.MsgCreateCertificate', - owner: '', + $type: "akash.cert.v1beta3.MsgCreateCertificate", + owner: "", cert: new Uint8Array(0), pubkey: new Uint8Array(0), }; } export const MsgCreateCertificate = { - $type: 'akash.cert.v1beta3.MsgCreateCertificate' as const, + $type: "akash.cert.v1beta3.MsgCreateCertificate" as const, - encode( - message: MsgCreateCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgCreateCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.cert.length !== 0) { @@ -414,12 +385,8 @@ export const MsgCreateCertificate = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificate { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificate(); while (reader.pos < end) { @@ -458,19 +425,15 @@ export const MsgCreateCertificate = { fromJSON(object: any): MsgCreateCertificate { return { $type: MsgCreateCertificate.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - cert: isSet(object.cert) - ? bytesFromBase64(object.cert) - : new Uint8Array(0), - pubkey: isSet(object.pubkey) - ? bytesFromBase64(object.pubkey) - : new Uint8Array(0), + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + cert: isSet(object.cert) ? bytesFromBase64(object.cert) : new Uint8Array(0), + pubkey: isSet(object.pubkey) ? bytesFromBase64(object.pubkey) : new Uint8Array(0), }; }, toJSON(message: MsgCreateCertificate): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.cert.length !== 0) { @@ -487,7 +450,7 @@ export const MsgCreateCertificate = { }, fromPartial(object: DeepPartial): MsgCreateCertificate { const message = createBaseMsgCreateCertificate(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; message.cert = object.cert ?? new Uint8Array(0); message.pubkey = object.pubkey ?? new Uint8Array(0); return message; @@ -497,25 +460,18 @@ export const MsgCreateCertificate = { messageTypeRegistry.set(MsgCreateCertificate.$type, MsgCreateCertificate); function createBaseMsgCreateCertificateResponse(): MsgCreateCertificateResponse { - return { $type: 'akash.cert.v1beta3.MsgCreateCertificateResponse' }; + return { $type: "akash.cert.v1beta3.MsgCreateCertificateResponse" }; } export const MsgCreateCertificateResponse = { - $type: 'akash.cert.v1beta3.MsgCreateCertificateResponse' as const, + $type: "akash.cert.v1beta3.MsgCreateCertificateResponse" as const, - encode( - _: MsgCreateCertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateCertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateCertificateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateCertificateResponse(); while (reader.pos < end) { @@ -539,47 +495,33 @@ export const MsgCreateCertificateResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateCertificateResponse { + create(base?: DeepPartial): MsgCreateCertificateResponse { return MsgCreateCertificateResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateCertificateResponse { + fromPartial(_: DeepPartial): MsgCreateCertificateResponse { const message = createBaseMsgCreateCertificateResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateCertificateResponse.$type, - MsgCreateCertificateResponse, -); +messageTypeRegistry.set(MsgCreateCertificateResponse.$type, MsgCreateCertificateResponse); function createBaseMsgRevokeCertificate(): MsgRevokeCertificate { - return { $type: 'akash.cert.v1beta3.MsgRevokeCertificate', id: undefined }; + return { $type: "akash.cert.v1beta3.MsgRevokeCertificate", id: undefined }; } export const MsgRevokeCertificate = { - $type: 'akash.cert.v1beta3.MsgRevokeCertificate' as const, + $type: "akash.cert.v1beta3.MsgRevokeCertificate" as const, - encode( - message: MsgRevokeCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgRevokeCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { CertificateID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgRevokeCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificate { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificate(); while (reader.pos < end) { @@ -602,10 +544,7 @@ export const MsgRevokeCertificate = { }, fromJSON(object: any): MsgRevokeCertificate { - return { - $type: MsgRevokeCertificate.$type, - id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined, - }; + return { $type: MsgRevokeCertificate.$type, id: isSet(object.id) ? CertificateID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgRevokeCertificate): unknown { @@ -621,10 +560,7 @@ export const MsgRevokeCertificate = { }, fromPartial(object: DeepPartial): MsgRevokeCertificate { const message = createBaseMsgRevokeCertificate(); - message.id = - object.id !== undefined && object.id !== null - ? CertificateID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? CertificateID.fromPartial(object.id) : undefined; return message; }, }; @@ -632,25 +568,18 @@ export const MsgRevokeCertificate = { messageTypeRegistry.set(MsgRevokeCertificate.$type, MsgRevokeCertificate); function createBaseMsgRevokeCertificateResponse(): MsgRevokeCertificateResponse { - return { $type: 'akash.cert.v1beta3.MsgRevokeCertificateResponse' }; + return { $type: "akash.cert.v1beta3.MsgRevokeCertificateResponse" }; } export const MsgRevokeCertificateResponse = { - $type: 'akash.cert.v1beta3.MsgRevokeCertificateResponse' as const, + $type: "akash.cert.v1beta3.MsgRevokeCertificateResponse" as const, - encode( - _: MsgRevokeCertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgRevokeCertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgRevokeCertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgRevokeCertificateResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgRevokeCertificateResponse(); while (reader.pos < end) { @@ -674,37 +603,26 @@ export const MsgRevokeCertificateResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgRevokeCertificateResponse { + create(base?: DeepPartial): MsgRevokeCertificateResponse { return MsgRevokeCertificateResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgRevokeCertificateResponse { + fromPartial(_: DeepPartial): MsgRevokeCertificateResponse { const message = createBaseMsgRevokeCertificateResponse(); return message; }, }; -messageTypeRegistry.set( - MsgRevokeCertificateResponse.$type, - MsgRevokeCertificateResponse, -); +messageTypeRegistry.set(MsgRevokeCertificateResponse.$type, MsgRevokeCertificateResponse); /** Msg defines the provider Msg service */ export interface Msg { /** CreateCertificate defines a method to create new certificate given proper inputs. */ - CreateCertificate( - request: MsgCreateCertificate, - ): Promise; + CreateCertificate(request: MsgCreateCertificate): Promise; /** RevokeCertificate defines a method to revoke the certificate */ - RevokeCertificate( - request: MsgRevokeCertificate, - ): Promise; + RevokeCertificate(request: MsgRevokeCertificate): Promise; } -export const MsgServiceName = 'akash.cert.v1beta3.Msg'; +export const MsgServiceName = "akash.cert.v1beta3.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -714,38 +632,26 @@ export class MsgClientImpl implements Msg { this.CreateCertificate = this.CreateCertificate.bind(this); this.RevokeCertificate = this.RevokeCertificate.bind(this); } - CreateCertificate( - request: MsgCreateCertificate, - ): Promise { + CreateCertificate(request: MsgCreateCertificate): Promise { const data = MsgCreateCertificate.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateCertificate', data); - return promise.then((data) => - MsgCreateCertificateResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateCertificate", data); + return promise.then((data) => MsgCreateCertificateResponse.decode(_m0.Reader.create(data))); } - RevokeCertificate( - request: MsgRevokeCertificate, - ): Promise { + RevokeCertificate(request: MsgRevokeCertificate): Promise { const data = MsgRevokeCertificate.encode(request).finish(); - const promise = this.rpc.request(this.service, 'RevokeCertificate', data); - return promise.then((data) => - MsgRevokeCertificateResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "RevokeCertificate", data); + return promise.then((data) => MsgRevokeCertificateResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -758,36 +664,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta3/genesis.ts b/ts/src/generated/akash/cert/v1beta3/genesis.ts index 3ddc9ebe..9a5b8b76 100644 --- a/ts/src/generated/akash/cert/v1beta3/genesis.ts +++ b/ts/src/generated/akash/cert/v1beta3/genesis.ts @@ -1,52 +1,41 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Certificate } from './cert'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Certificate } from "./cert"; /** GenesisCertificate defines certificate entry at genesis */ export interface GenesisCertificate { - $type: 'akash.cert.v1beta3.GenesisCertificate'; + $type: "akash.cert.v1beta3.GenesisCertificate"; owner: string; certificate: Certificate | undefined; } /** GenesisState defines the basic genesis state used by cert module */ export interface GenesisState { - $type: 'akash.cert.v1beta3.GenesisState'; + $type: "akash.cert.v1beta3.GenesisState"; certificates: GenesisCertificate[]; } function createBaseGenesisCertificate(): GenesisCertificate { - return { - $type: 'akash.cert.v1beta3.GenesisCertificate', - owner: '', - certificate: undefined, - }; + return { $type: "akash.cert.v1beta3.GenesisCertificate", owner: "", certificate: undefined }; } export const GenesisCertificate = { - $type: 'akash.cert.v1beta3.GenesisCertificate' as const, + $type: "akash.cert.v1beta3.GenesisCertificate" as const, - encode( - message: GenesisCertificate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: GenesisCertificate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(18).fork(), - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisCertificate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisCertificate(); while (reader.pos < end) { @@ -78,16 +67,14 @@ export const GenesisCertificate = { fromJSON(object: any): GenesisCertificate { return { $type: GenesisCertificate.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, }; }, toJSON(message: GenesisCertificate): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.certificate !== undefined) { @@ -101,11 +88,10 @@ export const GenesisCertificate = { }, fromPartial(object: DeepPartial): GenesisCertificate { const message = createBaseGenesisCertificate(); - message.owner = object.owner ?? ''; - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; + message.owner = object.owner ?? ""; + message.certificate = (object.certificate !== undefined && object.certificate !== null) + ? Certificate.fromPartial(object.certificate) + : undefined; return message; }, }; @@ -113,16 +99,13 @@ export const GenesisCertificate = { messageTypeRegistry.set(GenesisCertificate.$type, GenesisCertificate); function createBaseGenesisState(): GenesisState { - return { $type: 'akash.cert.v1beta3.GenesisState', certificates: [] }; + return { $type: "akash.cert.v1beta3.GenesisState", certificates: [] }; } export const GenesisState = { - $type: 'akash.cert.v1beta3.GenesisState' as const, + $type: "akash.cert.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { GenesisCertificate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -130,8 +113,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -142,9 +124,7 @@ export const GenesisState = { break; } - message.certificates.push( - GenesisCertificate.decode(reader, reader.uint32()), - ); + message.certificates.push(GenesisCertificate.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -167,9 +147,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.certificates?.length) { - obj.certificates = message.certificates.map((e) => - GenesisCertificate.toJSON(e), - ); + obj.certificates = message.certificates.map((e) => GenesisCertificate.toJSON(e)); } return obj; }, @@ -179,34 +157,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.certificates = - object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; + message.certificates = object.certificates?.map((e) => GenesisCertificate.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/cert/v1beta3/query.ts b/ts/src/generated/akash/cert/v1beta3/query.ts index 453b0b00..05a5437f 100644 --- a/ts/src/generated/akash/cert/v1beta3/query.ts +++ b/ts/src/generated/akash/cert/v1beta3/query.ts @@ -1,64 +1,50 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Certificate, CertificateFilter } from './cert'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Certificate, CertificateFilter } from "./cert"; /** CertificateResponse contains a single X509 certificate and its serial number */ export interface CertificateResponse { - $type: 'akash.cert.v1beta3.CertificateResponse'; + $type: "akash.cert.v1beta3.CertificateResponse"; certificate: Certificate | undefined; serial: string; } /** QueryDeploymentsRequest is request type for the Query/Deployments RPC method */ export interface QueryCertificatesRequest { - $type: 'akash.cert.v1beta3.QueryCertificatesRequest'; + $type: "akash.cert.v1beta3.QueryCertificatesRequest"; filter: CertificateFilter | undefined; pagination: PageRequest | undefined; } /** QueryCertificatesResponse is response type for the Query/Certificates RPC method */ export interface QueryCertificatesResponse { - $type: 'akash.cert.v1beta3.QueryCertificatesResponse'; + $type: "akash.cert.v1beta3.QueryCertificatesResponse"; certificates: CertificateResponse[]; pagination: PageResponse | undefined; } function createBaseCertificateResponse(): CertificateResponse { - return { - $type: 'akash.cert.v1beta3.CertificateResponse', - certificate: undefined, - serial: '', - }; + return { $type: "akash.cert.v1beta3.CertificateResponse", certificate: undefined, serial: "" }; } export const CertificateResponse = { - $type: 'akash.cert.v1beta3.CertificateResponse' as const, + $type: "akash.cert.v1beta3.CertificateResponse" as const, - encode( - message: CertificateResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: CertificateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.certificate !== undefined) { - Certificate.encode( - message.certificate, - writer.uint32(10).fork(), - ).ldelim(); + Certificate.encode(message.certificate, writer.uint32(10).fork()).ldelim(); } - if (message.serial !== '') { + if (message.serial !== "") { writer.uint32(18).string(message.serial); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CertificateResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCertificateResponse(); while (reader.pos < end) { @@ -90,10 +76,8 @@ export const CertificateResponse = { fromJSON(object: any): CertificateResponse { return { $type: CertificateResponse.$type, - certificate: isSet(object.certificate) - ? Certificate.fromJSON(object.certificate) - : undefined, - serial: isSet(object.serial) ? globalThis.String(object.serial) : '', + certificate: isSet(object.certificate) ? Certificate.fromJSON(object.certificate) : undefined, + serial: isSet(object.serial) ? globalThis.String(object.serial) : "", }; }, @@ -102,7 +86,7 @@ export const CertificateResponse = { if (message.certificate !== undefined) { obj.certificate = Certificate.toJSON(message.certificate); } - if (message.serial !== '') { + if (message.serial !== "") { obj.serial = message.serial; } return obj; @@ -113,11 +97,10 @@ export const CertificateResponse = { }, fromPartial(object: DeepPartial): CertificateResponse { const message = createBaseCertificateResponse(); - message.certificate = - object.certificate !== undefined && object.certificate !== null - ? Certificate.fromPartial(object.certificate) - : undefined; - message.serial = object.serial ?? ''; + message.certificate = (object.certificate !== undefined && object.certificate !== null) + ? Certificate.fromPartial(object.certificate) + : undefined; + message.serial = object.serial ?? ""; return message; }, }; @@ -125,25 +108,15 @@ export const CertificateResponse = { messageTypeRegistry.set(CertificateResponse.$type, CertificateResponse); function createBaseQueryCertificatesRequest(): QueryCertificatesRequest { - return { - $type: 'akash.cert.v1beta3.QueryCertificatesRequest', - filter: undefined, - pagination: undefined, - }; + return { $type: "akash.cert.v1beta3.QueryCertificatesRequest", filter: undefined, pagination: undefined }; } export const QueryCertificatesRequest = { - $type: 'akash.cert.v1beta3.QueryCertificatesRequest' as const, + $type: "akash.cert.v1beta3.QueryCertificatesRequest" as const, - encode( - message: QueryCertificatesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryCertificatesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filter !== undefined) { - CertificateFilter.encode( - message.filter, - writer.uint32(10).fork(), - ).ldelim(); + CertificateFilter.encode(message.filter, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -151,12 +124,8 @@ export const QueryCertificatesRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryCertificatesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesRequest(); while (reader.pos < end) { @@ -188,12 +157,8 @@ export const QueryCertificatesRequest = { fromJSON(object: any): QueryCertificatesRequest { return { $type: QueryCertificatesRequest.$type, - filter: isSet(object.filter) - ? CertificateFilter.fromJSON(object.filter) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filter: isSet(object.filter) ? CertificateFilter.fromJSON(object.filter) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -208,65 +173,42 @@ export const QueryCertificatesRequest = { return obj; }, - create( - base?: DeepPartial, - ): QueryCertificatesRequest { + create(base?: DeepPartial): QueryCertificatesRequest { return QueryCertificatesRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryCertificatesRequest { + fromPartial(object: DeepPartial): QueryCertificatesRequest { const message = createBaseQueryCertificatesRequest(); - message.filter = - object.filter !== undefined && object.filter !== null - ? CertificateFilter.fromPartial(object.filter) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filter = (object.filter !== undefined && object.filter !== null) + ? CertificateFilter.fromPartial(object.filter) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryCertificatesRequest.$type, - QueryCertificatesRequest, -); +messageTypeRegistry.set(QueryCertificatesRequest.$type, QueryCertificatesRequest); function createBaseQueryCertificatesResponse(): QueryCertificatesResponse { - return { - $type: 'akash.cert.v1beta3.QueryCertificatesResponse', - certificates: [], - pagination: undefined, - }; + return { $type: "akash.cert.v1beta3.QueryCertificatesResponse", certificates: [], pagination: undefined }; } export const QueryCertificatesResponse = { - $type: 'akash.cert.v1beta3.QueryCertificatesResponse' as const, + $type: "akash.cert.v1beta3.QueryCertificatesResponse" as const, - encode( - message: QueryCertificatesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryCertificatesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.certificates) { CertificateResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryCertificatesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryCertificatesResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryCertificatesResponse(); while (reader.pos < end) { @@ -277,9 +219,7 @@ export const QueryCertificatesResponse = { break; } - message.certificates.push( - CertificateResponse.decode(reader, reader.uint32()), - ); + message.certificates.push(CertificateResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -303,18 +243,14 @@ export const QueryCertificatesResponse = { certificates: globalThis.Array.isArray(object?.certificates) ? object.certificates.map((e: any) => CertificateResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryCertificatesResponse): unknown { const obj: any = {}; if (message.certificates?.length) { - obj.certificates = message.certificates.map((e) => - CertificateResponse.toJSON(e), - ); + obj.certificates = message.certificates.map((e) => CertificateResponse.toJSON(e)); } if (message.pagination !== undefined) { obj.pagination = PageResponse.toJSON(message.pagination); @@ -322,39 +258,28 @@ export const QueryCertificatesResponse = { return obj; }, - create( - base?: DeepPartial, - ): QueryCertificatesResponse { + create(base?: DeepPartial): QueryCertificatesResponse { return QueryCertificatesResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryCertificatesResponse { + fromPartial(object: DeepPartial): QueryCertificatesResponse { const message = createBaseQueryCertificatesResponse(); - message.certificates = - object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.certificates = object.certificates?.map((e) => CertificateResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryCertificatesResponse.$type, - QueryCertificatesResponse, -); +messageTypeRegistry.set(QueryCertificatesResponse.$type, QueryCertificatesResponse); /** Query defines the gRPC querier service */ export interface Query { /** Certificates queries certificates */ - Certificates( - request: QueryCertificatesRequest, - ): Promise; + Certificates(request: QueryCertificatesRequest): Promise; } -export const QueryServiceName = 'akash.cert.v1beta3.Query'; +export const QueryServiceName = "akash.cert.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -363,45 +288,24 @@ export class QueryClientImpl implements Query { this.rpc = rpc; this.Certificates = this.Certificates.bind(this); } - Certificates( - request: QueryCertificatesRequest, - ): Promise { + Certificates(request: QueryCertificatesRequest): Promise { const data = QueryCertificatesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Certificates', data); - return promise.then((data) => - QueryCertificatesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Certificates", data); + return promise.then((data) => QueryCertificatesResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/authz.ts b/ts/src/generated/akash/deployment/v1beta1/authz.ts index 9c6165f7..95f28989 100644 --- a/ts/src/generated/akash/deployment/v1beta1/authz.ts +++ b/ts/src/generated/akash/deployment/v1beta1/authz.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** * DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from * the granter's account for a deployment. */ export interface DepositDeploymentAuthorization { - $type: 'akash.deployment.v1beta1.DepositDeploymentAuthorization'; + $type: "akash.deployment.v1beta1.DepositDeploymentAuthorization"; /** * SpendLimit is the amount the grantee is authorized to spend from the granter's account for * the purpose of deployment. @@ -18,31 +18,21 @@ export interface DepositDeploymentAuthorization { } function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { - return { - $type: 'akash.deployment.v1beta1.DepositDeploymentAuthorization', - spendLimit: undefined, - }; + return { $type: "akash.deployment.v1beta1.DepositDeploymentAuthorization", spendLimit: undefined }; } export const DepositDeploymentAuthorization = { - $type: 'akash.deployment.v1beta1.DepositDeploymentAuthorization' as const, + $type: "akash.deployment.v1beta1.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DepositDeploymentAuthorization { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); while (reader.pos < end) { @@ -67,9 +57,7 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined, }; }, @@ -81,48 +69,27 @@ export const DepositDeploymentAuthorization = { return obj; }, - create( - base?: DeepPartial, - ): DepositDeploymentAuthorization { + create(base?: DeepPartial): DepositDeploymentAuthorization { return DepositDeploymentAuthorization.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): DepositDeploymentAuthorization { + fromPartial(object: DeepPartial): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = (object.spendLimit !== undefined && object.spendLimit !== null) + ? Coin.fromPartial(object.spendLimit) + : undefined; return message; }, }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization, -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/deployment.ts b/ts/src/generated/akash/deployment/v1beta1/deployment.ts index af7047ab..336e07aa 100644 --- a/ts/src/generated/akash/deployment/v1beta1/deployment.ts +++ b/ts/src/generated/akash/deployment/v1beta1/deployment.ts @@ -1,8 +1,8 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; import { GroupSpec, MsgCloseGroup, @@ -11,11 +11,11 @@ import { MsgPauseGroupResponse, MsgStartGroup, MsgStartGroupResponse, -} from './group'; +} from "./group"; /** MsgCreateDeployment defines an SDK message for creating deployment */ export interface MsgCreateDeployment { - $type: 'akash.deployment.v1beta1.MsgCreateDeployment'; + $type: "akash.deployment.v1beta1.MsgCreateDeployment"; id: DeploymentID | undefined; groups: GroupSpec[]; version: Uint8Array; @@ -24,24 +24,24 @@ export interface MsgCreateDeployment { /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgCreateDeploymentResponse { - $type: 'akash.deployment.v1beta1.MsgCreateDeploymentResponse'; + $type: "akash.deployment.v1beta1.MsgCreateDeploymentResponse"; } /** MsgDepositDeployment deposits more funds into the deposit account */ export interface MsgDepositDeployment { - $type: 'akash.deployment.v1beta1.MsgDepositDeployment'; + $type: "akash.deployment.v1beta1.MsgDepositDeployment"; id: DeploymentID | undefined; amount: Coin | undefined; } /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgDepositDeploymentResponse { - $type: 'akash.deployment.v1beta1.MsgDepositDeploymentResponse'; + $type: "akash.deployment.v1beta1.MsgDepositDeploymentResponse"; } /** MsgUpdateDeployment defines an SDK message for updating deployment */ export interface MsgUpdateDeployment { - $type: 'akash.deployment.v1beta1.MsgUpdateDeployment'; + $type: "akash.deployment.v1beta1.MsgUpdateDeployment"; id: DeploymentID | undefined; groups: GroupSpec[]; version: Uint8Array; @@ -49,30 +49,30 @@ export interface MsgUpdateDeployment { /** MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. */ export interface MsgUpdateDeploymentResponse { - $type: 'akash.deployment.v1beta1.MsgUpdateDeploymentResponse'; + $type: "akash.deployment.v1beta1.MsgUpdateDeploymentResponse"; } /** MsgCloseDeployment defines an SDK message for closing deployment */ export interface MsgCloseDeployment { - $type: 'akash.deployment.v1beta1.MsgCloseDeployment'; + $type: "akash.deployment.v1beta1.MsgCloseDeployment"; id: DeploymentID | undefined; } /** MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. */ export interface MsgCloseDeploymentResponse { - $type: 'akash.deployment.v1beta1.MsgCloseDeploymentResponse'; + $type: "akash.deployment.v1beta1.MsgCloseDeploymentResponse"; } /** DeploymentID stores owner and sequence number */ export interface DeploymentID { - $type: 'akash.deployment.v1beta1.DeploymentID'; + $type: "akash.deployment.v1beta1.DeploymentID"; owner: string; dseq: Long; } /** Deployment stores deploymentID, state and version details */ export interface Deployment { - $type: 'akash.deployment.v1beta1.Deployment'; + $type: "akash.deployment.v1beta1.Deployment"; deploymentId: DeploymentID | undefined; state: Deployment_State; version: Uint8Array; @@ -93,16 +93,16 @@ export enum Deployment_State { export function deployment_StateFromJSON(object: any): Deployment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Deployment_State.invalid; case 1: - case 'active': + case "active": return Deployment_State.active; case 2: - case 'closed': + case "closed": return Deployment_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Deployment_State.UNRECOGNIZED; } @@ -111,20 +111,20 @@ export function deployment_StateFromJSON(object: any): Deployment_State { export function deployment_StateToJSON(object: Deployment_State): string { switch (object) { case Deployment_State.invalid: - return 'invalid'; + return "invalid"; case Deployment_State.active: - return 'active'; + return "active"; case Deployment_State.closed: - return 'closed'; + return "closed"; case Deployment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** DeploymentFilters defines filters used to filter deployments */ export interface DeploymentFilters { - $type: 'akash.deployment.v1beta1.DeploymentFilters'; + $type: "akash.deployment.v1beta1.DeploymentFilters"; owner: string; dseq: Long; state: string; @@ -132,7 +132,7 @@ export interface DeploymentFilters { function createBaseMsgCreateDeployment(): MsgCreateDeployment { return { - $type: 'akash.deployment.v1beta1.MsgCreateDeployment', + $type: "akash.deployment.v1beta1.MsgCreateDeployment", id: undefined, groups: [], version: new Uint8Array(0), @@ -141,12 +141,9 @@ function createBaseMsgCreateDeployment(): MsgCreateDeployment { } export const MsgCreateDeployment = { - $type: 'akash.deployment.v1beta1.MsgCreateDeployment' as const, + $type: "akash.deployment.v1beta1.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -163,8 +160,7 @@ export const MsgCreateDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeployment(); while (reader.pos < end) { @@ -211,15 +207,9 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, }; }, @@ -245,16 +235,12 @@ export const MsgCreateDeployment = { }, fromPartial(object: DeepPartial): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(0); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; return message; }, }; @@ -262,25 +248,18 @@ export const MsgCreateDeployment = { messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { - return { $type: 'akash.deployment.v1beta1.MsgCreateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta1.MsgCreateDeploymentResponse" }; } export const MsgCreateDeploymentResponse = { - $type: 'akash.deployment.v1beta1.MsgCreateDeploymentResponse' as const, + $type: "akash.deployment.v1beta1.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); while (reader.pos < end) { @@ -304,39 +283,25 @@ export const MsgCreateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateDeploymentResponse { + create(base?: DeepPartial): MsgCreateDeploymentResponse { return MsgCreateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateDeploymentResponse { + fromPartial(_: DeepPartial): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse, -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { - return { - $type: 'akash.deployment.v1beta1.MsgDepositDeployment', - id: undefined, - amount: undefined, - }; + return { $type: "akash.deployment.v1beta1.MsgDepositDeployment", id: undefined, amount: undefined }; } export const MsgDepositDeployment = { - $type: 'akash.deployment.v1beta1.MsgDepositDeployment' as const, + $type: "akash.deployment.v1beta1.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -346,12 +311,8 @@ export const MsgDepositDeployment = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); while (reader.pos < end) { @@ -404,14 +365,10 @@ export const MsgDepositDeployment = { }, fromPartial(object: DeepPartial): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = (object.amount !== undefined && object.amount !== null) + ? Coin.fromPartial(object.amount) + : undefined; return message; }, }; @@ -419,25 +376,18 @@ export const MsgDepositDeployment = { messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse { - return { $type: 'akash.deployment.v1beta1.MsgDepositDeploymentResponse' }; + return { $type: "akash.deployment.v1beta1.MsgDepositDeploymentResponse" }; } export const MsgDepositDeploymentResponse = { - $type: 'akash.deployment.v1beta1.MsgDepositDeploymentResponse' as const, + $type: "akash.deployment.v1beta1.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); while (reader.pos < end) { @@ -461,27 +411,20 @@ export const MsgDepositDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDepositDeploymentResponse { + create(base?: DeepPartial): MsgDepositDeploymentResponse { return MsgDepositDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDepositDeploymentResponse { + fromPartial(_: DeepPartial): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse, -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { return { - $type: 'akash.deployment.v1beta1.MsgUpdateDeployment', + $type: "akash.deployment.v1beta1.MsgUpdateDeployment", id: undefined, groups: [], version: new Uint8Array(0), @@ -489,12 +432,9 @@ function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { } export const MsgUpdateDeployment = { - $type: 'akash.deployment.v1beta1.MsgUpdateDeployment' as const, + $type: "akash.deployment.v1beta1.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -508,8 +448,7 @@ export const MsgUpdateDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeployment(); while (reader.pos < end) { @@ -549,12 +488,8 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), }; }, @@ -577,10 +512,7 @@ export const MsgUpdateDeployment = { }, fromPartial(object: DeepPartial): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(0); return message; @@ -590,25 +522,18 @@ export const MsgUpdateDeployment = { messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { - return { $type: 'akash.deployment.v1beta1.MsgUpdateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta1.MsgUpdateDeploymentResponse" }; } export const MsgUpdateDeploymentResponse = { - $type: 'akash.deployment.v1beta1.MsgUpdateDeploymentResponse' as const, + $type: "akash.deployment.v1beta1.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); while (reader.pos < end) { @@ -632,38 +557,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateDeploymentResponse { + create(base?: DeepPartial): MsgUpdateDeploymentResponse { return MsgUpdateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateDeploymentResponse { + fromPartial(_: DeepPartial): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse, -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { - return { - $type: 'akash.deployment.v1beta1.MsgCloseDeployment', - id: undefined, - }; + return { $type: "akash.deployment.v1beta1.MsgCloseDeployment", id: undefined }; } export const MsgCloseDeployment = { - $type: 'akash.deployment.v1beta1.MsgCloseDeployment' as const, + $type: "akash.deployment.v1beta1.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -671,8 +583,7 @@ export const MsgCloseDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeployment(); while (reader.pos < end) { @@ -695,10 +606,7 @@ export const MsgCloseDeployment = { }, fromJSON(object: any): MsgCloseDeployment { - return { - $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { @@ -714,10 +622,7 @@ export const MsgCloseDeployment = { }, fromPartial(object: DeepPartial): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -725,25 +630,18 @@ export const MsgCloseDeployment = { messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { - return { $type: 'akash.deployment.v1beta1.MsgCloseDeploymentResponse' }; + return { $type: "akash.deployment.v1beta1.MsgCloseDeploymentResponse" }; } export const MsgCloseDeploymentResponse = { - $type: 'akash.deployment.v1beta1.MsgCloseDeploymentResponse' as const, + $type: "akash.deployment.v1beta1.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); while (reader.pos < end) { @@ -767,40 +665,26 @@ export const MsgCloseDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCloseDeploymentResponse { + create(base?: DeepPartial): MsgCloseDeploymentResponse { return MsgCloseDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCloseDeploymentResponse { + fromPartial(_: DeepPartial): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse, -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); function createBaseDeploymentID(): DeploymentID { - return { - $type: 'akash.deployment.v1beta1.DeploymentID', - owner: '', - dseq: Long.UZERO, - }; + return { $type: "akash.deployment.v1beta1.DeploymentID", owner: "", dseq: Long.UZERO }; } export const DeploymentID = { - $type: 'akash.deployment.v1beta1.DeploymentID' as const, + $type: "akash.deployment.v1beta1.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -810,8 +694,7 @@ export const DeploymentID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentID(); while (reader.pos < end) { @@ -843,14 +726,14 @@ export const DeploymentID = { fromJSON(object: any): DeploymentID { return { $type: DeploymentID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -864,11 +747,8 @@ export const DeploymentID = { }, fromPartial(object: DeepPartial): DeploymentID { const message = createBaseDeploymentID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; return message; }, }; @@ -877,7 +757,7 @@ messageTypeRegistry.set(DeploymentID.$type, DeploymentID); function createBaseDeployment(): Deployment { return { - $type: 'akash.deployment.v1beta1.Deployment', + $type: "akash.deployment.v1beta1.Deployment", deploymentId: undefined, state: 0, version: new Uint8Array(0), @@ -886,17 +766,11 @@ function createBaseDeployment(): Deployment { } export const Deployment = { - $type: 'akash.deployment.v1beta1.Deployment' as const, + $type: "akash.deployment.v1beta1.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -911,8 +785,7 @@ export const Deployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Deployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeployment(); while (reader.pos < end) { @@ -958,16 +831,10 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -993,16 +860,14 @@ export const Deployment = { }, fromPartial(object: DeepPartial): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = (object.deploymentId !== undefined && object.deploymentId !== null) + ? DeploymentID.fromPartial(object.deploymentId) + : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(0); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -1010,36 +875,27 @@ export const Deployment = { messageTypeRegistry.set(Deployment.$type, Deployment); function createBaseDeploymentFilters(): DeploymentFilters { - return { - $type: 'akash.deployment.v1beta1.DeploymentFilters', - owner: '', - dseq: Long.UZERO, - state: '', - }; + return { $type: "akash.deployment.v1beta1.DeploymentFilters", owner: "", dseq: Long.UZERO, state: "" }; } export const DeploymentFilters = { - $type: 'akash.deployment.v1beta1.DeploymentFilters' as const, + $type: "akash.deployment.v1beta1.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { writer.uint32(16).uint64(message.dseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(26).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentFilters(); while (reader.pos < end) { @@ -1078,21 +934,21 @@ export const DeploymentFilters = { fromJSON(object: any): DeploymentFilters { return { $type: DeploymentFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { obj.dseq = (message.dseq || Long.UZERO).toString(); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -1103,12 +959,9 @@ export const DeploymentFilters = { }, fromPartial(object: DeepPartial): DeploymentFilters { const message = createBaseDeploymentFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; - message.state = object.state ?? ''; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; + message.state = object.state ?? ""; return message; }, }; @@ -1118,21 +971,13 @@ messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment, - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment, - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment, - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -1141,7 +986,7 @@ export interface Msg { StartGroup(request: MsgStartGroup): Promise; } -export const MsgServiceName = 'akash.deployment.v1beta1.Msg'; +export const MsgServiceName = "akash.deployment.v1beta1.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -1156,82 +1001,56 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment, - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateDeployment', data); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateDeployment", data); + return promise.then((data) => MsgCreateDeploymentResponse.decode(_m0.Reader.create(data))); } - DepositDeployment( - request: MsgDepositDeployment, - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DepositDeployment', data); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DepositDeployment", data); + return promise.then((data) => MsgDepositDeploymentResponse.decode(_m0.Reader.create(data))); } - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateDeployment', data); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateDeployment", data); + return promise.then((data) => MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data))); } - CloseDeployment( - request: MsgCloseDeployment, - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseDeployment', data); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseDeployment", data); + return promise.then((data) => MsgCloseDeploymentResponse.decode(_m0.Reader.create(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseGroup', data); - return promise.then((data) => - MsgCloseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseGroup", data); + return promise.then((data) => MsgCloseGroupResponse.decode(_m0.Reader.create(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'PauseGroup', data); - return promise.then((data) => - MsgPauseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "PauseGroup", data); + return promise.then((data) => MsgPauseGroupResponse.decode(_m0.Reader.create(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'StartGroup', data); - return promise.then((data) => - MsgStartGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "StartGroup", data); + return promise.then((data) => MsgStartGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -1244,36 +1063,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/genesis.ts b/ts/src/generated/akash/deployment/v1beta1/genesis.ts index d664395b..4cc04170 100644 --- a/ts/src/generated/akash/deployment/v1beta1/genesis.ts +++ b/ts/src/generated/akash/deployment/v1beta1/genesis.ts @@ -1,40 +1,33 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Deployment } from './deployment'; -import { Group } from './group'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Deployment } from "./deployment"; +import { Group } from "./group"; +import { Params } from "./params"; /** GenesisDeployment defines the basic genesis state used by deployment module */ export interface GenesisDeployment { - $type: 'akash.deployment.v1beta1.GenesisDeployment'; + $type: "akash.deployment.v1beta1.GenesisDeployment"; deployment: Deployment | undefined; groups: Group[]; } /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.deployment.v1beta1.GenesisState'; + $type: "akash.deployment.v1beta1.GenesisState"; deployments: GenesisDeployment[]; params: Params | undefined; } function createBaseGenesisDeployment(): GenesisDeployment { - return { - $type: 'akash.deployment.v1beta1.GenesisDeployment', - deployment: undefined, - groups: [], - }; + return { $type: "akash.deployment.v1beta1.GenesisDeployment", deployment: undefined, groups: [] }; } export const GenesisDeployment = { - $type: 'akash.deployment.v1beta1.GenesisDeployment' as const, + $type: "akash.deployment.v1beta1.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -45,8 +38,7 @@ export const GenesisDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisDeployment(); while (reader.pos < end) { @@ -78,12 +70,8 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], }; }, @@ -103,10 +91,9 @@ export const GenesisDeployment = { }, fromPartial(object: DeepPartial): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; return message; }, @@ -115,20 +102,13 @@ export const GenesisDeployment = { messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.deployment.v1beta1.GenesisState', - deployments: [], - params: undefined, - }; + return { $type: "akash.deployment.v1beta1.GenesisState", deployments: [], params: undefined }; } export const GenesisState = { - $type: 'akash.deployment.v1beta1.GenesisState' as const, + $type: "akash.deployment.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -139,8 +119,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -151,9 +130,7 @@ export const GenesisState = { break; } - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()), - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -184,9 +161,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - GenesisDeployment.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => GenesisDeployment.toJSON(e)); } if (message.params !== undefined) { obj.params = Params.toJSON(message.params); @@ -199,38 +174,23 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/group.ts b/ts/src/generated/akash/deployment/v1beta1/group.ts index 0294d3ff..cd4bcc12 100644 --- a/ts/src/generated/akash/deployment/v1beta1/group.ts +++ b/ts/src/generated/akash/deployment/v1beta1/group.ts @@ -1,47 +1,47 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { PlacementRequirements } from '../../base/v1beta1/attribute'; -import { ResourceUnits } from '../../base/v1beta1/resource'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { PlacementRequirements } from "../../base/v1beta1/attribute"; +import { ResourceUnits } from "../../base/v1beta1/resource"; /** MsgCloseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgCloseGroup { - $type: 'akash.deployment.v1beta1.MsgCloseGroup'; + $type: "akash.deployment.v1beta1.MsgCloseGroup"; id: GroupID | undefined; } /** MsgCloseGroupResponse defines the Msg/CloseGroup response type. */ export interface MsgCloseGroupResponse { - $type: 'akash.deployment.v1beta1.MsgCloseGroupResponse'; + $type: "akash.deployment.v1beta1.MsgCloseGroupResponse"; } /** MsgPauseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgPauseGroup { - $type: 'akash.deployment.v1beta1.MsgPauseGroup'; + $type: "akash.deployment.v1beta1.MsgPauseGroup"; id: GroupID | undefined; } /** MsgPauseGroupResponse defines the Msg/PauseGroup response type. */ export interface MsgPauseGroupResponse { - $type: 'akash.deployment.v1beta1.MsgPauseGroupResponse'; + $type: "akash.deployment.v1beta1.MsgPauseGroupResponse"; } /** MsgStartGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgStartGroup { - $type: 'akash.deployment.v1beta1.MsgStartGroup'; + $type: "akash.deployment.v1beta1.MsgStartGroup"; id: GroupID | undefined; } /** MsgStartGroupResponse defines the Msg/StartGroup response type. */ export interface MsgStartGroupResponse { - $type: 'akash.deployment.v1beta1.MsgStartGroupResponse'; + $type: "akash.deployment.v1beta1.MsgStartGroupResponse"; } /** GroupID stores owner, deployment sequence number and group sequence number */ export interface GroupID { - $type: 'akash.deployment.v1beta1.GroupID'; + $type: "akash.deployment.v1beta1.GroupID"; owner: string; dseq: Long; gseq: number; @@ -49,7 +49,7 @@ export interface GroupID { /** GroupSpec stores group specifications */ export interface GroupSpec { - $type: 'akash.deployment.v1beta1.GroupSpec'; + $type: "akash.deployment.v1beta1.GroupSpec"; name: string; requirements: PlacementRequirements | undefined; resources: Resource[]; @@ -57,7 +57,7 @@ export interface GroupSpec { /** Group stores group id, state and specifications of group */ export interface Group { - $type: 'akash.deployment.v1beta1.Group'; + $type: "akash.deployment.v1beta1.Group"; groupId: GroupID | undefined; state: Group_State; groupSpec: GroupSpec | undefined; @@ -82,22 +82,22 @@ export enum Group_State { export function group_StateFromJSON(object: any): Group_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Group_State.invalid; case 1: - case 'open': + case "open": return Group_State.open; case 2: - case 'paused': + case "paused": return Group_State.paused; case 3: - case 'insufficient_funds': + case "insufficient_funds": return Group_State.insufficient_funds; case 4: - case 'closed': + case "closed": return Group_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Group_State.UNRECOGNIZED; } @@ -106,40 +106,37 @@ export function group_StateFromJSON(object: any): Group_State { export function group_StateToJSON(object: Group_State): string { switch (object) { case Group_State.invalid: - return 'invalid'; + return "invalid"; case Group_State.open: - return 'open'; + return "open"; case Group_State.paused: - return 'paused'; + return "paused"; case Group_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Group_State.closed: - return 'closed'; + return "closed"; case Group_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** Resource stores unit, total count and price of resource */ export interface Resource { - $type: 'akash.deployment.v1beta1.Resource'; + $type: "akash.deployment.v1beta1.Resource"; resources: ResourceUnits | undefined; count: number; price: Coin | undefined; } function createBaseMsgCloseGroup(): MsgCloseGroup { - return { $type: 'akash.deployment.v1beta1.MsgCloseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta1.MsgCloseGroup", id: undefined }; } export const MsgCloseGroup = { - $type: 'akash.deployment.v1beta1.MsgCloseGroup' as const, + $type: "akash.deployment.v1beta1.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -147,8 +144,7 @@ export const MsgCloseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroup(); while (reader.pos < end) { @@ -171,10 +167,7 @@ export const MsgCloseGroup = { }, fromJSON(object: any): MsgCloseGroup { - return { - $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { @@ -190,10 +183,7 @@ export const MsgCloseGroup = { }, fromPartial(object: DeepPartial): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -201,25 +191,18 @@ export const MsgCloseGroup = { messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { - return { $type: 'akash.deployment.v1beta1.MsgCloseGroupResponse' }; + return { $type: "akash.deployment.v1beta1.MsgCloseGroupResponse" }; } export const MsgCloseGroupResponse = { - $type: 'akash.deployment.v1beta1.MsgCloseGroupResponse' as const, + $type: "akash.deployment.v1beta1.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); while (reader.pos < end) { @@ -255,16 +238,13 @@ export const MsgCloseGroupResponse = { messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); function createBaseMsgPauseGroup(): MsgPauseGroup { - return { $type: 'akash.deployment.v1beta1.MsgPauseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta1.MsgPauseGroup", id: undefined }; } export const MsgPauseGroup = { - $type: 'akash.deployment.v1beta1.MsgPauseGroup' as const, + $type: "akash.deployment.v1beta1.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -272,8 +252,7 @@ export const MsgPauseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroup(); while (reader.pos < end) { @@ -296,10 +275,7 @@ export const MsgPauseGroup = { }, fromJSON(object: any): MsgPauseGroup { - return { - $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgPauseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { @@ -315,10 +291,7 @@ export const MsgPauseGroup = { }, fromPartial(object: DeepPartial): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -326,25 +299,18 @@ export const MsgPauseGroup = { messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { - return { $type: 'akash.deployment.v1beta1.MsgPauseGroupResponse' }; + return { $type: "akash.deployment.v1beta1.MsgPauseGroupResponse" }; } export const MsgPauseGroupResponse = { - $type: 'akash.deployment.v1beta1.MsgPauseGroupResponse' as const, + $type: "akash.deployment.v1beta1.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgPauseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); while (reader.pos < end) { @@ -380,16 +346,13 @@ export const MsgPauseGroupResponse = { messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); function createBaseMsgStartGroup(): MsgStartGroup { - return { $type: 'akash.deployment.v1beta1.MsgStartGroup', id: undefined }; + return { $type: "akash.deployment.v1beta1.MsgStartGroup", id: undefined }; } export const MsgStartGroup = { - $type: 'akash.deployment.v1beta1.MsgStartGroup' as const, + $type: "akash.deployment.v1beta1.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -397,8 +360,7 @@ export const MsgStartGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroup(); while (reader.pos < end) { @@ -421,10 +383,7 @@ export const MsgStartGroup = { }, fromJSON(object: any): MsgStartGroup { - return { - $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgStartGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { @@ -440,10 +399,7 @@ export const MsgStartGroup = { }, fromPartial(object: DeepPartial): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -451,25 +407,18 @@ export const MsgStartGroup = { messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { - return { $type: 'akash.deployment.v1beta1.MsgStartGroupResponse' }; + return { $type: "akash.deployment.v1beta1.MsgStartGroupResponse" }; } export const MsgStartGroupResponse = { - $type: 'akash.deployment.v1beta1.MsgStartGroupResponse' as const, + $type: "akash.deployment.v1beta1.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgStartGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); while (reader.pos < end) { @@ -505,22 +454,14 @@ export const MsgStartGroupResponse = { messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); function createBaseGroupID(): GroupID { - return { - $type: 'akash.deployment.v1beta1.GroupID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - }; + return { $type: "akash.deployment.v1beta1.GroupID", owner: "", dseq: Long.UZERO, gseq: 0 }; } export const GroupID = { - $type: 'akash.deployment.v1beta1.GroupID' as const, + $type: "akash.deployment.v1beta1.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -533,8 +474,7 @@ export const GroupID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupID(); while (reader.pos < end) { @@ -573,7 +513,7 @@ export const GroupID = { fromJSON(object: any): GroupID { return { $type: GroupID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, }; @@ -581,7 +521,7 @@ export const GroupID = { toJSON(message: GroupID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -598,11 +538,8 @@ export const GroupID = { }, fromPartial(object: DeepPartial): GroupID { const message = createBaseGroupID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; }, @@ -611,29 +548,18 @@ export const GroupID = { messageTypeRegistry.set(GroupID.$type, GroupID); function createBaseGroupSpec(): GroupSpec { - return { - $type: 'akash.deployment.v1beta1.GroupSpec', - name: '', - requirements: undefined, - resources: [], - }; + return { $type: "akash.deployment.v1beta1.GroupSpec", name: "", requirements: undefined, resources: [] }; } export const GroupSpec = { - $type: 'akash.deployment.v1beta1.GroupSpec' as const, + $type: "akash.deployment.v1beta1.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork(), - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { Resource.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -642,8 +568,7 @@ export const GroupSpec = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupSpec { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupSpec(); while (reader.pos < end) { @@ -661,10 +586,7 @@ export const GroupSpec = { break; } - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32(), - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { @@ -685,10 +607,8 @@ export const GroupSpec = { fromJSON(object: any): GroupSpec { return { $type: GroupSpec.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, resources: globalThis.Array.isArray(object?.resources) ? object.resources.map((e: any) => Resource.fromJSON(e)) : [], @@ -697,7 +617,7 @@ export const GroupSpec = { toJSON(message: GroupSpec): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.requirements !== undefined) { @@ -714,13 +634,11 @@ export const GroupSpec = { }, fromPartial(object: DeepPartial): GroupSpec { const message = createBaseGroupSpec(); - message.name = object.name ?? ''; - message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => Resource.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.requirements = (object.requirements !== undefined && object.requirements !== null) + ? PlacementRequirements.fromPartial(object.requirements) + : undefined; + message.resources = object.resources?.map((e) => Resource.fromPartial(e)) || []; return message; }, }; @@ -729,7 +647,7 @@ messageTypeRegistry.set(GroupSpec.$type, GroupSpec); function createBaseGroup(): Group { return { - $type: 'akash.deployment.v1beta1.Group', + $type: "akash.deployment.v1beta1.Group", groupId: undefined, state: 0, groupSpec: undefined, @@ -738,7 +656,7 @@ function createBaseGroup(): Group { } export const Group = { - $type: 'akash.deployment.v1beta1.Group' as const, + $type: "akash.deployment.v1beta1.Group" as const, encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.groupId !== undefined) { @@ -757,8 +675,7 @@ export const Group = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { @@ -804,16 +721,10 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -839,19 +750,16 @@ export const Group = { }, fromPartial(object: DeepPartial): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = (object.groupId !== undefined && object.groupId !== null) + ? GroupID.fromPartial(object.groupId) + : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = (object.groupSpec !== undefined && object.groupSpec !== null) + ? GroupSpec.fromPartial(object.groupSpec) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -859,26 +767,15 @@ export const Group = { messageTypeRegistry.set(Group.$type, Group); function createBaseResource(): Resource { - return { - $type: 'akash.deployment.v1beta1.Resource', - resources: undefined, - count: 0, - price: undefined, - }; + return { $type: "akash.deployment.v1beta1.Resource", resources: undefined, count: 0, price: undefined }; } export const Resource = { - $type: 'akash.deployment.v1beta1.Resource' as const, + $type: "akash.deployment.v1beta1.Resource" as const, - encode( - message: Resource, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Resource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(10).fork(), - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(10).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(16).uint32(message.count); @@ -890,8 +787,7 @@ export const Resource = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Resource { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResource(); while (reader.pos < end) { @@ -930,9 +826,7 @@ export const Resource = { fromJSON(object: any): Resource { return { $type: Resource.$type, - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, price: isSet(object.price) ? Coin.fromJSON(object.price) : undefined, }; @@ -957,41 +851,24 @@ export const Resource = { }, fromPartial(object: DeepPartial): Resource { const message = createBaseResource(); - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? ResourceUnits.fromPartial(object.resources) + : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? Coin.fromPartial(object.price) - : undefined; + message.price = (object.price !== undefined && object.price !== null) ? Coin.fromPartial(object.price) : undefined; return message; }, }; messageTypeRegistry.set(Resource.$type, Resource); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/params.ts b/ts/src/generated/akash/deployment/v1beta1/params.ts index 2d0ecf58..7f72c29c 100644 --- a/ts/src/generated/akash/deployment/v1beta1/params.ts +++ b/ts/src/generated/akash/deployment/v1beta1/params.ts @@ -1,41 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params defines the parameters for the x/deployment package */ export interface Params { - $type: 'akash.deployment.v1beta1.Params'; + $type: "akash.deployment.v1beta1.Params"; deploymentMinDeposit: Coin | undefined; } function createBaseParams(): Params { - return { - $type: 'akash.deployment.v1beta1.Params', - deploymentMinDeposit: undefined, - }; + return { $type: "akash.deployment.v1beta1.Params", deploymentMinDeposit: undefined }; } export const Params = { - $type: 'akash.deployment.v1beta1.Params' as const, + $type: "akash.deployment.v1beta1.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentMinDeposit !== undefined) { - Coin.encode( - message.deploymentMinDeposit, - writer.uint32(10).fork(), - ).ldelim(); + Coin.encode(message.deploymentMinDeposit, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -60,9 +50,7 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - deploymentMinDeposit: isSet(object.deploymentMinDeposit) - ? Coin.fromJSON(object.deploymentMinDeposit) - : undefined, + deploymentMinDeposit: isSet(object.deploymentMinDeposit) ? Coin.fromJSON(object.deploymentMinDeposit) : undefined, }; }, @@ -79,37 +67,22 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.deploymentMinDeposit = - object.deploymentMinDeposit !== undefined && - object.deploymentMinDeposit !== null - ? Coin.fromPartial(object.deploymentMinDeposit) - : undefined; + message.deploymentMinDeposit = (object.deploymentMinDeposit !== undefined && object.deploymentMinDeposit !== null) + ? Coin.fromPartial(object.deploymentMinDeposit) + : undefined; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta1/query.ts b/ts/src/generated/akash/deployment/v1beta1/query.ts index 10f85a0e..8dd32768 100644 --- a/ts/src/generated/akash/deployment/v1beta1/query.ts +++ b/ts/src/generated/akash/deployment/v1beta1/query.ts @@ -1,38 +1,35 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account } from '../../escrow/v1beta1/types'; -import { Deployment, DeploymentFilters, DeploymentID } from './deployment'; -import { Group, GroupID } from './group'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account } from "../../escrow/v1beta1/types"; +import { Deployment, DeploymentFilters, DeploymentID } from "./deployment"; +import { Group, GroupID } from "./group"; /** QueryDeploymentsRequest is request type for the Query/Deployments RPC method */ export interface QueryDeploymentsRequest { - $type: 'akash.deployment.v1beta1.QueryDeploymentsRequest'; + $type: "akash.deployment.v1beta1.QueryDeploymentsRequest"; filters: DeploymentFilters | undefined; pagination: PageRequest | undefined; } /** QueryDeploymentsResponse is response type for the Query/Deployments RPC method */ export interface QueryDeploymentsResponse { - $type: 'akash.deployment.v1beta1.QueryDeploymentsResponse'; + $type: "akash.deployment.v1beta1.QueryDeploymentsResponse"; deployments: QueryDeploymentResponse[]; pagination: PageResponse | undefined; } /** QueryDeploymentRequest is request type for the Query/Deployment RPC method */ export interface QueryDeploymentRequest { - $type: 'akash.deployment.v1beta1.QueryDeploymentRequest'; + $type: "akash.deployment.v1beta1.QueryDeploymentRequest"; id: DeploymentID | undefined; } /** QueryDeploymentResponse is response type for the Query/Deployment RPC method */ export interface QueryDeploymentResponse { - $type: 'akash.deployment.v1beta1.QueryDeploymentResponse'; + $type: "akash.deployment.v1beta1.QueryDeploymentResponse"; deployment: Deployment | undefined; groups: Group[]; escrowAccount: Account | undefined; @@ -40,36 +37,26 @@ export interface QueryDeploymentResponse { /** QueryGroupRequest is request type for the Query/Group RPC method */ export interface QueryGroupRequest { - $type: 'akash.deployment.v1beta1.QueryGroupRequest'; + $type: "akash.deployment.v1beta1.QueryGroupRequest"; id: GroupID | undefined; } /** QueryGroupResponse is response type for the Query/Group RPC method */ export interface QueryGroupResponse { - $type: 'akash.deployment.v1beta1.QueryGroupResponse'; + $type: "akash.deployment.v1beta1.QueryGroupResponse"; group: Group | undefined; } function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { - return { - $type: 'akash.deployment.v1beta1.QueryDeploymentsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta1.QueryDeploymentsRequest", filters: undefined, pagination: undefined }; } export const QueryDeploymentsRequest = { - $type: 'akash.deployment.v1beta1.QueryDeploymentsRequest' as const, + $type: "akash.deployment.v1beta1.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -77,12 +64,8 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); while (reader.pos < end) { @@ -114,12 +97,8 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -137,18 +116,14 @@ export const QueryDeploymentsRequest = { create(base?: DeepPartial): QueryDeploymentsRequest { return QueryDeploymentsRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsRequest { + fromPartial(object: DeepPartial): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? DeploymentFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -156,38 +131,24 @@ export const QueryDeploymentsRequest = { messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { - return { - $type: 'akash.deployment.v1beta1.QueryDeploymentsResponse', - deployments: [], - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta1.QueryDeploymentsResponse", deployments: [], pagination: undefined }; } export const QueryDeploymentsResponse = { - $type: 'akash.deployment.v1beta1.QueryDeploymentsResponse' as const, + $type: "akash.deployment.v1beta1.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); while (reader.pos < end) { @@ -198,9 +159,7 @@ export const QueryDeploymentsResponse = { break; } - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()), - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -222,22 +181,16 @@ export const QueryDeploymentsResponse = { return { $type: QueryDeploymentsResponse.$type, deployments: globalThis.Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e), - ) + ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - QueryDeploymentResponse.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => QueryDeploymentResponse.toJSON(e)); } if (message.pagination !== undefined) { obj.pagination = PageResponse.toJSON(message.pagination); @@ -245,57 +198,37 @@ export const QueryDeploymentsResponse = { return obj; }, - create( - base?: DeepPartial, - ): QueryDeploymentsResponse { + create(base?: DeepPartial): QueryDeploymentsResponse { return QueryDeploymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsResponse { + fromPartial(object: DeepPartial): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse, -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { - return { - $type: 'akash.deployment.v1beta1.QueryDeploymentRequest', - id: undefined, - }; + return { $type: "akash.deployment.v1beta1.QueryDeploymentRequest", id: undefined }; } export const QueryDeploymentRequest = { - $type: 'akash.deployment.v1beta1.QueryDeploymentRequest' as const, + $type: "akash.deployment.v1beta1.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); while (reader.pos < end) { @@ -318,10 +251,7 @@ export const QueryDeploymentRequest = { }, fromJSON(object: any): QueryDeploymentRequest { - return { - $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: QueryDeploymentRequest.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { @@ -335,14 +265,9 @@ export const QueryDeploymentRequest = { create(base?: DeepPartial): QueryDeploymentRequest { return QueryDeploymentRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentRequest { + fromPartial(object: DeepPartial): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -351,7 +276,7 @@ messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { return { - $type: 'akash.deployment.v1beta1.QueryDeploymentResponse', + $type: "akash.deployment.v1beta1.QueryDeploymentResponse", deployment: undefined, groups: [], escrowAccount: undefined, @@ -359,12 +284,9 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { } export const QueryDeploymentResponse = { - $type: 'akash.deployment.v1beta1.QueryDeploymentResponse' as const, + $type: "akash.deployment.v1beta1.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -377,12 +299,8 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); while (reader.pos < end) { @@ -421,15 +339,9 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -450,19 +362,15 @@ export const QueryDeploymentResponse = { create(base?: DeepPartial): QueryDeploymentResponse { return QueryDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentResponse { + fromPartial(object: DeepPartial): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -470,16 +378,13 @@ export const QueryDeploymentResponse = { messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); function createBaseQueryGroupRequest(): QueryGroupRequest { - return { $type: 'akash.deployment.v1beta1.QueryGroupRequest', id: undefined }; + return { $type: "akash.deployment.v1beta1.QueryGroupRequest", id: undefined }; } export const QueryGroupRequest = { - $type: 'akash.deployment.v1beta1.QueryGroupRequest' as const, + $type: "akash.deployment.v1beta1.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -487,8 +392,7 @@ export const QueryGroupRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupRequest(); while (reader.pos < end) { @@ -511,10 +415,7 @@ export const QueryGroupRequest = { }, fromJSON(object: any): QueryGroupRequest { - return { - $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: QueryGroupRequest.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { @@ -530,10 +431,7 @@ export const QueryGroupRequest = { }, fromPartial(object: DeepPartial): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -541,19 +439,13 @@ export const QueryGroupRequest = { messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { - return { - $type: 'akash.deployment.v1beta1.QueryGroupResponse', - group: undefined, - }; + return { $type: "akash.deployment.v1beta1.QueryGroupResponse", group: undefined }; } export const QueryGroupResponse = { - $type: 'akash.deployment.v1beta1.QueryGroupResponse' as const, + $type: "akash.deployment.v1beta1.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -561,8 +453,7 @@ export const QueryGroupResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupResponse(); while (reader.pos < end) { @@ -585,10 +476,7 @@ export const QueryGroupResponse = { }, fromJSON(object: any): QueryGroupResponse { - return { - $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, - }; + return { $type: QueryGroupResponse.$type, group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { @@ -604,10 +492,7 @@ export const QueryGroupResponse = { }, fromPartial(object: DeepPartial): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = (object.group !== undefined && object.group !== null) ? Group.fromPartial(object.group) : undefined; return message; }, }; @@ -617,16 +502,14 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest, - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ Group(request: QueryGroupRequest): Promise; } -export const QueryServiceName = 'akash.deployment.v1beta1.Query'; +export const QueryServiceName = "akash.deployment.v1beta1.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -637,63 +520,36 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest, - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployments', data); - return promise.then((data) => - QueryDeploymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployments", data); + return promise.then((data) => QueryDeploymentsResponse.decode(_m0.Reader.create(data))); } - Deployment( - request: QueryDeploymentRequest, - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployment', data); - return promise.then((data) => - QueryDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployment", data); + return promise.then((data) => QueryDeploymentResponse.decode(_m0.Reader.create(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Group', data); - return promise.then((data) => - QueryGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Group", data); + return promise.then((data) => QueryGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/authz.ts b/ts/src/generated/akash/deployment/v1beta2/authz.ts index fa9a337e..0a3e7d45 100644 --- a/ts/src/generated/akash/deployment/v1beta2/authz.ts +++ b/ts/src/generated/akash/deployment/v1beta2/authz.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** * DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from * the granter's account for a deployment. */ export interface DepositDeploymentAuthorization { - $type: 'akash.deployment.v1beta2.DepositDeploymentAuthorization'; + $type: "akash.deployment.v1beta2.DepositDeploymentAuthorization"; /** * SpendLimit is the amount the grantee is authorized to spend from the granter's account for * the purpose of deployment. @@ -18,31 +18,21 @@ export interface DepositDeploymentAuthorization { } function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { - return { - $type: 'akash.deployment.v1beta2.DepositDeploymentAuthorization', - spendLimit: undefined, - }; + return { $type: "akash.deployment.v1beta2.DepositDeploymentAuthorization", spendLimit: undefined }; } export const DepositDeploymentAuthorization = { - $type: 'akash.deployment.v1beta2.DepositDeploymentAuthorization' as const, + $type: "akash.deployment.v1beta2.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DepositDeploymentAuthorization { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); while (reader.pos < end) { @@ -67,9 +57,7 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined, }; }, @@ -81,48 +69,27 @@ export const DepositDeploymentAuthorization = { return obj; }, - create( - base?: DeepPartial, - ): DepositDeploymentAuthorization { + create(base?: DeepPartial): DepositDeploymentAuthorization { return DepositDeploymentAuthorization.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): DepositDeploymentAuthorization { + fromPartial(object: DeepPartial): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = (object.spendLimit !== undefined && object.spendLimit !== null) + ? Coin.fromPartial(object.spendLimit) + : undefined; return message; }, }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization, -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/deployment.ts b/ts/src/generated/akash/deployment/v1beta2/deployment.ts index e5f555c5..68fb7e4b 100644 --- a/ts/src/generated/akash/deployment/v1beta2/deployment.ts +++ b/ts/src/generated/akash/deployment/v1beta2/deployment.ts @@ -1,18 +1,18 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** DeploymentID stores owner and sequence number */ export interface DeploymentID { - $type: 'akash.deployment.v1beta2.DeploymentID'; + $type: "akash.deployment.v1beta2.DeploymentID"; owner: string; dseq: Long; } /** Deployment stores deploymentID, state and version details */ export interface Deployment { - $type: 'akash.deployment.v1beta2.Deployment'; + $type: "akash.deployment.v1beta2.Deployment"; deploymentId: DeploymentID | undefined; state: Deployment_State; version: Uint8Array; @@ -33,16 +33,16 @@ export enum Deployment_State { export function deployment_StateFromJSON(object: any): Deployment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Deployment_State.invalid; case 1: - case 'active': + case "active": return Deployment_State.active; case 2: - case 'closed': + case "closed": return Deployment_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Deployment_State.UNRECOGNIZED; } @@ -51,41 +51,34 @@ export function deployment_StateFromJSON(object: any): Deployment_State { export function deployment_StateToJSON(object: Deployment_State): string { switch (object) { case Deployment_State.invalid: - return 'invalid'; + return "invalid"; case Deployment_State.active: - return 'active'; + return "active"; case Deployment_State.closed: - return 'closed'; + return "closed"; case Deployment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** DeploymentFilters defines filters used to filter deployments */ export interface DeploymentFilters { - $type: 'akash.deployment.v1beta2.DeploymentFilters'; + $type: "akash.deployment.v1beta2.DeploymentFilters"; owner: string; dseq: Long; state: string; } function createBaseDeploymentID(): DeploymentID { - return { - $type: 'akash.deployment.v1beta2.DeploymentID', - owner: '', - dseq: Long.UZERO, - }; + return { $type: "akash.deployment.v1beta2.DeploymentID", owner: "", dseq: Long.UZERO }; } export const DeploymentID = { - $type: 'akash.deployment.v1beta2.DeploymentID' as const, + $type: "akash.deployment.v1beta2.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -95,8 +88,7 @@ export const DeploymentID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentID(); while (reader.pos < end) { @@ -128,14 +120,14 @@ export const DeploymentID = { fromJSON(object: any): DeploymentID { return { $type: DeploymentID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -149,11 +141,8 @@ export const DeploymentID = { }, fromPartial(object: DeepPartial): DeploymentID { const message = createBaseDeploymentID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; return message; }, }; @@ -162,7 +151,7 @@ messageTypeRegistry.set(DeploymentID.$type, DeploymentID); function createBaseDeployment(): Deployment { return { - $type: 'akash.deployment.v1beta2.Deployment', + $type: "akash.deployment.v1beta2.Deployment", deploymentId: undefined, state: 0, version: new Uint8Array(0), @@ -171,17 +160,11 @@ function createBaseDeployment(): Deployment { } export const Deployment = { - $type: 'akash.deployment.v1beta2.Deployment' as const, + $type: "akash.deployment.v1beta2.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -196,8 +179,7 @@ export const Deployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Deployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeployment(); while (reader.pos < end) { @@ -243,16 +225,10 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -278,16 +254,14 @@ export const Deployment = { }, fromPartial(object: DeepPartial): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = (object.deploymentId !== undefined && object.deploymentId !== null) + ? DeploymentID.fromPartial(object.deploymentId) + : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(0); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -295,36 +269,27 @@ export const Deployment = { messageTypeRegistry.set(Deployment.$type, Deployment); function createBaseDeploymentFilters(): DeploymentFilters { - return { - $type: 'akash.deployment.v1beta2.DeploymentFilters', - owner: '', - dseq: Long.UZERO, - state: '', - }; + return { $type: "akash.deployment.v1beta2.DeploymentFilters", owner: "", dseq: Long.UZERO, state: "" }; } export const DeploymentFilters = { - $type: 'akash.deployment.v1beta2.DeploymentFilters' as const, + $type: "akash.deployment.v1beta2.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { writer.uint32(16).uint64(message.dseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(26).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentFilters(); while (reader.pos < end) { @@ -363,21 +328,21 @@ export const DeploymentFilters = { fromJSON(object: any): DeploymentFilters { return { $type: DeploymentFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { obj.dseq = (message.dseq || Long.UZERO).toString(); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -388,12 +353,9 @@ export const DeploymentFilters = { }, fromPartial(object: DeepPartial): DeploymentFilters { const message = createBaseDeploymentFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; - message.state = object.state ?? ''; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; + message.state = object.state ?? ""; return message; }, }; @@ -402,7 +364,7 @@ messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -415,36 +377,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/deploymentmsg.ts b/ts/src/generated/akash/deployment/v1beta2/deploymentmsg.ts index 182c1ac7..24a98609 100644 --- a/ts/src/generated/akash/deployment/v1beta2/deploymentmsg.ts +++ b/ts/src/generated/akash/deployment/v1beta2/deploymentmsg.ts @@ -1,82 +1,83 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { DeploymentID } from './deployment'; -import { GroupSpec } from './groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { DeploymentID } from "./deployment"; +import { GroupSpec } from "./groupspec"; /** MsgCreateDeployment defines an SDK message for creating deployment */ export interface MsgCreateDeployment { - $type: 'akash.deployment.v1beta2.MsgCreateDeployment'; + $type: "akash.deployment.v1beta2.MsgCreateDeployment"; id: DeploymentID | undefined; groups: GroupSpec[]; version: Uint8Array; - deposit: Coin | undefined; + deposit: + | Coin + | undefined; /** Depositor pays for the deposit */ depositor: string; } /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgCreateDeploymentResponse { - $type: 'akash.deployment.v1beta2.MsgCreateDeploymentResponse'; + $type: "akash.deployment.v1beta2.MsgCreateDeploymentResponse"; } /** MsgDepositDeployment deposits more funds into the deposit account */ export interface MsgDepositDeployment { - $type: 'akash.deployment.v1beta2.MsgDepositDeployment'; + $type: "akash.deployment.v1beta2.MsgDepositDeployment"; id: DeploymentID | undefined; - amount: Coin | undefined; + amount: + | Coin + | undefined; /** Depositor pays for the deposit */ depositor: string; } /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgDepositDeploymentResponse { - $type: 'akash.deployment.v1beta2.MsgDepositDeploymentResponse'; + $type: "akash.deployment.v1beta2.MsgDepositDeploymentResponse"; } /** MsgUpdateDeployment defines an SDK message for updating deployment */ export interface MsgUpdateDeployment { - $type: 'akash.deployment.v1beta2.MsgUpdateDeployment'; + $type: "akash.deployment.v1beta2.MsgUpdateDeployment"; id: DeploymentID | undefined; version: Uint8Array; } /** MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. */ export interface MsgUpdateDeploymentResponse { - $type: 'akash.deployment.v1beta2.MsgUpdateDeploymentResponse'; + $type: "akash.deployment.v1beta2.MsgUpdateDeploymentResponse"; } /** MsgCloseDeployment defines an SDK message for closing deployment */ export interface MsgCloseDeployment { - $type: 'akash.deployment.v1beta2.MsgCloseDeployment'; + $type: "akash.deployment.v1beta2.MsgCloseDeployment"; id: DeploymentID | undefined; } /** MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. */ export interface MsgCloseDeploymentResponse { - $type: 'akash.deployment.v1beta2.MsgCloseDeploymentResponse'; + $type: "akash.deployment.v1beta2.MsgCloseDeploymentResponse"; } function createBaseMsgCreateDeployment(): MsgCreateDeployment { return { - $type: 'akash.deployment.v1beta2.MsgCreateDeployment', + $type: "akash.deployment.v1beta2.MsgCreateDeployment", id: undefined, groups: [], version: new Uint8Array(0), deposit: undefined, - depositor: '', + depositor: "", }; } export const MsgCreateDeployment = { - $type: 'akash.deployment.v1beta2.MsgCreateDeployment' as const, + $type: "akash.deployment.v1beta2.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -89,15 +90,14 @@ export const MsgCreateDeployment = { if (message.deposit !== undefined) { Coin.encode(message.deposit, writer.uint32(34).fork()).ldelim(); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(42).string(message.depositor); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeployment(); while (reader.pos < end) { @@ -151,18 +151,10 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", }; }, @@ -180,7 +172,7 @@ export const MsgCreateDeployment = { if (message.deposit !== undefined) { obj.deposit = Coin.toJSON(message.deposit); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } return obj; @@ -191,17 +183,13 @@ export const MsgCreateDeployment = { }, fromPartial(object: DeepPartial): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(0); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; - message.depositor = object.depositor ?? ''; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; + message.depositor = object.depositor ?? ""; return message; }, }; @@ -209,25 +197,18 @@ export const MsgCreateDeployment = { messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { - return { $type: 'akash.deployment.v1beta2.MsgCreateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta2.MsgCreateDeploymentResponse" }; } export const MsgCreateDeploymentResponse = { - $type: 'akash.deployment.v1beta2.MsgCreateDeploymentResponse' as const, + $type: "akash.deployment.v1beta2.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); while (reader.pos < end) { @@ -251,58 +232,39 @@ export const MsgCreateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateDeploymentResponse { + create(base?: DeepPartial): MsgCreateDeploymentResponse { return MsgCreateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateDeploymentResponse { + fromPartial(_: DeepPartial): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse, -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { - return { - $type: 'akash.deployment.v1beta2.MsgDepositDeployment', - id: undefined, - amount: undefined, - depositor: '', - }; + return { $type: "akash.deployment.v1beta2.MsgDepositDeployment", id: undefined, amount: undefined, depositor: "" }; } export const MsgDepositDeployment = { - $type: 'akash.deployment.v1beta2.MsgDepositDeployment' as const, + $type: "akash.deployment.v1beta2.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } if (message.amount !== undefined) { Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(26).string(message.depositor); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); while (reader.pos < end) { @@ -343,9 +305,7 @@ export const MsgDepositDeployment = { $type: MsgDepositDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", }; }, @@ -357,7 +317,7 @@ export const MsgDepositDeployment = { if (message.amount !== undefined) { obj.amount = Coin.toJSON(message.amount); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } return obj; @@ -368,15 +328,11 @@ export const MsgDepositDeployment = { }, fromPartial(object: DeepPartial): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; - message.depositor = object.depositor ?? ''; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = (object.amount !== undefined && object.amount !== null) + ? Coin.fromPartial(object.amount) + : undefined; + message.depositor = object.depositor ?? ""; return message; }, }; @@ -384,25 +340,18 @@ export const MsgDepositDeployment = { messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse { - return { $type: 'akash.deployment.v1beta2.MsgDepositDeploymentResponse' }; + return { $type: "akash.deployment.v1beta2.MsgDepositDeploymentResponse" }; } export const MsgDepositDeploymentResponse = { - $type: 'akash.deployment.v1beta2.MsgDepositDeploymentResponse' as const, + $type: "akash.deployment.v1beta2.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); while (reader.pos < end) { @@ -426,39 +375,25 @@ export const MsgDepositDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDepositDeploymentResponse { + create(base?: DeepPartial): MsgDepositDeploymentResponse { return MsgDepositDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDepositDeploymentResponse { + fromPartial(_: DeepPartial): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse, -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { - return { - $type: 'akash.deployment.v1beta2.MsgUpdateDeployment', - id: undefined, - version: new Uint8Array(0), - }; + return { $type: "akash.deployment.v1beta2.MsgUpdateDeployment", id: undefined, version: new Uint8Array(0) }; } export const MsgUpdateDeployment = { - $type: 'akash.deployment.v1beta2.MsgUpdateDeployment' as const, + $type: "akash.deployment.v1beta2.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -469,8 +404,7 @@ export const MsgUpdateDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeployment(); while (reader.pos < end) { @@ -503,9 +437,7 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), }; }, @@ -525,10 +457,7 @@ export const MsgUpdateDeployment = { }, fromPartial(object: DeepPartial): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.version = object.version ?? new Uint8Array(0); return message; }, @@ -537,25 +466,18 @@ export const MsgUpdateDeployment = { messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { - return { $type: 'akash.deployment.v1beta2.MsgUpdateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta2.MsgUpdateDeploymentResponse" }; } export const MsgUpdateDeploymentResponse = { - $type: 'akash.deployment.v1beta2.MsgUpdateDeploymentResponse' as const, + $type: "akash.deployment.v1beta2.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); while (reader.pos < end) { @@ -579,38 +501,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateDeploymentResponse { + create(base?: DeepPartial): MsgUpdateDeploymentResponse { return MsgUpdateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateDeploymentResponse { + fromPartial(_: DeepPartial): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse, -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { - return { - $type: 'akash.deployment.v1beta2.MsgCloseDeployment', - id: undefined, - }; + return { $type: "akash.deployment.v1beta2.MsgCloseDeployment", id: undefined }; } export const MsgCloseDeployment = { - $type: 'akash.deployment.v1beta2.MsgCloseDeployment' as const, + $type: "akash.deployment.v1beta2.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -618,8 +527,7 @@ export const MsgCloseDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeployment(); while (reader.pos < end) { @@ -642,10 +550,7 @@ export const MsgCloseDeployment = { }, fromJSON(object: any): MsgCloseDeployment { - return { - $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { @@ -661,10 +566,7 @@ export const MsgCloseDeployment = { }, fromPartial(object: DeepPartial): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -672,25 +574,18 @@ export const MsgCloseDeployment = { messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { - return { $type: 'akash.deployment.v1beta2.MsgCloseDeploymentResponse' }; + return { $type: "akash.deployment.v1beta2.MsgCloseDeploymentResponse" }; } export const MsgCloseDeploymentResponse = { - $type: 'akash.deployment.v1beta2.MsgCloseDeploymentResponse' as const, + $type: "akash.deployment.v1beta2.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); while (reader.pos < end) { @@ -714,27 +609,20 @@ export const MsgCloseDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCloseDeploymentResponse { + create(base?: DeepPartial): MsgCloseDeploymentResponse { return MsgCloseDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCloseDeploymentResponse { + fromPartial(_: DeepPartial): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse, -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -747,36 +635,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/genesis.ts b/ts/src/generated/akash/deployment/v1beta2/genesis.ts index c64bcc42..3f2eb044 100644 --- a/ts/src/generated/akash/deployment/v1beta2/genesis.ts +++ b/ts/src/generated/akash/deployment/v1beta2/genesis.ts @@ -1,40 +1,33 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Deployment } from './deployment'; -import { Group } from './group'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Deployment } from "./deployment"; +import { Group } from "./group"; +import { Params } from "./params"; /** GenesisDeployment defines the basic genesis state used by deployment module */ export interface GenesisDeployment { - $type: 'akash.deployment.v1beta2.GenesisDeployment'; + $type: "akash.deployment.v1beta2.GenesisDeployment"; deployment: Deployment | undefined; groups: Group[]; } /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.deployment.v1beta2.GenesisState'; + $type: "akash.deployment.v1beta2.GenesisState"; deployments: GenesisDeployment[]; params: Params | undefined; } function createBaseGenesisDeployment(): GenesisDeployment { - return { - $type: 'akash.deployment.v1beta2.GenesisDeployment', - deployment: undefined, - groups: [], - }; + return { $type: "akash.deployment.v1beta2.GenesisDeployment", deployment: undefined, groups: [] }; } export const GenesisDeployment = { - $type: 'akash.deployment.v1beta2.GenesisDeployment' as const, + $type: "akash.deployment.v1beta2.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -45,8 +38,7 @@ export const GenesisDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisDeployment(); while (reader.pos < end) { @@ -78,12 +70,8 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], }; }, @@ -103,10 +91,9 @@ export const GenesisDeployment = { }, fromPartial(object: DeepPartial): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; return message; }, @@ -115,20 +102,13 @@ export const GenesisDeployment = { messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.deployment.v1beta2.GenesisState', - deployments: [], - params: undefined, - }; + return { $type: "akash.deployment.v1beta2.GenesisState", deployments: [], params: undefined }; } export const GenesisState = { - $type: 'akash.deployment.v1beta2.GenesisState' as const, + $type: "akash.deployment.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -139,8 +119,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -151,9 +130,7 @@ export const GenesisState = { break; } - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()), - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -184,9 +161,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - GenesisDeployment.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => GenesisDeployment.toJSON(e)); } if (message.params !== undefined) { obj.params = Params.toJSON(message.params); @@ -199,38 +174,23 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/group.ts b/ts/src/generated/akash/deployment/v1beta2/group.ts index 7f2aea67..ac2c93c6 100644 --- a/ts/src/generated/akash/deployment/v1beta2/group.ts +++ b/ts/src/generated/akash/deployment/v1beta2/group.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupID } from './groupid'; -import { GroupSpec } from './groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupID } from "./groupid"; +import { GroupSpec } from "./groupspec"; /** Group stores group id, state and specifications of group */ export interface Group { - $type: 'akash.deployment.v1beta2.Group'; + $type: "akash.deployment.v1beta2.Group"; groupId: GroupID | undefined; state: Group_State; groupSpec: GroupSpec | undefined; @@ -32,22 +32,22 @@ export enum Group_State { export function group_StateFromJSON(object: any): Group_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Group_State.invalid; case 1: - case 'open': + case "open": return Group_State.open; case 2: - case 'paused': + case "paused": return Group_State.paused; case 3: - case 'insufficient_funds': + case "insufficient_funds": return Group_State.insufficient_funds; case 4: - case 'closed': + case "closed": return Group_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Group_State.UNRECOGNIZED; } @@ -56,24 +56,24 @@ export function group_StateFromJSON(object: any): Group_State { export function group_StateToJSON(object: Group_State): string { switch (object) { case Group_State.invalid: - return 'invalid'; + return "invalid"; case Group_State.open: - return 'open'; + return "open"; case Group_State.paused: - return 'paused'; + return "paused"; case Group_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Group_State.closed: - return 'closed'; + return "closed"; case Group_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseGroup(): Group { return { - $type: 'akash.deployment.v1beta2.Group', + $type: "akash.deployment.v1beta2.Group", groupId: undefined, state: 0, groupSpec: undefined, @@ -82,7 +82,7 @@ function createBaseGroup(): Group { } export const Group = { - $type: 'akash.deployment.v1beta2.Group' as const, + $type: "akash.deployment.v1beta2.Group" as const, encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.groupId !== undefined) { @@ -101,8 +101,7 @@ export const Group = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { @@ -148,16 +147,10 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -183,45 +176,29 @@ export const Group = { }, fromPartial(object: DeepPartial): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = (object.groupId !== undefined && object.groupId !== null) + ? GroupID.fromPartial(object.groupId) + : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = (object.groupSpec !== undefined && object.groupSpec !== null) + ? GroupSpec.fromPartial(object.groupSpec) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/groupid.ts b/ts/src/generated/akash/deployment/v1beta2/groupid.ts index 1f6681eb..cc7ced61 100644 --- a/ts/src/generated/akash/deployment/v1beta2/groupid.ts +++ b/ts/src/generated/akash/deployment/v1beta2/groupid.ts @@ -1,33 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** GroupID stores owner, deployment sequence number and group sequence number */ export interface GroupID { - $type: 'akash.deployment.v1beta2.GroupID'; + $type: "akash.deployment.v1beta2.GroupID"; owner: string; dseq: Long; gseq: number; } function createBaseGroupID(): GroupID { - return { - $type: 'akash.deployment.v1beta2.GroupID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - }; + return { $type: "akash.deployment.v1beta2.GroupID", owner: "", dseq: Long.UZERO, gseq: 0 }; } export const GroupID = { - $type: 'akash.deployment.v1beta2.GroupID' as const, + $type: "akash.deployment.v1beta2.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -40,8 +32,7 @@ export const GroupID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupID(); while (reader.pos < end) { @@ -80,7 +71,7 @@ export const GroupID = { fromJSON(object: any): GroupID { return { $type: GroupID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, }; @@ -88,7 +79,7 @@ export const GroupID = { toJSON(message: GroupID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -105,11 +96,8 @@ export const GroupID = { }, fromPartial(object: DeepPartial): GroupID { const message = createBaseGroupID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; }, @@ -117,26 +105,13 @@ export const GroupID = { messageTypeRegistry.set(GroupID.$type, GroupID); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/groupmsg.ts b/ts/src/generated/akash/deployment/v1beta2/groupmsg.ts index 6af4a05f..fe0e2332 100644 --- a/ts/src/generated/akash/deployment/v1beta2/groupmsg.ts +++ b/ts/src/generated/akash/deployment/v1beta2/groupmsg.ts @@ -1,53 +1,50 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupID } from './groupid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupID } from "./groupid"; /** MsgCloseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgCloseGroup { - $type: 'akash.deployment.v1beta2.MsgCloseGroup'; + $type: "akash.deployment.v1beta2.MsgCloseGroup"; id: GroupID | undefined; } /** MsgCloseGroupResponse defines the Msg/CloseGroup response type. */ export interface MsgCloseGroupResponse { - $type: 'akash.deployment.v1beta2.MsgCloseGroupResponse'; + $type: "akash.deployment.v1beta2.MsgCloseGroupResponse"; } /** MsgPauseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgPauseGroup { - $type: 'akash.deployment.v1beta2.MsgPauseGroup'; + $type: "akash.deployment.v1beta2.MsgPauseGroup"; id: GroupID | undefined; } /** MsgPauseGroupResponse defines the Msg/PauseGroup response type. */ export interface MsgPauseGroupResponse { - $type: 'akash.deployment.v1beta2.MsgPauseGroupResponse'; + $type: "akash.deployment.v1beta2.MsgPauseGroupResponse"; } /** MsgStartGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgStartGroup { - $type: 'akash.deployment.v1beta2.MsgStartGroup'; + $type: "akash.deployment.v1beta2.MsgStartGroup"; id: GroupID | undefined; } /** MsgStartGroupResponse defines the Msg/StartGroup response type. */ export interface MsgStartGroupResponse { - $type: 'akash.deployment.v1beta2.MsgStartGroupResponse'; + $type: "akash.deployment.v1beta2.MsgStartGroupResponse"; } function createBaseMsgCloseGroup(): MsgCloseGroup { - return { $type: 'akash.deployment.v1beta2.MsgCloseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta2.MsgCloseGroup", id: undefined }; } export const MsgCloseGroup = { - $type: 'akash.deployment.v1beta2.MsgCloseGroup' as const, + $type: "akash.deployment.v1beta2.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -55,8 +52,7 @@ export const MsgCloseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroup(); while (reader.pos < end) { @@ -79,10 +75,7 @@ export const MsgCloseGroup = { }, fromJSON(object: any): MsgCloseGroup { - return { - $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { @@ -98,10 +91,7 @@ export const MsgCloseGroup = { }, fromPartial(object: DeepPartial): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -109,25 +99,18 @@ export const MsgCloseGroup = { messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { - return { $type: 'akash.deployment.v1beta2.MsgCloseGroupResponse' }; + return { $type: "akash.deployment.v1beta2.MsgCloseGroupResponse" }; } export const MsgCloseGroupResponse = { - $type: 'akash.deployment.v1beta2.MsgCloseGroupResponse' as const, + $type: "akash.deployment.v1beta2.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); while (reader.pos < end) { @@ -163,16 +146,13 @@ export const MsgCloseGroupResponse = { messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); function createBaseMsgPauseGroup(): MsgPauseGroup { - return { $type: 'akash.deployment.v1beta2.MsgPauseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta2.MsgPauseGroup", id: undefined }; } export const MsgPauseGroup = { - $type: 'akash.deployment.v1beta2.MsgPauseGroup' as const, + $type: "akash.deployment.v1beta2.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -180,8 +160,7 @@ export const MsgPauseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroup(); while (reader.pos < end) { @@ -204,10 +183,7 @@ export const MsgPauseGroup = { }, fromJSON(object: any): MsgPauseGroup { - return { - $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgPauseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { @@ -223,10 +199,7 @@ export const MsgPauseGroup = { }, fromPartial(object: DeepPartial): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -234,25 +207,18 @@ export const MsgPauseGroup = { messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { - return { $type: 'akash.deployment.v1beta2.MsgPauseGroupResponse' }; + return { $type: "akash.deployment.v1beta2.MsgPauseGroupResponse" }; } export const MsgPauseGroupResponse = { - $type: 'akash.deployment.v1beta2.MsgPauseGroupResponse' as const, + $type: "akash.deployment.v1beta2.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgPauseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); while (reader.pos < end) { @@ -288,16 +254,13 @@ export const MsgPauseGroupResponse = { messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); function createBaseMsgStartGroup(): MsgStartGroup { - return { $type: 'akash.deployment.v1beta2.MsgStartGroup', id: undefined }; + return { $type: "akash.deployment.v1beta2.MsgStartGroup", id: undefined }; } export const MsgStartGroup = { - $type: 'akash.deployment.v1beta2.MsgStartGroup' as const, + $type: "akash.deployment.v1beta2.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -305,8 +268,7 @@ export const MsgStartGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroup(); while (reader.pos < end) { @@ -329,10 +291,7 @@ export const MsgStartGroup = { }, fromJSON(object: any): MsgStartGroup { - return { - $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgStartGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { @@ -348,10 +307,7 @@ export const MsgStartGroup = { }, fromPartial(object: DeepPartial): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -359,25 +315,18 @@ export const MsgStartGroup = { messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { - return { $type: 'akash.deployment.v1beta2.MsgStartGroupResponse' }; + return { $type: "akash.deployment.v1beta2.MsgStartGroupResponse" }; } export const MsgStartGroupResponse = { - $type: 'akash.deployment.v1beta2.MsgStartGroupResponse' as const, + $type: "akash.deployment.v1beta2.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgStartGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); while (reader.pos < end) { @@ -412,26 +361,13 @@ export const MsgStartGroupResponse = { messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/groupspec.ts b/ts/src/generated/akash/deployment/v1beta2/groupspec.ts index ff6f5044..d6db2385 100644 --- a/ts/src/generated/akash/deployment/v1beta2/groupspec.ts +++ b/ts/src/generated/akash/deployment/v1beta2/groupspec.ts @@ -1,42 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { PlacementRequirements } from '../../base/v1beta2/attribute'; -import { Resource } from './resource'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { PlacementRequirements } from "../../base/v1beta2/attribute"; +import { Resource } from "./resource"; /** GroupSpec stores group specifications */ export interface GroupSpec { - $type: 'akash.deployment.v1beta2.GroupSpec'; + $type: "akash.deployment.v1beta2.GroupSpec"; name: string; requirements: PlacementRequirements | undefined; resources: Resource[]; } function createBaseGroupSpec(): GroupSpec { - return { - $type: 'akash.deployment.v1beta2.GroupSpec', - name: '', - requirements: undefined, - resources: [], - }; + return { $type: "akash.deployment.v1beta2.GroupSpec", name: "", requirements: undefined, resources: [] }; } export const GroupSpec = { - $type: 'akash.deployment.v1beta2.GroupSpec' as const, + $type: "akash.deployment.v1beta2.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork(), - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { Resource.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -45,8 +34,7 @@ export const GroupSpec = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupSpec { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupSpec(); while (reader.pos < end) { @@ -64,10 +52,7 @@ export const GroupSpec = { break; } - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32(), - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { @@ -88,10 +73,8 @@ export const GroupSpec = { fromJSON(object: any): GroupSpec { return { $type: GroupSpec.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, resources: globalThis.Array.isArray(object?.resources) ? object.resources.map((e: any) => Resource.fromJSON(e)) : [], @@ -100,7 +83,7 @@ export const GroupSpec = { toJSON(message: GroupSpec): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.requirements !== undefined) { @@ -117,39 +100,24 @@ export const GroupSpec = { }, fromPartial(object: DeepPartial): GroupSpec { const message = createBaseGroupSpec(); - message.name = object.name ?? ''; - message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => Resource.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.requirements = (object.requirements !== undefined && object.requirements !== null) + ? PlacementRequirements.fromPartial(object.requirements) + : undefined; + message.resources = object.resources?.map((e) => Resource.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GroupSpec.$type, GroupSpec); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/params.ts b/ts/src/generated/akash/deployment/v1beta2/params.ts index 4c2b75bd..baaa6552 100644 --- a/ts/src/generated/akash/deployment/v1beta2/params.ts +++ b/ts/src/generated/akash/deployment/v1beta2/params.ts @@ -1,41 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params defines the parameters for the x/deployment package */ export interface Params { - $type: 'akash.deployment.v1beta2.Params'; + $type: "akash.deployment.v1beta2.Params"; deploymentMinDeposit: Coin | undefined; } function createBaseParams(): Params { - return { - $type: 'akash.deployment.v1beta2.Params', - deploymentMinDeposit: undefined, - }; + return { $type: "akash.deployment.v1beta2.Params", deploymentMinDeposit: undefined }; } export const Params = { - $type: 'akash.deployment.v1beta2.Params' as const, + $type: "akash.deployment.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentMinDeposit !== undefined) { - Coin.encode( - message.deploymentMinDeposit, - writer.uint32(10).fork(), - ).ldelim(); + Coin.encode(message.deploymentMinDeposit, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -60,9 +50,7 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - deploymentMinDeposit: isSet(object.deploymentMinDeposit) - ? Coin.fromJSON(object.deploymentMinDeposit) - : undefined, + deploymentMinDeposit: isSet(object.deploymentMinDeposit) ? Coin.fromJSON(object.deploymentMinDeposit) : undefined, }; }, @@ -79,37 +67,22 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.deploymentMinDeposit = - object.deploymentMinDeposit !== undefined && - object.deploymentMinDeposit !== null - ? Coin.fromPartial(object.deploymentMinDeposit) - : undefined; + message.deploymentMinDeposit = (object.deploymentMinDeposit !== undefined && object.deploymentMinDeposit !== null) + ? Coin.fromPartial(object.deploymentMinDeposit) + : undefined; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/query.ts b/ts/src/generated/akash/deployment/v1beta2/query.ts index f9478cea..dfb65ae4 100644 --- a/ts/src/generated/akash/deployment/v1beta2/query.ts +++ b/ts/src/generated/akash/deployment/v1beta2/query.ts @@ -1,39 +1,36 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account } from '../../escrow/v1beta2/types'; -import { Deployment, DeploymentFilters, DeploymentID } from './deployment'; -import { Group } from './group'; -import { GroupID } from './groupid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account } from "../../escrow/v1beta2/types"; +import { Deployment, DeploymentFilters, DeploymentID } from "./deployment"; +import { Group } from "./group"; +import { GroupID } from "./groupid"; /** QueryDeploymentsRequest is request type for the Query/Deployments RPC method */ export interface QueryDeploymentsRequest { - $type: 'akash.deployment.v1beta2.QueryDeploymentsRequest'; + $type: "akash.deployment.v1beta2.QueryDeploymentsRequest"; filters: DeploymentFilters | undefined; pagination: PageRequest | undefined; } /** QueryDeploymentsResponse is response type for the Query/Deployments RPC method */ export interface QueryDeploymentsResponse { - $type: 'akash.deployment.v1beta2.QueryDeploymentsResponse'; + $type: "akash.deployment.v1beta2.QueryDeploymentsResponse"; deployments: QueryDeploymentResponse[]; pagination: PageResponse | undefined; } /** QueryDeploymentRequest is request type for the Query/Deployment RPC method */ export interface QueryDeploymentRequest { - $type: 'akash.deployment.v1beta2.QueryDeploymentRequest'; + $type: "akash.deployment.v1beta2.QueryDeploymentRequest"; id: DeploymentID | undefined; } /** QueryDeploymentResponse is response type for the Query/Deployment RPC method */ export interface QueryDeploymentResponse { - $type: 'akash.deployment.v1beta2.QueryDeploymentResponse'; + $type: "akash.deployment.v1beta2.QueryDeploymentResponse"; deployment: Deployment | undefined; groups: Group[]; escrowAccount: Account | undefined; @@ -41,36 +38,26 @@ export interface QueryDeploymentResponse { /** QueryGroupRequest is request type for the Query/Group RPC method */ export interface QueryGroupRequest { - $type: 'akash.deployment.v1beta2.QueryGroupRequest'; + $type: "akash.deployment.v1beta2.QueryGroupRequest"; id: GroupID | undefined; } /** QueryGroupResponse is response type for the Query/Group RPC method */ export interface QueryGroupResponse { - $type: 'akash.deployment.v1beta2.QueryGroupResponse'; + $type: "akash.deployment.v1beta2.QueryGroupResponse"; group: Group | undefined; } function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { - return { - $type: 'akash.deployment.v1beta2.QueryDeploymentsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta2.QueryDeploymentsRequest", filters: undefined, pagination: undefined }; } export const QueryDeploymentsRequest = { - $type: 'akash.deployment.v1beta2.QueryDeploymentsRequest' as const, + $type: "akash.deployment.v1beta2.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -78,12 +65,8 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); while (reader.pos < end) { @@ -115,12 +98,8 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -138,18 +117,14 @@ export const QueryDeploymentsRequest = { create(base?: DeepPartial): QueryDeploymentsRequest { return QueryDeploymentsRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsRequest { + fromPartial(object: DeepPartial): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? DeploymentFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -157,38 +132,24 @@ export const QueryDeploymentsRequest = { messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { - return { - $type: 'akash.deployment.v1beta2.QueryDeploymentsResponse', - deployments: [], - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta2.QueryDeploymentsResponse", deployments: [], pagination: undefined }; } export const QueryDeploymentsResponse = { - $type: 'akash.deployment.v1beta2.QueryDeploymentsResponse' as const, + $type: "akash.deployment.v1beta2.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); while (reader.pos < end) { @@ -199,9 +160,7 @@ export const QueryDeploymentsResponse = { break; } - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()), - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -223,22 +182,16 @@ export const QueryDeploymentsResponse = { return { $type: QueryDeploymentsResponse.$type, deployments: globalThis.Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e), - ) + ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - QueryDeploymentResponse.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => QueryDeploymentResponse.toJSON(e)); } if (message.pagination !== undefined) { obj.pagination = PageResponse.toJSON(message.pagination); @@ -246,57 +199,37 @@ export const QueryDeploymentsResponse = { return obj; }, - create( - base?: DeepPartial, - ): QueryDeploymentsResponse { + create(base?: DeepPartial): QueryDeploymentsResponse { return QueryDeploymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsResponse { + fromPartial(object: DeepPartial): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse, -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { - return { - $type: 'akash.deployment.v1beta2.QueryDeploymentRequest', - id: undefined, - }; + return { $type: "akash.deployment.v1beta2.QueryDeploymentRequest", id: undefined }; } export const QueryDeploymentRequest = { - $type: 'akash.deployment.v1beta2.QueryDeploymentRequest' as const, + $type: "akash.deployment.v1beta2.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); while (reader.pos < end) { @@ -319,10 +252,7 @@ export const QueryDeploymentRequest = { }, fromJSON(object: any): QueryDeploymentRequest { - return { - $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: QueryDeploymentRequest.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { @@ -336,14 +266,9 @@ export const QueryDeploymentRequest = { create(base?: DeepPartial): QueryDeploymentRequest { return QueryDeploymentRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentRequest { + fromPartial(object: DeepPartial): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -352,7 +277,7 @@ messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { return { - $type: 'akash.deployment.v1beta2.QueryDeploymentResponse', + $type: "akash.deployment.v1beta2.QueryDeploymentResponse", deployment: undefined, groups: [], escrowAccount: undefined, @@ -360,12 +285,9 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { } export const QueryDeploymentResponse = { - $type: 'akash.deployment.v1beta2.QueryDeploymentResponse' as const, + $type: "akash.deployment.v1beta2.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -378,12 +300,8 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); while (reader.pos < end) { @@ -422,15 +340,9 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -451,19 +363,15 @@ export const QueryDeploymentResponse = { create(base?: DeepPartial): QueryDeploymentResponse { return QueryDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentResponse { + fromPartial(object: DeepPartial): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -471,16 +379,13 @@ export const QueryDeploymentResponse = { messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); function createBaseQueryGroupRequest(): QueryGroupRequest { - return { $type: 'akash.deployment.v1beta2.QueryGroupRequest', id: undefined }; + return { $type: "akash.deployment.v1beta2.QueryGroupRequest", id: undefined }; } export const QueryGroupRequest = { - $type: 'akash.deployment.v1beta2.QueryGroupRequest' as const, + $type: "akash.deployment.v1beta2.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -488,8 +393,7 @@ export const QueryGroupRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupRequest(); while (reader.pos < end) { @@ -512,10 +416,7 @@ export const QueryGroupRequest = { }, fromJSON(object: any): QueryGroupRequest { - return { - $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: QueryGroupRequest.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { @@ -531,10 +432,7 @@ export const QueryGroupRequest = { }, fromPartial(object: DeepPartial): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -542,19 +440,13 @@ export const QueryGroupRequest = { messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { - return { - $type: 'akash.deployment.v1beta2.QueryGroupResponse', - group: undefined, - }; + return { $type: "akash.deployment.v1beta2.QueryGroupResponse", group: undefined }; } export const QueryGroupResponse = { - $type: 'akash.deployment.v1beta2.QueryGroupResponse' as const, + $type: "akash.deployment.v1beta2.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -562,8 +454,7 @@ export const QueryGroupResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupResponse(); while (reader.pos < end) { @@ -586,10 +477,7 @@ export const QueryGroupResponse = { }, fromJSON(object: any): QueryGroupResponse { - return { - $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, - }; + return { $type: QueryGroupResponse.$type, group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { @@ -605,10 +493,7 @@ export const QueryGroupResponse = { }, fromPartial(object: DeepPartial): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = (object.group !== undefined && object.group !== null) ? Group.fromPartial(object.group) : undefined; return message; }, }; @@ -618,16 +503,14 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest, - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ Group(request: QueryGroupRequest): Promise; } -export const QueryServiceName = 'akash.deployment.v1beta2.Query'; +export const QueryServiceName = "akash.deployment.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -638,63 +521,36 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest, - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployments', data); - return promise.then((data) => - QueryDeploymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployments", data); + return promise.then((data) => QueryDeploymentsResponse.decode(_m0.Reader.create(data))); } - Deployment( - request: QueryDeploymentRequest, - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployment', data); - return promise.then((data) => - QueryDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployment", data); + return promise.then((data) => QueryDeploymentResponse.decode(_m0.Reader.create(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Group', data); - return promise.then((data) => - QueryGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Group", data); + return promise.then((data) => QueryGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/resource.ts b/ts/src/generated/akash/deployment/v1beta2/resource.ts index 9e6e0288..8fdc8aac 100644 --- a/ts/src/generated/akash/deployment/v1beta2/resource.ts +++ b/ts/src/generated/akash/deployment/v1beta2/resource.ts @@ -1,39 +1,28 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourceUnits } from '../../base/v1beta2/resourceunits'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourceUnits } from "../../base/v1beta2/resourceunits"; /** Resource stores unit, total count and price of resource */ export interface Resource { - $type: 'akash.deployment.v1beta2.Resource'; + $type: "akash.deployment.v1beta2.Resource"; resources: ResourceUnits | undefined; count: number; price: DecCoin | undefined; } function createBaseResource(): Resource { - return { - $type: 'akash.deployment.v1beta2.Resource', - resources: undefined, - count: 0, - price: undefined, - }; + return { $type: "akash.deployment.v1beta2.Resource", resources: undefined, count: 0, price: undefined }; } export const Resource = { - $type: 'akash.deployment.v1beta2.Resource' as const, + $type: "akash.deployment.v1beta2.Resource" as const, - encode( - message: Resource, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Resource, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(10).fork(), - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(10).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(16).uint32(message.count); @@ -45,8 +34,7 @@ export const Resource = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Resource { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResource(); while (reader.pos < end) { @@ -85,9 +73,7 @@ export const Resource = { fromJSON(object: any): Resource { return { $type: Resource.$type, - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, }; @@ -112,41 +98,26 @@ export const Resource = { }, fromPartial(object: DeepPartial): Resource { const message = createBaseResource(); - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? ResourceUnits.fromPartial(object.resources) + : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; return message; }, }; messageTypeRegistry.set(Resource.$type, Resource); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta2/service.ts b/ts/src/generated/akash/deployment/v1beta2/service.ts index 81e67509..75ef61f5 100644 --- a/ts/src/generated/akash/deployment/v1beta2/service.ts +++ b/ts/src/generated/akash/deployment/v1beta2/service.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; +import _m0 from "protobufjs/minimal"; import { MsgCloseDeployment, MsgCloseDeploymentResponse, @@ -9,7 +9,7 @@ import { MsgDepositDeploymentResponse, MsgUpdateDeployment, MsgUpdateDeploymentResponse, -} from './deploymentmsg'; +} from "./deploymentmsg"; import { MsgCloseGroup, MsgCloseGroupResponse, @@ -17,26 +17,18 @@ import { MsgPauseGroupResponse, MsgStartGroup, MsgStartGroupResponse, -} from './groupmsg'; +} from "./groupmsg"; /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment, - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment, - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment, - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -45,7 +37,7 @@ export interface Msg { StartGroup(request: MsgStartGroup): Promise; } -export const MsgServiceName = 'akash.deployment.v1beta2.Msg'; +export const MsgServiceName = "akash.deployment.v1beta2.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -60,75 +52,49 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment, - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateDeployment', data); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateDeployment", data); + return promise.then((data) => MsgCreateDeploymentResponse.decode(_m0.Reader.create(data))); } - DepositDeployment( - request: MsgDepositDeployment, - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DepositDeployment', data); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DepositDeployment", data); + return promise.then((data) => MsgDepositDeploymentResponse.decode(_m0.Reader.create(data))); } - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateDeployment', data); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateDeployment", data); + return promise.then((data) => MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data))); } - CloseDeployment( - request: MsgCloseDeployment, - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseDeployment', data); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseDeployment", data); + return promise.then((data) => MsgCloseDeploymentResponse.decode(_m0.Reader.create(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseGroup', data); - return promise.then((data) => - MsgCloseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseGroup", data); + return promise.then((data) => MsgCloseGroupResponse.decode(_m0.Reader.create(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'PauseGroup', data); - return promise.then((data) => - MsgPauseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "PauseGroup", data); + return promise.then((data) => MsgPauseGroupResponse.decode(_m0.Reader.create(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'StartGroup', data); - return promise.then((data) => - MsgStartGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "StartGroup", data); + return promise.then((data) => MsgStartGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/akash/deployment/v1beta3/authz.ts b/ts/src/generated/akash/deployment/v1beta3/authz.ts index 9501a9f5..42011f33 100644 --- a/ts/src/generated/akash/deployment/v1beta3/authz.ts +++ b/ts/src/generated/akash/deployment/v1beta3/authz.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** * DepositDeploymentAuthorization allows the grantee to deposit up to spend_limit coins from * the granter's account for a deployment. */ export interface DepositDeploymentAuthorization { - $type: 'akash.deployment.v1beta3.DepositDeploymentAuthorization'; + $type: "akash.deployment.v1beta3.DepositDeploymentAuthorization"; /** * SpendLimit is the amount the grantee is authorized to spend from the granter's account for * the purpose of deployment. @@ -18,31 +18,21 @@ export interface DepositDeploymentAuthorization { } function createBaseDepositDeploymentAuthorization(): DepositDeploymentAuthorization { - return { - $type: 'akash.deployment.v1beta3.DepositDeploymentAuthorization', - spendLimit: undefined, - }; + return { $type: "akash.deployment.v1beta3.DepositDeploymentAuthorization", spendLimit: undefined }; } export const DepositDeploymentAuthorization = { - $type: 'akash.deployment.v1beta3.DepositDeploymentAuthorization' as const, + $type: "akash.deployment.v1beta3.DepositDeploymentAuthorization" as const, - encode( - message: DepositDeploymentAuthorization, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DepositDeploymentAuthorization, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.spendLimit !== undefined) { Coin.encode(message.spendLimit, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DepositDeploymentAuthorization { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): DepositDeploymentAuthorization { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositDeploymentAuthorization(); while (reader.pos < end) { @@ -67,9 +57,7 @@ export const DepositDeploymentAuthorization = { fromJSON(object: any): DepositDeploymentAuthorization { return { $type: DepositDeploymentAuthorization.$type, - spendLimit: isSet(object.spendLimit) - ? Coin.fromJSON(object.spendLimit) - : undefined, + spendLimit: isSet(object.spendLimit) ? Coin.fromJSON(object.spendLimit) : undefined, }; }, @@ -81,48 +69,27 @@ export const DepositDeploymentAuthorization = { return obj; }, - create( - base?: DeepPartial, - ): DepositDeploymentAuthorization { + create(base?: DeepPartial): DepositDeploymentAuthorization { return DepositDeploymentAuthorization.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): DepositDeploymentAuthorization { + fromPartial(object: DeepPartial): DepositDeploymentAuthorization { const message = createBaseDepositDeploymentAuthorization(); - message.spendLimit = - object.spendLimit !== undefined && object.spendLimit !== null - ? Coin.fromPartial(object.spendLimit) - : undefined; + message.spendLimit = (object.spendLimit !== undefined && object.spendLimit !== null) + ? Coin.fromPartial(object.spendLimit) + : undefined; return message; }, }; -messageTypeRegistry.set( - DepositDeploymentAuthorization.$type, - DepositDeploymentAuthorization, -); +messageTypeRegistry.set(DepositDeploymentAuthorization.$type, DepositDeploymentAuthorization); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/deployment.ts b/ts/src/generated/akash/deployment/v1beta3/deployment.ts index e1653900..95866c36 100644 --- a/ts/src/generated/akash/deployment/v1beta3/deployment.ts +++ b/ts/src/generated/akash/deployment/v1beta3/deployment.ts @@ -1,18 +1,18 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** DeploymentID stores owner and sequence number */ export interface DeploymentID { - $type: 'akash.deployment.v1beta3.DeploymentID'; + $type: "akash.deployment.v1beta3.DeploymentID"; owner: string; dseq: Long; } /** Deployment stores deploymentID, state and version details */ export interface Deployment { - $type: 'akash.deployment.v1beta3.Deployment'; + $type: "akash.deployment.v1beta3.Deployment"; deploymentId: DeploymentID | undefined; state: Deployment_State; version: Uint8Array; @@ -33,16 +33,16 @@ export enum Deployment_State { export function deployment_StateFromJSON(object: any): Deployment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Deployment_State.invalid; case 1: - case 'active': + case "active": return Deployment_State.active; case 2: - case 'closed': + case "closed": return Deployment_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Deployment_State.UNRECOGNIZED; } @@ -51,41 +51,34 @@ export function deployment_StateFromJSON(object: any): Deployment_State { export function deployment_StateToJSON(object: Deployment_State): string { switch (object) { case Deployment_State.invalid: - return 'invalid'; + return "invalid"; case Deployment_State.active: - return 'active'; + return "active"; case Deployment_State.closed: - return 'closed'; + return "closed"; case Deployment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** DeploymentFilters defines filters used to filter deployments */ export interface DeploymentFilters { - $type: 'akash.deployment.v1beta3.DeploymentFilters'; + $type: "akash.deployment.v1beta3.DeploymentFilters"; owner: string; dseq: Long; state: string; } function createBaseDeploymentID(): DeploymentID { - return { - $type: 'akash.deployment.v1beta3.DeploymentID', - owner: '', - dseq: Long.UZERO, - }; + return { $type: "akash.deployment.v1beta3.DeploymentID", owner: "", dseq: Long.UZERO }; } export const DeploymentID = { - $type: 'akash.deployment.v1beta3.DeploymentID' as const, + $type: "akash.deployment.v1beta3.DeploymentID" as const, - encode( - message: DeploymentID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -95,8 +88,7 @@ export const DeploymentID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentID(); while (reader.pos < end) { @@ -128,14 +120,14 @@ export const DeploymentID = { fromJSON(object: any): DeploymentID { return { $type: DeploymentID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, }; }, toJSON(message: DeploymentID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -149,11 +141,8 @@ export const DeploymentID = { }, fromPartial(object: DeepPartial): DeploymentID { const message = createBaseDeploymentID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; return message; }, }; @@ -162,7 +151,7 @@ messageTypeRegistry.set(DeploymentID.$type, DeploymentID); function createBaseDeployment(): Deployment { return { - $type: 'akash.deployment.v1beta3.Deployment', + $type: "akash.deployment.v1beta3.Deployment", deploymentId: undefined, state: 0, version: new Uint8Array(0), @@ -171,17 +160,11 @@ function createBaseDeployment(): Deployment { } export const Deployment = { - $type: 'akash.deployment.v1beta3.Deployment' as const, + $type: "akash.deployment.v1beta3.Deployment" as const, - encode( - message: Deployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Deployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deploymentId !== undefined) { - DeploymentID.encode( - message.deploymentId, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentID.encode(message.deploymentId, writer.uint32(10).fork()).ldelim(); } if (message.state !== 0) { writer.uint32(16).int32(message.state); @@ -196,8 +179,7 @@ export const Deployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Deployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeployment(); while (reader.pos < end) { @@ -243,16 +225,10 @@ export const Deployment = { fromJSON(object: any): Deployment { return { $type: Deployment.$type, - deploymentId: isSet(object.deploymentId) - ? DeploymentID.fromJSON(object.deploymentId) - : undefined, + deploymentId: isSet(object.deploymentId) ? DeploymentID.fromJSON(object.deploymentId) : undefined, state: isSet(object.state) ? deployment_StateFromJSON(object.state) : 0, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -278,16 +254,14 @@ export const Deployment = { }, fromPartial(object: DeepPartial): Deployment { const message = createBaseDeployment(); - message.deploymentId = - object.deploymentId !== undefined && object.deploymentId !== null - ? DeploymentID.fromPartial(object.deploymentId) - : undefined; + message.deploymentId = (object.deploymentId !== undefined && object.deploymentId !== null) + ? DeploymentID.fromPartial(object.deploymentId) + : undefined; message.state = object.state ?? 0; message.version = object.version ?? new Uint8Array(0); - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -295,36 +269,27 @@ export const Deployment = { messageTypeRegistry.set(Deployment.$type, Deployment); function createBaseDeploymentFilters(): DeploymentFilters { - return { - $type: 'akash.deployment.v1beta3.DeploymentFilters', - owner: '', - dseq: Long.UZERO, - state: '', - }; + return { $type: "akash.deployment.v1beta3.DeploymentFilters", owner: "", dseq: Long.UZERO, state: "" }; } export const DeploymentFilters = { - $type: 'akash.deployment.v1beta3.DeploymentFilters' as const, + $type: "akash.deployment.v1beta3.DeploymentFilters" as const, - encode( - message: DeploymentFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: DeploymentFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { writer.uint32(16).uint64(message.dseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(26).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): DeploymentFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDeploymentFilters(); while (reader.pos < end) { @@ -363,21 +328,21 @@ export const DeploymentFilters = { fromJSON(object: any): DeploymentFilters { return { $type: DeploymentFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: DeploymentFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { obj.dseq = (message.dseq || Long.UZERO).toString(); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -388,12 +353,9 @@ export const DeploymentFilters = { }, fromPartial(object: DeepPartial): DeploymentFilters { const message = createBaseDeploymentFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; - message.state = object.state ?? ''; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; + message.state = object.state ?? ""; return message; }, }; @@ -402,7 +364,7 @@ messageTypeRegistry.set(DeploymentFilters.$type, DeploymentFilters); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -415,36 +377,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/deploymentmsg.ts b/ts/src/generated/akash/deployment/v1beta3/deploymentmsg.ts index 72a16b49..255cb3fd 100644 --- a/ts/src/generated/akash/deployment/v1beta3/deploymentmsg.ts +++ b/ts/src/generated/akash/deployment/v1beta3/deploymentmsg.ts @@ -1,82 +1,83 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { DeploymentID } from './deployment'; -import { GroupSpec } from './groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { DeploymentID } from "./deployment"; +import { GroupSpec } from "./groupspec"; /** MsgCreateDeployment defines an SDK message for creating deployment */ export interface MsgCreateDeployment { - $type: 'akash.deployment.v1beta3.MsgCreateDeployment'; + $type: "akash.deployment.v1beta3.MsgCreateDeployment"; id: DeploymentID | undefined; groups: GroupSpec[]; version: Uint8Array; - deposit: Coin | undefined; + deposit: + | Coin + | undefined; /** Depositor pays for the deposit */ depositor: string; } /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgCreateDeploymentResponse { - $type: 'akash.deployment.v1beta3.MsgCreateDeploymentResponse'; + $type: "akash.deployment.v1beta3.MsgCreateDeploymentResponse"; } /** MsgDepositDeployment deposits more funds into the deposit account */ export interface MsgDepositDeployment { - $type: 'akash.deployment.v1beta3.MsgDepositDeployment'; + $type: "akash.deployment.v1beta3.MsgDepositDeployment"; id: DeploymentID | undefined; - amount: Coin | undefined; + amount: + | Coin + | undefined; /** Depositor pays for the deposit */ depositor: string; } /** MsgCreateDeploymentResponse defines the Msg/CreateDeployment response type. */ export interface MsgDepositDeploymentResponse { - $type: 'akash.deployment.v1beta3.MsgDepositDeploymentResponse'; + $type: "akash.deployment.v1beta3.MsgDepositDeploymentResponse"; } /** MsgUpdateDeployment defines an SDK message for updating deployment */ export interface MsgUpdateDeployment { - $type: 'akash.deployment.v1beta3.MsgUpdateDeployment'; + $type: "akash.deployment.v1beta3.MsgUpdateDeployment"; id: DeploymentID | undefined; version: Uint8Array; } /** MsgUpdateDeploymentResponse defines the Msg/UpdateDeployment response type. */ export interface MsgUpdateDeploymentResponse { - $type: 'akash.deployment.v1beta3.MsgUpdateDeploymentResponse'; + $type: "akash.deployment.v1beta3.MsgUpdateDeploymentResponse"; } /** MsgCloseDeployment defines an SDK message for closing deployment */ export interface MsgCloseDeployment { - $type: 'akash.deployment.v1beta3.MsgCloseDeployment'; + $type: "akash.deployment.v1beta3.MsgCloseDeployment"; id: DeploymentID | undefined; } /** MsgCloseDeploymentResponse defines the Msg/CloseDeployment response type. */ export interface MsgCloseDeploymentResponse { - $type: 'akash.deployment.v1beta3.MsgCloseDeploymentResponse'; + $type: "akash.deployment.v1beta3.MsgCloseDeploymentResponse"; } function createBaseMsgCreateDeployment(): MsgCreateDeployment { return { - $type: 'akash.deployment.v1beta3.MsgCreateDeployment', + $type: "akash.deployment.v1beta3.MsgCreateDeployment", id: undefined, groups: [], version: new Uint8Array(0), deposit: undefined, - depositor: '', + depositor: "", }; } export const MsgCreateDeployment = { - $type: 'akash.deployment.v1beta3.MsgCreateDeployment' as const, + $type: "akash.deployment.v1beta3.MsgCreateDeployment" as const, - encode( - message: MsgCreateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -89,15 +90,14 @@ export const MsgCreateDeployment = { if (message.deposit !== undefined) { Coin.encode(message.deposit, writer.uint32(34).fork()).ldelim(); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(42).string(message.depositor); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeployment(); while (reader.pos < end) { @@ -151,18 +151,10 @@ export const MsgCreateDeployment = { return { $type: MsgCreateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) - : [], - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => GroupSpec.fromJSON(e)) : [], + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", }; }, @@ -180,7 +172,7 @@ export const MsgCreateDeployment = { if (message.deposit !== undefined) { obj.deposit = Coin.toJSON(message.deposit); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } return obj; @@ -191,17 +183,13 @@ export const MsgCreateDeployment = { }, fromPartial(object: DeepPartial): MsgCreateDeployment { const message = createBaseMsgCreateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.groups = object.groups?.map((e) => GroupSpec.fromPartial(e)) || []; message.version = object.version ?? new Uint8Array(0); - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; - message.depositor = object.depositor ?? ''; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; + message.depositor = object.depositor ?? ""; return message; }, }; @@ -209,25 +197,18 @@ export const MsgCreateDeployment = { messageTypeRegistry.set(MsgCreateDeployment.$type, MsgCreateDeployment); function createBaseMsgCreateDeploymentResponse(): MsgCreateDeploymentResponse { - return { $type: 'akash.deployment.v1beta3.MsgCreateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta3.MsgCreateDeploymentResponse" }; } export const MsgCreateDeploymentResponse = { - $type: 'akash.deployment.v1beta3.MsgCreateDeploymentResponse' as const, + $type: "akash.deployment.v1beta3.MsgCreateDeploymentResponse" as const, - encode( - _: MsgCreateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateDeploymentResponse(); while (reader.pos < end) { @@ -251,58 +232,39 @@ export const MsgCreateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateDeploymentResponse { + create(base?: DeepPartial): MsgCreateDeploymentResponse { return MsgCreateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateDeploymentResponse { + fromPartial(_: DeepPartial): MsgCreateDeploymentResponse { const message = createBaseMsgCreateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateDeploymentResponse.$type, - MsgCreateDeploymentResponse, -); +messageTypeRegistry.set(MsgCreateDeploymentResponse.$type, MsgCreateDeploymentResponse); function createBaseMsgDepositDeployment(): MsgDepositDeployment { - return { - $type: 'akash.deployment.v1beta3.MsgDepositDeployment', - id: undefined, - amount: undefined, - depositor: '', - }; + return { $type: "akash.deployment.v1beta3.MsgDepositDeployment", id: undefined, amount: undefined, depositor: "" }; } export const MsgDepositDeployment = { - $type: 'akash.deployment.v1beta3.MsgDepositDeployment' as const, + $type: "akash.deployment.v1beta3.MsgDepositDeployment" as const, - encode( - message: MsgDepositDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgDepositDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } if (message.amount !== undefined) { Coin.encode(message.amount, writer.uint32(18).fork()).ldelim(); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(26).string(message.depositor); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeployment { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeployment(); while (reader.pos < end) { @@ -343,9 +305,7 @@ export const MsgDepositDeployment = { $type: MsgDepositDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, amount: isSet(object.amount) ? Coin.fromJSON(object.amount) : undefined, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", }; }, @@ -357,7 +317,7 @@ export const MsgDepositDeployment = { if (message.amount !== undefined) { obj.amount = Coin.toJSON(message.amount); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } return obj; @@ -368,15 +328,11 @@ export const MsgDepositDeployment = { }, fromPartial(object: DeepPartial): MsgDepositDeployment { const message = createBaseMsgDepositDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; - message.amount = - object.amount !== undefined && object.amount !== null - ? Coin.fromPartial(object.amount) - : undefined; - message.depositor = object.depositor ?? ''; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; + message.amount = (object.amount !== undefined && object.amount !== null) + ? Coin.fromPartial(object.amount) + : undefined; + message.depositor = object.depositor ?? ""; return message; }, }; @@ -384,25 +340,18 @@ export const MsgDepositDeployment = { messageTypeRegistry.set(MsgDepositDeployment.$type, MsgDepositDeployment); function createBaseMsgDepositDeploymentResponse(): MsgDepositDeploymentResponse { - return { $type: 'akash.deployment.v1beta3.MsgDepositDeploymentResponse' }; + return { $type: "akash.deployment.v1beta3.MsgDepositDeploymentResponse" }; } export const MsgDepositDeploymentResponse = { - $type: 'akash.deployment.v1beta3.MsgDepositDeploymentResponse' as const, + $type: "akash.deployment.v1beta3.MsgDepositDeploymentResponse" as const, - encode( - _: MsgDepositDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDepositDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDepositDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDepositDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDepositDeploymentResponse(); while (reader.pos < end) { @@ -426,39 +375,25 @@ export const MsgDepositDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDepositDeploymentResponse { + create(base?: DeepPartial): MsgDepositDeploymentResponse { return MsgDepositDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDepositDeploymentResponse { + fromPartial(_: DeepPartial): MsgDepositDeploymentResponse { const message = createBaseMsgDepositDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDepositDeploymentResponse.$type, - MsgDepositDeploymentResponse, -); +messageTypeRegistry.set(MsgDepositDeploymentResponse.$type, MsgDepositDeploymentResponse); function createBaseMsgUpdateDeployment(): MsgUpdateDeployment { - return { - $type: 'akash.deployment.v1beta3.MsgUpdateDeployment', - id: undefined, - version: new Uint8Array(0), - }; + return { $type: "akash.deployment.v1beta3.MsgUpdateDeployment", id: undefined, version: new Uint8Array(0) }; } export const MsgUpdateDeployment = { - $type: 'akash.deployment.v1beta3.MsgUpdateDeployment' as const, + $type: "akash.deployment.v1beta3.MsgUpdateDeployment" as const, - encode( - message: MsgUpdateDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgUpdateDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -469,8 +404,7 @@ export const MsgUpdateDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeployment(); while (reader.pos < end) { @@ -503,9 +437,7 @@ export const MsgUpdateDeployment = { return { $type: MsgUpdateDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - version: isSet(object.version) - ? bytesFromBase64(object.version) - : new Uint8Array(0), + version: isSet(object.version) ? bytesFromBase64(object.version) : new Uint8Array(0), }; }, @@ -525,10 +457,7 @@ export const MsgUpdateDeployment = { }, fromPartial(object: DeepPartial): MsgUpdateDeployment { const message = createBaseMsgUpdateDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; message.version = object.version ?? new Uint8Array(0); return message; }, @@ -537,25 +466,18 @@ export const MsgUpdateDeployment = { messageTypeRegistry.set(MsgUpdateDeployment.$type, MsgUpdateDeployment); function createBaseMsgUpdateDeploymentResponse(): MsgUpdateDeploymentResponse { - return { $type: 'akash.deployment.v1beta3.MsgUpdateDeploymentResponse' }; + return { $type: "akash.deployment.v1beta3.MsgUpdateDeploymentResponse" }; } export const MsgUpdateDeploymentResponse = { - $type: 'akash.deployment.v1beta3.MsgUpdateDeploymentResponse' as const, + $type: "akash.deployment.v1beta3.MsgUpdateDeploymentResponse" as const, - encode( - _: MsgUpdateDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateDeploymentResponse(); while (reader.pos < end) { @@ -579,38 +501,25 @@ export const MsgUpdateDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateDeploymentResponse { + create(base?: DeepPartial): MsgUpdateDeploymentResponse { return MsgUpdateDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateDeploymentResponse { + fromPartial(_: DeepPartial): MsgUpdateDeploymentResponse { const message = createBaseMsgUpdateDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateDeploymentResponse.$type, - MsgUpdateDeploymentResponse, -); +messageTypeRegistry.set(MsgUpdateDeploymentResponse.$type, MsgUpdateDeploymentResponse); function createBaseMsgCloseDeployment(): MsgCloseDeployment { - return { - $type: 'akash.deployment.v1beta3.MsgCloseDeployment', - id: undefined, - }; + return { $type: "akash.deployment.v1beta3.MsgCloseDeployment", id: undefined }; } export const MsgCloseDeployment = { - $type: 'akash.deployment.v1beta3.MsgCloseDeployment' as const, + $type: "akash.deployment.v1beta3.MsgCloseDeployment" as const, - encode( - message: MsgCloseDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -618,8 +527,7 @@ export const MsgCloseDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeployment(); while (reader.pos < end) { @@ -642,10 +550,7 @@ export const MsgCloseDeployment = { }, fromJSON(object: any): MsgCloseDeployment { - return { - $type: MsgCloseDeployment.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseDeployment.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseDeployment): unknown { @@ -661,10 +566,7 @@ export const MsgCloseDeployment = { }, fromPartial(object: DeepPartial): MsgCloseDeployment { const message = createBaseMsgCloseDeployment(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -672,25 +574,18 @@ export const MsgCloseDeployment = { messageTypeRegistry.set(MsgCloseDeployment.$type, MsgCloseDeployment); function createBaseMsgCloseDeploymentResponse(): MsgCloseDeploymentResponse { - return { $type: 'akash.deployment.v1beta3.MsgCloseDeploymentResponse' }; + return { $type: "akash.deployment.v1beta3.MsgCloseDeploymentResponse" }; } export const MsgCloseDeploymentResponse = { - $type: 'akash.deployment.v1beta3.MsgCloseDeploymentResponse' as const, + $type: "akash.deployment.v1beta3.MsgCloseDeploymentResponse" as const, - encode( - _: MsgCloseDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseDeploymentResponse(); while (reader.pos < end) { @@ -714,27 +609,20 @@ export const MsgCloseDeploymentResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCloseDeploymentResponse { + create(base?: DeepPartial): MsgCloseDeploymentResponse { return MsgCloseDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCloseDeploymentResponse { + fromPartial(_: DeepPartial): MsgCloseDeploymentResponse { const message = createBaseMsgCloseDeploymentResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCloseDeploymentResponse.$type, - MsgCloseDeploymentResponse, -); +messageTypeRegistry.set(MsgCloseDeploymentResponse.$type, MsgCloseDeploymentResponse); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -747,36 +635,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/genesis.ts b/ts/src/generated/akash/deployment/v1beta3/genesis.ts index 16f7c71b..3bea14e4 100644 --- a/ts/src/generated/akash/deployment/v1beta3/genesis.ts +++ b/ts/src/generated/akash/deployment/v1beta3/genesis.ts @@ -1,40 +1,33 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Deployment } from './deployment'; -import { Group } from './group'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Deployment } from "./deployment"; +import { Group } from "./group"; +import { Params } from "./params"; /** GenesisDeployment defines the basic genesis state used by deployment module */ export interface GenesisDeployment { - $type: 'akash.deployment.v1beta3.GenesisDeployment'; + $type: "akash.deployment.v1beta3.GenesisDeployment"; deployment: Deployment | undefined; groups: Group[]; } /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.deployment.v1beta3.GenesisState'; + $type: "akash.deployment.v1beta3.GenesisState"; deployments: GenesisDeployment[]; params: Params | undefined; } function createBaseGenesisDeployment(): GenesisDeployment { - return { - $type: 'akash.deployment.v1beta3.GenesisDeployment', - deployment: undefined, - groups: [], - }; + return { $type: "akash.deployment.v1beta3.GenesisDeployment", deployment: undefined, groups: [] }; } export const GenesisDeployment = { - $type: 'akash.deployment.v1beta3.GenesisDeployment' as const, + $type: "akash.deployment.v1beta3.GenesisDeployment" as const, - encode( - message: GenesisDeployment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisDeployment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -45,8 +38,7 @@ export const GenesisDeployment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisDeployment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisDeployment(); while (reader.pos < end) { @@ -78,12 +70,8 @@ export const GenesisDeployment = { fromJSON(object: any): GenesisDeployment { return { $type: GenesisDeployment.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], }; }, @@ -103,10 +91,9 @@ export const GenesisDeployment = { }, fromPartial(object: DeepPartial): GenesisDeployment { const message = createBaseGenesisDeployment(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; return message; }, @@ -115,20 +102,13 @@ export const GenesisDeployment = { messageTypeRegistry.set(GenesisDeployment.$type, GenesisDeployment); function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.deployment.v1beta3.GenesisState', - deployments: [], - params: undefined, - }; + return { $type: "akash.deployment.v1beta3.GenesisState", deployments: [], params: undefined }; } export const GenesisState = { - $type: 'akash.deployment.v1beta3.GenesisState' as const, + $type: "akash.deployment.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { GenesisDeployment.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -139,8 +119,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -151,9 +130,7 @@ export const GenesisState = { break; } - message.deployments.push( - GenesisDeployment.decode(reader, reader.uint32()), - ); + message.deployments.push(GenesisDeployment.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -184,9 +161,7 @@ export const GenesisState = { toJSON(message: GenesisState): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - GenesisDeployment.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => GenesisDeployment.toJSON(e)); } if (message.params !== undefined) { obj.params = Params.toJSON(message.params); @@ -199,38 +174,23 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.deployments = - object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.deployments = object.deployments?.map((e) => GenesisDeployment.fromPartial(e)) || []; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/group.ts b/ts/src/generated/akash/deployment/v1beta3/group.ts index 57430a3f..dcc9b05b 100644 --- a/ts/src/generated/akash/deployment/v1beta3/group.ts +++ b/ts/src/generated/akash/deployment/v1beta3/group.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupID } from './groupid'; -import { GroupSpec } from './groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupID } from "./groupid"; +import { GroupSpec } from "./groupspec"; /** Group stores group id, state and specifications of group */ export interface Group { - $type: 'akash.deployment.v1beta3.Group'; + $type: "akash.deployment.v1beta3.Group"; groupId: GroupID | undefined; state: Group_State; groupSpec: GroupSpec | undefined; @@ -32,22 +32,22 @@ export enum Group_State { export function group_StateFromJSON(object: any): Group_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Group_State.invalid; case 1: - case 'open': + case "open": return Group_State.open; case 2: - case 'paused': + case "paused": return Group_State.paused; case 3: - case 'insufficient_funds': + case "insufficient_funds": return Group_State.insufficient_funds; case 4: - case 'closed': + case "closed": return Group_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Group_State.UNRECOGNIZED; } @@ -56,24 +56,24 @@ export function group_StateFromJSON(object: any): Group_State { export function group_StateToJSON(object: Group_State): string { switch (object) { case Group_State.invalid: - return 'invalid'; + return "invalid"; case Group_State.open: - return 'open'; + return "open"; case Group_State.paused: - return 'paused'; + return "paused"; case Group_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Group_State.closed: - return 'closed'; + return "closed"; case Group_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseGroup(): Group { return { - $type: 'akash.deployment.v1beta3.Group', + $type: "akash.deployment.v1beta3.Group", groupId: undefined, state: 0, groupSpec: undefined, @@ -82,7 +82,7 @@ function createBaseGroup(): Group { } export const Group = { - $type: 'akash.deployment.v1beta3.Group' as const, + $type: "akash.deployment.v1beta3.Group" as const, encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.groupId !== undefined) { @@ -101,8 +101,7 @@ export const Group = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { @@ -148,16 +147,10 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - groupId: isSet(object.groupId) - ? GroupID.fromJSON(object.groupId) - : undefined, + groupId: isSet(object.groupId) ? GroupID.fromJSON(object.groupId) : undefined, state: isSet(object.state) ? group_StateFromJSON(object.state) : 0, - groupSpec: isSet(object.groupSpec) - ? GroupSpec.fromJSON(object.groupSpec) - : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + groupSpec: isSet(object.groupSpec) ? GroupSpec.fromJSON(object.groupSpec) : undefined, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -183,45 +176,29 @@ export const Group = { }, fromPartial(object: DeepPartial): Group { const message = createBaseGroup(); - message.groupId = - object.groupId !== undefined && object.groupId !== null - ? GroupID.fromPartial(object.groupId) - : undefined; + message.groupId = (object.groupId !== undefined && object.groupId !== null) + ? GroupID.fromPartial(object.groupId) + : undefined; message.state = object.state ?? 0; - message.groupSpec = - object.groupSpec !== undefined && object.groupSpec !== null - ? GroupSpec.fromPartial(object.groupSpec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.groupSpec = (object.groupSpec !== undefined && object.groupSpec !== null) + ? GroupSpec.fromPartial(object.groupSpec) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/groupid.ts b/ts/src/generated/akash/deployment/v1beta3/groupid.ts index b00b1ba3..166c731a 100644 --- a/ts/src/generated/akash/deployment/v1beta3/groupid.ts +++ b/ts/src/generated/akash/deployment/v1beta3/groupid.ts @@ -1,33 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** GroupID stores owner, deployment sequence number and group sequence number */ export interface GroupID { - $type: 'akash.deployment.v1beta3.GroupID'; + $type: "akash.deployment.v1beta3.GroupID"; owner: string; dseq: Long; gseq: number; } function createBaseGroupID(): GroupID { - return { - $type: 'akash.deployment.v1beta3.GroupID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - }; + return { $type: "akash.deployment.v1beta3.GroupID", owner: "", dseq: Long.UZERO, gseq: 0 }; } export const GroupID = { - $type: 'akash.deployment.v1beta3.GroupID' as const, + $type: "akash.deployment.v1beta3.GroupID" as const, - encode( - message: GroupID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: GroupID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -40,8 +32,7 @@ export const GroupID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupID(); while (reader.pos < end) { @@ -80,7 +71,7 @@ export const GroupID = { fromJSON(object: any): GroupID { return { $type: GroupID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, }; @@ -88,7 +79,7 @@ export const GroupID = { toJSON(message: GroupID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -105,11 +96,8 @@ export const GroupID = { }, fromPartial(object: DeepPartial): GroupID { const message = createBaseGroupID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; return message; }, @@ -117,26 +105,13 @@ export const GroupID = { messageTypeRegistry.set(GroupID.$type, GroupID); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/groupmsg.ts b/ts/src/generated/akash/deployment/v1beta3/groupmsg.ts index 581d90bd..27564ead 100644 --- a/ts/src/generated/akash/deployment/v1beta3/groupmsg.ts +++ b/ts/src/generated/akash/deployment/v1beta3/groupmsg.ts @@ -1,53 +1,50 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupID } from './groupid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupID } from "./groupid"; /** MsgCloseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgCloseGroup { - $type: 'akash.deployment.v1beta3.MsgCloseGroup'; + $type: "akash.deployment.v1beta3.MsgCloseGroup"; id: GroupID | undefined; } /** MsgCloseGroupResponse defines the Msg/CloseGroup response type. */ export interface MsgCloseGroupResponse { - $type: 'akash.deployment.v1beta3.MsgCloseGroupResponse'; + $type: "akash.deployment.v1beta3.MsgCloseGroupResponse"; } /** MsgPauseGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgPauseGroup { - $type: 'akash.deployment.v1beta3.MsgPauseGroup'; + $type: "akash.deployment.v1beta3.MsgPauseGroup"; id: GroupID | undefined; } /** MsgPauseGroupResponse defines the Msg/PauseGroup response type. */ export interface MsgPauseGroupResponse { - $type: 'akash.deployment.v1beta3.MsgPauseGroupResponse'; + $type: "akash.deployment.v1beta3.MsgPauseGroupResponse"; } /** MsgStartGroup defines SDK message to close a single Group within a Deployment. */ export interface MsgStartGroup { - $type: 'akash.deployment.v1beta3.MsgStartGroup'; + $type: "akash.deployment.v1beta3.MsgStartGroup"; id: GroupID | undefined; } /** MsgStartGroupResponse defines the Msg/StartGroup response type. */ export interface MsgStartGroupResponse { - $type: 'akash.deployment.v1beta3.MsgStartGroupResponse'; + $type: "akash.deployment.v1beta3.MsgStartGroupResponse"; } function createBaseMsgCloseGroup(): MsgCloseGroup { - return { $type: 'akash.deployment.v1beta3.MsgCloseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta3.MsgCloseGroup", id: undefined }; } export const MsgCloseGroup = { - $type: 'akash.deployment.v1beta3.MsgCloseGroup' as const, + $type: "akash.deployment.v1beta3.MsgCloseGroup" as const, - encode( - message: MsgCloseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -55,8 +52,7 @@ export const MsgCloseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroup(); while (reader.pos < end) { @@ -79,10 +75,7 @@ export const MsgCloseGroup = { }, fromJSON(object: any): MsgCloseGroup { - return { - $type: MsgCloseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgCloseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgCloseGroup): unknown { @@ -98,10 +91,7 @@ export const MsgCloseGroup = { }, fromPartial(object: DeepPartial): MsgCloseGroup { const message = createBaseMsgCloseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -109,25 +99,18 @@ export const MsgCloseGroup = { messageTypeRegistry.set(MsgCloseGroup.$type, MsgCloseGroup); function createBaseMsgCloseGroupResponse(): MsgCloseGroupResponse { - return { $type: 'akash.deployment.v1beta3.MsgCloseGroupResponse' }; + return { $type: "akash.deployment.v1beta3.MsgCloseGroupResponse" }; } export const MsgCloseGroupResponse = { - $type: 'akash.deployment.v1beta3.MsgCloseGroupResponse' as const, + $type: "akash.deployment.v1beta3.MsgCloseGroupResponse" as const, - encode( - _: MsgCloseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseGroupResponse(); while (reader.pos < end) { @@ -163,16 +146,13 @@ export const MsgCloseGroupResponse = { messageTypeRegistry.set(MsgCloseGroupResponse.$type, MsgCloseGroupResponse); function createBaseMsgPauseGroup(): MsgPauseGroup { - return { $type: 'akash.deployment.v1beta3.MsgPauseGroup', id: undefined }; + return { $type: "akash.deployment.v1beta3.MsgPauseGroup", id: undefined }; } export const MsgPauseGroup = { - $type: 'akash.deployment.v1beta3.MsgPauseGroup' as const, + $type: "akash.deployment.v1beta3.MsgPauseGroup" as const, - encode( - message: MsgPauseGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgPauseGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -180,8 +160,7 @@ export const MsgPauseGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroup(); while (reader.pos < end) { @@ -204,10 +183,7 @@ export const MsgPauseGroup = { }, fromJSON(object: any): MsgPauseGroup { - return { - $type: MsgPauseGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgPauseGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgPauseGroup): unknown { @@ -223,10 +199,7 @@ export const MsgPauseGroup = { }, fromPartial(object: DeepPartial): MsgPauseGroup { const message = createBaseMsgPauseGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -234,25 +207,18 @@ export const MsgPauseGroup = { messageTypeRegistry.set(MsgPauseGroup.$type, MsgPauseGroup); function createBaseMsgPauseGroupResponse(): MsgPauseGroupResponse { - return { $type: 'akash.deployment.v1beta3.MsgPauseGroupResponse' }; + return { $type: "akash.deployment.v1beta3.MsgPauseGroupResponse" }; } export const MsgPauseGroupResponse = { - $type: 'akash.deployment.v1beta3.MsgPauseGroupResponse' as const, + $type: "akash.deployment.v1beta3.MsgPauseGroupResponse" as const, - encode( - _: MsgPauseGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgPauseGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgPauseGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgPauseGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgPauseGroupResponse(); while (reader.pos < end) { @@ -288,16 +254,13 @@ export const MsgPauseGroupResponse = { messageTypeRegistry.set(MsgPauseGroupResponse.$type, MsgPauseGroupResponse); function createBaseMsgStartGroup(): MsgStartGroup { - return { $type: 'akash.deployment.v1beta3.MsgStartGroup', id: undefined }; + return { $type: "akash.deployment.v1beta3.MsgStartGroup", id: undefined }; } export const MsgStartGroup = { - $type: 'akash.deployment.v1beta3.MsgStartGroup' as const, + $type: "akash.deployment.v1beta3.MsgStartGroup" as const, - encode( - message: MsgStartGroup, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgStartGroup, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -305,8 +268,7 @@ export const MsgStartGroup = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroup { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroup(); while (reader.pos < end) { @@ -329,10 +291,7 @@ export const MsgStartGroup = { }, fromJSON(object: any): MsgStartGroup { - return { - $type: MsgStartGroup.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: MsgStartGroup.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: MsgStartGroup): unknown { @@ -348,10 +307,7 @@ export const MsgStartGroup = { }, fromPartial(object: DeepPartial): MsgStartGroup { const message = createBaseMsgStartGroup(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -359,25 +315,18 @@ export const MsgStartGroup = { messageTypeRegistry.set(MsgStartGroup.$type, MsgStartGroup); function createBaseMsgStartGroupResponse(): MsgStartGroupResponse { - return { $type: 'akash.deployment.v1beta3.MsgStartGroupResponse' }; + return { $type: "akash.deployment.v1beta3.MsgStartGroupResponse" }; } export const MsgStartGroupResponse = { - $type: 'akash.deployment.v1beta3.MsgStartGroupResponse' as const, + $type: "akash.deployment.v1beta3.MsgStartGroupResponse" as const, - encode( - _: MsgStartGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgStartGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgStartGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgStartGroupResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgStartGroupResponse(); while (reader.pos < end) { @@ -412,26 +361,13 @@ export const MsgStartGroupResponse = { messageTypeRegistry.set(MsgStartGroupResponse.$type, MsgStartGroupResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/groupspec.ts b/ts/src/generated/akash/deployment/v1beta3/groupspec.ts index ef77de04..f5caf25f 100644 --- a/ts/src/generated/akash/deployment/v1beta3/groupspec.ts +++ b/ts/src/generated/akash/deployment/v1beta3/groupspec.ts @@ -1,42 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { PlacementRequirements } from '../../base/v1beta3/attribute'; -import { ResourceUnit } from './resourceunit'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { PlacementRequirements } from "../../base/v1beta3/attribute"; +import { ResourceUnit } from "./resourceunit"; /** GroupSpec stores group specifications */ export interface GroupSpec { - $type: 'akash.deployment.v1beta3.GroupSpec'; + $type: "akash.deployment.v1beta3.GroupSpec"; name: string; requirements: PlacementRequirements | undefined; resources: ResourceUnit[]; } function createBaseGroupSpec(): GroupSpec { - return { - $type: 'akash.deployment.v1beta3.GroupSpec', - name: '', - requirements: undefined, - resources: [], - }; + return { $type: "akash.deployment.v1beta3.GroupSpec", name: "", requirements: undefined, resources: [] }; } export const GroupSpec = { - $type: 'akash.deployment.v1beta3.GroupSpec' as const, + $type: "akash.deployment.v1beta3.GroupSpec" as const, - encode( - message: GroupSpec, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: GroupSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.requirements !== undefined) { - PlacementRequirements.encode( - message.requirements, - writer.uint32(18).fork(), - ).ldelim(); + PlacementRequirements.encode(message.requirements, writer.uint32(18).fork()).ldelim(); } for (const v of message.resources) { ResourceUnit.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -45,8 +34,7 @@ export const GroupSpec = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GroupSpec { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroupSpec(); while (reader.pos < end) { @@ -64,10 +52,7 @@ export const GroupSpec = { break; } - message.requirements = PlacementRequirements.decode( - reader, - reader.uint32(), - ); + message.requirements = PlacementRequirements.decode(reader, reader.uint32()); continue; case 3: if (tag !== 26) { @@ -88,10 +73,8 @@ export const GroupSpec = { fromJSON(object: any): GroupSpec { return { $type: GroupSpec.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - requirements: isSet(object.requirements) - ? PlacementRequirements.fromJSON(object.requirements) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + requirements: isSet(object.requirements) ? PlacementRequirements.fromJSON(object.requirements) : undefined, resources: globalThis.Array.isArray(object?.resources) ? object.resources.map((e: any) => ResourceUnit.fromJSON(e)) : [], @@ -100,7 +83,7 @@ export const GroupSpec = { toJSON(message: GroupSpec): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.requirements !== undefined) { @@ -117,39 +100,24 @@ export const GroupSpec = { }, fromPartial(object: DeepPartial): GroupSpec { const message = createBaseGroupSpec(); - message.name = object.name ?? ''; - message.requirements = - object.requirements !== undefined && object.requirements !== null - ? PlacementRequirements.fromPartial(object.requirements) - : undefined; - message.resources = - object.resources?.map((e) => ResourceUnit.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.requirements = (object.requirements !== undefined && object.requirements !== null) + ? PlacementRequirements.fromPartial(object.requirements) + : undefined; + message.resources = object.resources?.map((e) => ResourceUnit.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GroupSpec.$type, GroupSpec); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/params.ts b/ts/src/generated/akash/deployment/v1beta3/params.ts index 0d0374be..d1b7d8b1 100644 --- a/ts/src/generated/akash/deployment/v1beta3/params.ts +++ b/ts/src/generated/akash/deployment/v1beta3/params.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params defines the parameters for the x/deployment package */ export interface Params { - $type: 'akash.deployment.v1beta3.Params'; + $type: "akash.deployment.v1beta3.Params"; minDeposits: Coin[]; } function createBaseParams(): Params { - return { $type: 'akash.deployment.v1beta3.Params', minDeposits: [] }; + return { $type: "akash.deployment.v1beta3.Params", minDeposits: [] }; } export const Params = { - $type: 'akash.deployment.v1beta3.Params' as const, + $type: "akash.deployment.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.minDeposits) { Coin.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const Params = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -73,34 +69,20 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.minDeposits = - object.minDeposits?.map((e) => Coin.fromPartial(e)) || []; + message.minDeposits = object.minDeposits?.map((e) => Coin.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/query.ts b/ts/src/generated/akash/deployment/v1beta3/query.ts index 30f53e26..e4903638 100644 --- a/ts/src/generated/akash/deployment/v1beta3/query.ts +++ b/ts/src/generated/akash/deployment/v1beta3/query.ts @@ -1,39 +1,36 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account } from '../../escrow/v1beta3/types'; -import { Deployment, DeploymentFilters, DeploymentID } from './deployment'; -import { Group } from './group'; -import { GroupID } from './groupid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account } from "../../escrow/v1beta3/types"; +import { Deployment, DeploymentFilters, DeploymentID } from "./deployment"; +import { Group } from "./group"; +import { GroupID } from "./groupid"; /** QueryDeploymentsRequest is request type for the Query/Deployments RPC method */ export interface QueryDeploymentsRequest { - $type: 'akash.deployment.v1beta3.QueryDeploymentsRequest'; + $type: "akash.deployment.v1beta3.QueryDeploymentsRequest"; filters: DeploymentFilters | undefined; pagination: PageRequest | undefined; } /** QueryDeploymentsResponse is response type for the Query/Deployments RPC method */ export interface QueryDeploymentsResponse { - $type: 'akash.deployment.v1beta3.QueryDeploymentsResponse'; + $type: "akash.deployment.v1beta3.QueryDeploymentsResponse"; deployments: QueryDeploymentResponse[]; pagination: PageResponse | undefined; } /** QueryDeploymentRequest is request type for the Query/Deployment RPC method */ export interface QueryDeploymentRequest { - $type: 'akash.deployment.v1beta3.QueryDeploymentRequest'; + $type: "akash.deployment.v1beta3.QueryDeploymentRequest"; id: DeploymentID | undefined; } /** QueryDeploymentResponse is response type for the Query/Deployment RPC method */ export interface QueryDeploymentResponse { - $type: 'akash.deployment.v1beta3.QueryDeploymentResponse'; + $type: "akash.deployment.v1beta3.QueryDeploymentResponse"; deployment: Deployment | undefined; groups: Group[]; escrowAccount: Account | undefined; @@ -41,36 +38,26 @@ export interface QueryDeploymentResponse { /** QueryGroupRequest is request type for the Query/Group RPC method */ export interface QueryGroupRequest { - $type: 'akash.deployment.v1beta3.QueryGroupRequest'; + $type: "akash.deployment.v1beta3.QueryGroupRequest"; id: GroupID | undefined; } /** QueryGroupResponse is response type for the Query/Group RPC method */ export interface QueryGroupResponse { - $type: 'akash.deployment.v1beta3.QueryGroupResponse'; + $type: "akash.deployment.v1beta3.QueryGroupResponse"; group: Group | undefined; } function createBaseQueryDeploymentsRequest(): QueryDeploymentsRequest { - return { - $type: 'akash.deployment.v1beta3.QueryDeploymentsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta3.QueryDeploymentsRequest", filters: undefined, pagination: undefined }; } export const QueryDeploymentsRequest = { - $type: 'akash.deployment.v1beta3.QueryDeploymentsRequest' as const, + $type: "akash.deployment.v1beta3.QueryDeploymentsRequest" as const, - encode( - message: QueryDeploymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { - DeploymentFilters.encode( - message.filters, - writer.uint32(10).fork(), - ).ldelim(); + DeploymentFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim(); @@ -78,12 +65,8 @@ export const QueryDeploymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsRequest(); while (reader.pos < end) { @@ -115,12 +98,8 @@ export const QueryDeploymentsRequest = { fromJSON(object: any): QueryDeploymentsRequest { return { $type: QueryDeploymentsRequest.$type, - filters: isSet(object.filters) - ? DeploymentFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? DeploymentFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -138,18 +117,14 @@ export const QueryDeploymentsRequest = { create(base?: DeepPartial): QueryDeploymentsRequest { return QueryDeploymentsRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsRequest { + fromPartial(object: DeepPartial): QueryDeploymentsRequest { const message = createBaseQueryDeploymentsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? DeploymentFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? DeploymentFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -157,38 +132,24 @@ export const QueryDeploymentsRequest = { messageTypeRegistry.set(QueryDeploymentsRequest.$type, QueryDeploymentsRequest); function createBaseQueryDeploymentsResponse(): QueryDeploymentsResponse { - return { - $type: 'akash.deployment.v1beta3.QueryDeploymentsResponse', - deployments: [], - pagination: undefined, - }; + return { $type: "akash.deployment.v1beta3.QueryDeploymentsResponse", deployments: [], pagination: undefined }; } export const QueryDeploymentsResponse = { - $type: 'akash.deployment.v1beta3.QueryDeploymentsResponse' as const, + $type: "akash.deployment.v1beta3.QueryDeploymentsResponse" as const, - encode( - message: QueryDeploymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.deployments) { QueryDeploymentResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentsResponse(); while (reader.pos < end) { @@ -199,9 +160,7 @@ export const QueryDeploymentsResponse = { break; } - message.deployments.push( - QueryDeploymentResponse.decode(reader, reader.uint32()), - ); + message.deployments.push(QueryDeploymentResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -223,22 +182,16 @@ export const QueryDeploymentsResponse = { return { $type: QueryDeploymentsResponse.$type, deployments: globalThis.Array.isArray(object?.deployments) - ? object.deployments.map((e: any) => - QueryDeploymentResponse.fromJSON(e), - ) + ? object.deployments.map((e: any) => QueryDeploymentResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryDeploymentsResponse): unknown { const obj: any = {}; if (message.deployments?.length) { - obj.deployments = message.deployments.map((e) => - QueryDeploymentResponse.toJSON(e), - ); + obj.deployments = message.deployments.map((e) => QueryDeploymentResponse.toJSON(e)); } if (message.pagination !== undefined) { obj.pagination = PageResponse.toJSON(message.pagination); @@ -246,57 +199,37 @@ export const QueryDeploymentsResponse = { return obj; }, - create( - base?: DeepPartial, - ): QueryDeploymentsResponse { + create(base?: DeepPartial): QueryDeploymentsResponse { return QueryDeploymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentsResponse { + fromPartial(object: DeepPartial): QueryDeploymentsResponse { const message = createBaseQueryDeploymentsResponse(); - message.deployments = - object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || - []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.deployments = object.deployments?.map((e) => QueryDeploymentResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; -messageTypeRegistry.set( - QueryDeploymentsResponse.$type, - QueryDeploymentsResponse, -); +messageTypeRegistry.set(QueryDeploymentsResponse.$type, QueryDeploymentsResponse); function createBaseQueryDeploymentRequest(): QueryDeploymentRequest { - return { - $type: 'akash.deployment.v1beta3.QueryDeploymentRequest', - id: undefined, - }; + return { $type: "akash.deployment.v1beta3.QueryDeploymentRequest", id: undefined }; } export const QueryDeploymentRequest = { - $type: 'akash.deployment.v1beta3.QueryDeploymentRequest' as const, + $type: "akash.deployment.v1beta3.QueryDeploymentRequest" as const, - encode( - message: QueryDeploymentRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { DeploymentID.encode(message.id, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentRequest(); while (reader.pos < end) { @@ -319,10 +252,7 @@ export const QueryDeploymentRequest = { }, fromJSON(object: any): QueryDeploymentRequest { - return { - $type: QueryDeploymentRequest.$type, - id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined, - }; + return { $type: QueryDeploymentRequest.$type, id: isSet(object.id) ? DeploymentID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryDeploymentRequest): unknown { @@ -336,14 +266,9 @@ export const QueryDeploymentRequest = { create(base?: DeepPartial): QueryDeploymentRequest { return QueryDeploymentRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentRequest { + fromPartial(object: DeepPartial): QueryDeploymentRequest { const message = createBaseQueryDeploymentRequest(); - message.id = - object.id !== undefined && object.id !== null - ? DeploymentID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? DeploymentID.fromPartial(object.id) : undefined; return message; }, }; @@ -352,7 +277,7 @@ messageTypeRegistry.set(QueryDeploymentRequest.$type, QueryDeploymentRequest); function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { return { - $type: 'akash.deployment.v1beta3.QueryDeploymentResponse', + $type: "akash.deployment.v1beta3.QueryDeploymentResponse", deployment: undefined, groups: [], escrowAccount: undefined, @@ -360,12 +285,9 @@ function createBaseQueryDeploymentResponse(): QueryDeploymentResponse { } export const QueryDeploymentResponse = { - $type: 'akash.deployment.v1beta3.QueryDeploymentResponse' as const, + $type: "akash.deployment.v1beta3.QueryDeploymentResponse" as const, - encode( - message: QueryDeploymentResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryDeploymentResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployment !== undefined) { Deployment.encode(message.deployment, writer.uint32(10).fork()).ldelim(); } @@ -378,12 +300,8 @@ export const QueryDeploymentResponse = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryDeploymentResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryDeploymentResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryDeploymentResponse(); while (reader.pos < end) { @@ -422,15 +340,9 @@ export const QueryDeploymentResponse = { fromJSON(object: any): QueryDeploymentResponse { return { $type: QueryDeploymentResponse.$type, - deployment: isSet(object.deployment) - ? Deployment.fromJSON(object.deployment) - : undefined, - groups: globalThis.Array.isArray(object?.groups) - ? object.groups.map((e: any) => Group.fromJSON(e)) - : [], - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + deployment: isSet(object.deployment) ? Deployment.fromJSON(object.deployment) : undefined, + groups: globalThis.Array.isArray(object?.groups) ? object.groups.map((e: any) => Group.fromJSON(e)) : [], + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -451,19 +363,15 @@ export const QueryDeploymentResponse = { create(base?: DeepPartial): QueryDeploymentResponse { return QueryDeploymentResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryDeploymentResponse { + fromPartial(object: DeepPartial): QueryDeploymentResponse { const message = createBaseQueryDeploymentResponse(); - message.deployment = - object.deployment !== undefined && object.deployment !== null - ? Deployment.fromPartial(object.deployment) - : undefined; + message.deployment = (object.deployment !== undefined && object.deployment !== null) + ? Deployment.fromPartial(object.deployment) + : undefined; message.groups = object.groups?.map((e) => Group.fromPartial(e)) || []; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -471,16 +379,13 @@ export const QueryDeploymentResponse = { messageTypeRegistry.set(QueryDeploymentResponse.$type, QueryDeploymentResponse); function createBaseQueryGroupRequest(): QueryGroupRequest { - return { $type: 'akash.deployment.v1beta3.QueryGroupRequest', id: undefined }; + return { $type: "akash.deployment.v1beta3.QueryGroupRequest", id: undefined }; } export const QueryGroupRequest = { - $type: 'akash.deployment.v1beta3.QueryGroupRequest' as const, + $type: "akash.deployment.v1beta3.QueryGroupRequest" as const, - encode( - message: QueryGroupRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { GroupID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -488,8 +393,7 @@ export const QueryGroupRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupRequest(); while (reader.pos < end) { @@ -512,10 +416,7 @@ export const QueryGroupRequest = { }, fromJSON(object: any): QueryGroupRequest { - return { - $type: QueryGroupRequest.$type, - id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined, - }; + return { $type: QueryGroupRequest.$type, id: isSet(object.id) ? GroupID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryGroupRequest): unknown { @@ -531,10 +432,7 @@ export const QueryGroupRequest = { }, fromPartial(object: DeepPartial): QueryGroupRequest { const message = createBaseQueryGroupRequest(); - message.id = - object.id !== undefined && object.id !== null - ? GroupID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? GroupID.fromPartial(object.id) : undefined; return message; }, }; @@ -542,19 +440,13 @@ export const QueryGroupRequest = { messageTypeRegistry.set(QueryGroupRequest.$type, QueryGroupRequest); function createBaseQueryGroupResponse(): QueryGroupResponse { - return { - $type: 'akash.deployment.v1beta3.QueryGroupResponse', - group: undefined, - }; + return { $type: "akash.deployment.v1beta3.QueryGroupResponse", group: undefined }; } export const QueryGroupResponse = { - $type: 'akash.deployment.v1beta3.QueryGroupResponse' as const, + $type: "akash.deployment.v1beta3.QueryGroupResponse" as const, - encode( - message: QueryGroupResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryGroupResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.group !== undefined) { Group.encode(message.group, writer.uint32(10).fork()).ldelim(); } @@ -562,8 +454,7 @@ export const QueryGroupResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryGroupResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryGroupResponse(); while (reader.pos < end) { @@ -586,10 +477,7 @@ export const QueryGroupResponse = { }, fromJSON(object: any): QueryGroupResponse { - return { - $type: QueryGroupResponse.$type, - group: isSet(object.group) ? Group.fromJSON(object.group) : undefined, - }; + return { $type: QueryGroupResponse.$type, group: isSet(object.group) ? Group.fromJSON(object.group) : undefined }; }, toJSON(message: QueryGroupResponse): unknown { @@ -605,10 +493,7 @@ export const QueryGroupResponse = { }, fromPartial(object: DeepPartial): QueryGroupResponse { const message = createBaseQueryGroupResponse(); - message.group = - object.group !== undefined && object.group !== null - ? Group.fromPartial(object.group) - : undefined; + message.group = (object.group !== undefined && object.group !== null) ? Group.fromPartial(object.group) : undefined; return message; }, }; @@ -618,16 +503,14 @@ messageTypeRegistry.set(QueryGroupResponse.$type, QueryGroupResponse); /** Query defines the gRPC querier service */ export interface Query { /** Deployments queries deployments */ - Deployments( - request: QueryDeploymentsRequest, - ): Promise; + Deployments(request: QueryDeploymentsRequest): Promise; /** Deployment queries deployment details */ Deployment(request: QueryDeploymentRequest): Promise; /** Group queries group details */ Group(request: QueryGroupRequest): Promise; } -export const QueryServiceName = 'akash.deployment.v1beta3.Query'; +export const QueryServiceName = "akash.deployment.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -638,63 +521,36 @@ export class QueryClientImpl implements Query { this.Deployment = this.Deployment.bind(this); this.Group = this.Group.bind(this); } - Deployments( - request: QueryDeploymentsRequest, - ): Promise { + Deployments(request: QueryDeploymentsRequest): Promise { const data = QueryDeploymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployments', data); - return promise.then((data) => - QueryDeploymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployments", data); + return promise.then((data) => QueryDeploymentsResponse.decode(_m0.Reader.create(data))); } - Deployment( - request: QueryDeploymentRequest, - ): Promise { + Deployment(request: QueryDeploymentRequest): Promise { const data = QueryDeploymentRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Deployment', data); - return promise.then((data) => - QueryDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Deployment", data); + return promise.then((data) => QueryDeploymentResponse.decode(_m0.Reader.create(data))); } Group(request: QueryGroupRequest): Promise { const data = QueryGroupRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Group', data); - return promise.then((data) => - QueryGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Group", data); + return promise.then((data) => QueryGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/resourceunit.ts b/ts/src/generated/akash/deployment/v1beta3/resourceunit.ts index a90006ae..367243d8 100644 --- a/ts/src/generated/akash/deployment/v1beta3/resourceunit.ts +++ b/ts/src/generated/akash/deployment/v1beta3/resourceunit.ts @@ -1,34 +1,26 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Resources } from '../../base/v1beta3/resources'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Resources } from "../../base/v1beta3/resources"; /** ResourceUnit extends Resources and adds Count along with the Price */ export interface ResourceUnit { - $type: 'akash.deployment.v1beta3.ResourceUnit'; + $type: "akash.deployment.v1beta3.ResourceUnit"; resource: Resources | undefined; count: number; price: DecCoin | undefined; } function createBaseResourceUnit(): ResourceUnit { - return { - $type: 'akash.deployment.v1beta3.ResourceUnit', - resource: undefined, - count: 0, - price: undefined, - }; + return { $type: "akash.deployment.v1beta3.ResourceUnit", resource: undefined, count: 0, price: undefined }; } export const ResourceUnit = { - $type: 'akash.deployment.v1beta3.ResourceUnit' as const, + $type: "akash.deployment.v1beta3.ResourceUnit" as const, - encode( - message: ResourceUnit, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceUnit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resource !== undefined) { Resources.encode(message.resource, writer.uint32(10).fork()).ldelim(); } @@ -42,8 +34,7 @@ export const ResourceUnit = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceUnit { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceUnit(); while (reader.pos < end) { @@ -82,9 +73,7 @@ export const ResourceUnit = { fromJSON(object: any): ResourceUnit { return { $type: ResourceUnit.$type, - resource: isSet(object.resource) - ? Resources.fromJSON(object.resource) - : undefined, + resource: isSet(object.resource) ? Resources.fromJSON(object.resource) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, }; @@ -109,41 +98,26 @@ export const ResourceUnit = { }, fromPartial(object: DeepPartial): ResourceUnit { const message = createBaseResourceUnit(); - message.resource = - object.resource !== undefined && object.resource !== null - ? Resources.fromPartial(object.resource) - : undefined; + message.resource = (object.resource !== undefined && object.resource !== null) + ? Resources.fromPartial(object.resource) + : undefined; message.count = object.count ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; return message; }, }; messageTypeRegistry.set(ResourceUnit.$type, ResourceUnit); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/deployment/v1beta3/service.ts b/ts/src/generated/akash/deployment/v1beta3/service.ts index 5028766f..7fc8ac43 100644 --- a/ts/src/generated/akash/deployment/v1beta3/service.ts +++ b/ts/src/generated/akash/deployment/v1beta3/service.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; +import _m0 from "protobufjs/minimal"; import { MsgCloseDeployment, MsgCloseDeploymentResponse, @@ -9,7 +9,7 @@ import { MsgDepositDeploymentResponse, MsgUpdateDeployment, MsgUpdateDeploymentResponse, -} from './deploymentmsg'; +} from "./deploymentmsg"; import { MsgCloseGroup, MsgCloseGroupResponse, @@ -17,26 +17,18 @@ import { MsgPauseGroupResponse, MsgStartGroup, MsgStartGroupResponse, -} from './groupmsg'; +} from "./groupmsg"; /** Msg defines the deployment Msg service. */ export interface Msg { /** CreateDeployment defines a method to create new deployment given proper inputs. */ - CreateDeployment( - request: MsgCreateDeployment, - ): Promise; + CreateDeployment(request: MsgCreateDeployment): Promise; /** DepositDeployment deposits more funds into the deployment account */ - DepositDeployment( - request: MsgDepositDeployment, - ): Promise; + DepositDeployment(request: MsgDepositDeployment): Promise; /** UpdateDeployment defines a method to update a deployment given proper inputs. */ - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise; + UpdateDeployment(request: MsgUpdateDeployment): Promise; /** CloseDeployment defines a method to close a deployment given proper inputs. */ - CloseDeployment( - request: MsgCloseDeployment, - ): Promise; + CloseDeployment(request: MsgCloseDeployment): Promise; /** CloseGroup defines a method to close a group of a deployment given proper inputs. */ CloseGroup(request: MsgCloseGroup): Promise; /** PauseGroup defines a method to close a group of a deployment given proper inputs. */ @@ -45,7 +37,7 @@ export interface Msg { StartGroup(request: MsgStartGroup): Promise; } -export const MsgServiceName = 'akash.deployment.v1beta3.Msg'; +export const MsgServiceName = "akash.deployment.v1beta3.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -60,75 +52,49 @@ export class MsgClientImpl implements Msg { this.PauseGroup = this.PauseGroup.bind(this); this.StartGroup = this.StartGroup.bind(this); } - CreateDeployment( - request: MsgCreateDeployment, - ): Promise { + CreateDeployment(request: MsgCreateDeployment): Promise { const data = MsgCreateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateDeployment', data); - return promise.then((data) => - MsgCreateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateDeployment", data); + return promise.then((data) => MsgCreateDeploymentResponse.decode(_m0.Reader.create(data))); } - DepositDeployment( - request: MsgDepositDeployment, - ): Promise { + DepositDeployment(request: MsgDepositDeployment): Promise { const data = MsgDepositDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DepositDeployment', data); - return promise.then((data) => - MsgDepositDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DepositDeployment", data); + return promise.then((data) => MsgDepositDeploymentResponse.decode(_m0.Reader.create(data))); } - UpdateDeployment( - request: MsgUpdateDeployment, - ): Promise { + UpdateDeployment(request: MsgUpdateDeployment): Promise { const data = MsgUpdateDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateDeployment', data); - return promise.then((data) => - MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateDeployment", data); + return promise.then((data) => MsgUpdateDeploymentResponse.decode(_m0.Reader.create(data))); } - CloseDeployment( - request: MsgCloseDeployment, - ): Promise { + CloseDeployment(request: MsgCloseDeployment): Promise { const data = MsgCloseDeployment.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseDeployment', data); - return promise.then((data) => - MsgCloseDeploymentResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseDeployment", data); + return promise.then((data) => MsgCloseDeploymentResponse.decode(_m0.Reader.create(data))); } CloseGroup(request: MsgCloseGroup): Promise { const data = MsgCloseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseGroup', data); - return promise.then((data) => - MsgCloseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseGroup", data); + return promise.then((data) => MsgCloseGroupResponse.decode(_m0.Reader.create(data))); } PauseGroup(request: MsgPauseGroup): Promise { const data = MsgPauseGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'PauseGroup', data); - return promise.then((data) => - MsgPauseGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "PauseGroup", data); + return promise.then((data) => MsgPauseGroupResponse.decode(_m0.Reader.create(data))); } StartGroup(request: MsgStartGroup): Promise { const data = MsgStartGroup.encode(request).finish(); - const promise = this.rpc.request(this.service, 'StartGroup', data); - return promise.then((data) => - MsgStartGroupResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "StartGroup", data); + return promise.then((data) => MsgStartGroupResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/akash/discovery/v1/akash.ts b/ts/src/generated/akash/discovery/v1/akash.ts index 803c83c7..2572eb83 100644 --- a/ts/src/generated/akash/discovery/v1/akash.ts +++ b/ts/src/generated/akash/discovery/v1/akash.ts @@ -1,21 +1,21 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ClientInfo } from './client_info'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ClientInfo } from "./client_info"; /** Akash akash specific RPC parameters */ export interface Akash { - $type: 'akash.discovery.v1.Akash'; + $type: "akash.discovery.v1.Akash"; clientInfo: ClientInfo | undefined; } function createBaseAkash(): Akash { - return { $type: 'akash.discovery.v1.Akash', clientInfo: undefined }; + return { $type: "akash.discovery.v1.Akash", clientInfo: undefined }; } export const Akash = { - $type: 'akash.discovery.v1.Akash' as const, + $type: "akash.discovery.v1.Akash" as const, encode(message: Akash, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.clientInfo !== undefined) { @@ -25,8 +25,7 @@ export const Akash = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Akash { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAkash(); while (reader.pos < end) { @@ -51,9 +50,7 @@ export const Akash = { fromJSON(object: any): Akash { return { $type: Akash.$type, - clientInfo: isSet(object.clientInfo) - ? ClientInfo.fromJSON(object.clientInfo) - : undefined, + clientInfo: isSet(object.clientInfo) ? ClientInfo.fromJSON(object.clientInfo) : undefined, }; }, @@ -70,36 +67,22 @@ export const Akash = { }, fromPartial(object: DeepPartial): Akash { const message = createBaseAkash(); - message.clientInfo = - object.clientInfo !== undefined && object.clientInfo !== null - ? ClientInfo.fromPartial(object.clientInfo) - : undefined; + message.clientInfo = (object.clientInfo !== undefined && object.clientInfo !== null) + ? ClientInfo.fromPartial(object.clientInfo) + : undefined; return message; }, }; messageTypeRegistry.set(Akash.$type, Akash); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/discovery/v1/client_info.ts b/ts/src/generated/akash/discovery/v1/client_info.ts index 9f83fdcb..5749cc31 100644 --- a/ts/src/generated/akash/discovery/v1/client_info.ts +++ b/ts/src/generated/akash/discovery/v1/client_info.ts @@ -1,34 +1,30 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** ClientInfo akash specific client info */ export interface ClientInfo { - $type: 'akash.discovery.v1.ClientInfo'; + $type: "akash.discovery.v1.ClientInfo"; apiVersion: string; } function createBaseClientInfo(): ClientInfo { - return { $type: 'akash.discovery.v1.ClientInfo', apiVersion: '' }; + return { $type: "akash.discovery.v1.ClientInfo", apiVersion: "" }; } export const ClientInfo = { - $type: 'akash.discovery.v1.ClientInfo' as const, + $type: "akash.discovery.v1.ClientInfo" as const, - encode( - message: ClientInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.apiVersion !== '') { + encode(message: ClientInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.apiVersion !== "") { writer.uint32(10).string(message.apiVersion); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ClientInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClientInfo(); while (reader.pos < end) { @@ -53,15 +49,13 @@ export const ClientInfo = { fromJSON(object: any): ClientInfo { return { $type: ClientInfo.$type, - apiVersion: isSet(object.apiVersion) - ? globalThis.String(object.apiVersion) - : '', + apiVersion: isSet(object.apiVersion) ? globalThis.String(object.apiVersion) : "", }; }, toJSON(message: ClientInfo): unknown { const obj: any = {}; - if (message.apiVersion !== '') { + if (message.apiVersion !== "") { obj.apiVersion = message.apiVersion; } return obj; @@ -72,33 +66,20 @@ export const ClientInfo = { }, fromPartial(object: DeepPartial): ClientInfo { const message = createBaseClientInfo(); - message.apiVersion = object.apiVersion ?? ''; + message.apiVersion = object.apiVersion ?? ""; return message; }, }; messageTypeRegistry.set(ClientInfo.$type, ClientInfo); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta1/genesis.ts b/ts/src/generated/akash/escrow/v1beta1/genesis.ts index ffe2a117..a707fc94 100644 --- a/ts/src/generated/akash/escrow/v1beta1/genesis.ts +++ b/ts/src/generated/akash/escrow/v1beta1/genesis.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, Payment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, Payment } from "./types"; /** GenesisState defines the basic genesis state used by escrow module */ export interface GenesisState { - $type: 'akash.escrow.v1beta1.GenesisState'; + $type: "akash.escrow.v1beta1.GenesisState"; accounts: Account[]; payments: Payment[]; } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.escrow.v1beta1.GenesisState', - accounts: [], - payments: [], - }; + return { $type: "akash.escrow.v1beta1.GenesisState", accounts: [], payments: [] }; } export const GenesisState = { - $type: 'akash.escrow.v1beta1.GenesisState' as const, + $type: "akash.escrow.v1beta1.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -69,12 +61,8 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - payments: globalThis.Array.isArray(object?.payments) - ? object.payments.map((e: any) => Payment.fromJSON(e)) - : [], + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => Payment.fromJSON(e)) : [], }; }, @@ -94,36 +82,21 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => Payment.fromPartial(e)) || []; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.payments = object.payments?.map((e) => Payment.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta1/query.ts b/ts/src/generated/akash/escrow/v1beta1/query.ts index 500ec3e8..73ec6f97 100644 --- a/ts/src/generated/akash/escrow/v1beta1/query.ts +++ b/ts/src/generated/akash/escrow/v1beta1/query.ts @@ -1,16 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, Payment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, Payment } from "./types"; /** QueryAccountRequest is request type for the Query/Account RPC method */ export interface QueryAccountsRequest { - $type: 'akash.escrow.v1beta1.QueryAccountsRequest'; + $type: "akash.escrow.v1beta1.QueryAccountsRequest"; scope: string; xid: string; owner: string; @@ -20,14 +17,14 @@ export interface QueryAccountsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryAccountsResponse { - $type: 'akash.escrow.v1beta1.QueryAccountsResponse'; + $type: "akash.escrow.v1beta1.QueryAccountsResponse"; accounts: Account[]; pagination: PageResponse | undefined; } /** QueryPaymentRequest is request type for the Query/Payment RPC method */ export interface QueryPaymentsRequest { - $type: 'akash.escrow.v1beta1.QueryPaymentsRequest'; + $type: "akash.escrow.v1beta1.QueryPaymentsRequest"; scope: string; xid: string; id: string; @@ -38,39 +35,36 @@ export interface QueryPaymentsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryPaymentsResponse { - $type: 'akash.escrow.v1beta1.QueryPaymentsResponse'; + $type: "akash.escrow.v1beta1.QueryPaymentsResponse"; payments: Payment[]; pagination: PageResponse | undefined; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { return { - $type: 'akash.escrow.v1beta1.QueryAccountsRequest', - scope: '', - xid: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta1.QueryAccountsRequest", + scope: "", + xid: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryAccountsRequest = { - $type: 'akash.escrow.v1beta1.QueryAccountsRequest' as const, + $type: "akash.escrow.v1beta1.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(34).string(message.state); } if (message.pagination !== undefined) { @@ -79,12 +73,8 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); while (reader.pos < end) { @@ -137,28 +127,26 @@ export const QueryAccountsRequest = { fromJSON(object: any): QueryAccountsRequest { return { $type: QueryAccountsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryAccountsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -172,14 +160,13 @@ export const QueryAccountsRequest = { }, fromPartial(object: DeepPartial): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -187,38 +174,24 @@ export const QueryAccountsRequest = { messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { - $type: 'akash.escrow.v1beta1.QueryAccountsResponse', - accounts: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta1.QueryAccountsResponse", accounts: [], pagination: undefined }; } export const QueryAccountsResponse = { - $type: 'akash.escrow.v1beta1.QueryAccountsResponse' as const, + $type: "akash.escrow.v1beta1.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); while (reader.pos < end) { @@ -250,12 +223,8 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -273,16 +242,12 @@ export const QueryAccountsResponse = { create(base?: DeepPartial): QueryAccountsResponse { return QueryAccountsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAccountsResponse { + fromPartial(object: DeepPartial): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -291,36 +256,33 @@ messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { return { - $type: 'akash.escrow.v1beta1.QueryPaymentsRequest', - scope: '', - xid: '', - id: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta1.QueryPaymentsRequest", + scope: "", + xid: "", + id: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryPaymentsRequest = { - $type: 'akash.escrow.v1beta1.QueryPaymentsRequest' as const, + $type: "akash.escrow.v1beta1.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.id !== '') { + if (message.id !== "") { writer.uint32(26).string(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(34).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } if (message.pagination !== undefined) { @@ -329,12 +291,8 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); while (reader.pos < end) { @@ -394,32 +352,30 @@ export const QueryPaymentsRequest = { fromJSON(object: any): QueryPaymentsRequest { return { $type: QueryPaymentsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - id: isSet(object.id) ? globalThis.String(object.id) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + id: isSet(object.id) ? globalThis.String(object.id) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryPaymentsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.id !== '') { + if (message.id !== "") { obj.id = message.id; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -433,15 +389,14 @@ export const QueryPaymentsRequest = { }, fromPartial(object: DeepPartial): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.id = object.id ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.id = object.id ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -449,38 +404,24 @@ export const QueryPaymentsRequest = { messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { - return { - $type: 'akash.escrow.v1beta1.QueryPaymentsResponse', - payments: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta1.QueryPaymentsResponse", payments: [], pagination: undefined }; } export const QueryPaymentsResponse = { - $type: 'akash.escrow.v1beta1.QueryPaymentsResponse' as const, + $type: "akash.escrow.v1beta1.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { Payment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); while (reader.pos < end) { @@ -512,12 +453,8 @@ export const QueryPaymentsResponse = { fromJSON(object: any): QueryPaymentsResponse { return { $type: QueryPaymentsResponse.$type, - payments: globalThis.Array.isArray(object?.payments) - ? object.payments.map((e: any) => Payment.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => Payment.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -535,16 +472,12 @@ export const QueryPaymentsResponse = { create(base?: DeepPartial): QueryPaymentsResponse { return QueryPaymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryPaymentsResponse { + fromPartial(object: DeepPartial): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => Payment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map((e) => Payment.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -567,7 +500,7 @@ export interface Query { Payments(request: QueryPaymentsRequest): Promise; } -export const QueryServiceName = 'akash.escrow.v1beta1.Query'; +export const QueryServiceName = "akash.escrow.v1beta1.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -579,49 +512,28 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Accounts', data); - return promise.then((data) => - QueryAccountsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Accounts", data); + return promise.then((data) => QueryAccountsResponse.decode(_m0.Reader.create(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Payments', data); - return promise.then((data) => - QueryPaymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Payments", data); + return promise.then((data) => QueryPaymentsResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta1/types.ts b/ts/src/generated/akash/escrow/v1beta1/types.ts index dd282862..c0f3afa1 100644 --- a/ts/src/generated/akash/escrow/v1beta1/types.ts +++ b/ts/src/generated/akash/escrow/v1beta1/types.ts @@ -1,29 +1,35 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** AccountID is the account identifier */ export interface AccountID { - $type: 'akash.escrow.v1beta1.AccountID'; + $type: "akash.escrow.v1beta1.AccountID"; scope: string; xid: string; } /** Account stores state for an escrow account */ export interface Account { - $type: 'akash.escrow.v1beta1.Account'; + $type: "akash.escrow.v1beta1.Account"; /** unique identifier for this escrow account */ - id: AccountID | undefined; + id: + | AccountID + | undefined; /** bech32 encoded account address of the owner of this escrow account */ owner: string; /** current state of this escrow account */ state: Account_State; /** unspent coins received from the owner's wallet */ - balance: Coin | undefined; + balance: + | Coin + | undefined; /** total coins spent by this account */ - transferred: Coin | undefined; + transferred: + | Coin + | undefined; /** block height at which this account was last settled */ settledAt: Long; } @@ -44,19 +50,19 @@ export enum Account_State { export function account_StateFromJSON(object: any): Account_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Account_State.invalid; case 1: - case 'open': + case "open": return Account_State.open; case 2: - case 'closed': + case "closed": return Account_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return Account_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Account_State.UNRECOGNIZED; } @@ -65,22 +71,22 @@ export function account_StateFromJSON(object: any): Account_State { export function account_StateToJSON(object: Account_State): string { switch (object) { case Account_State.invalid: - return 'invalid'; + return "invalid"; case Account_State.open: - return 'open'; + return "open"; case Account_State.closed: - return 'closed'; + return "closed"; case Account_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case Account_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** Payment stores state for a payment */ export interface Payment { - $type: 'akash.escrow.v1beta1.Payment'; + $type: "akash.escrow.v1beta1.Payment"; accountId: AccountID | undefined; paymentId: string; owner: string; @@ -106,19 +112,19 @@ export enum Payment_State { export function payment_StateFromJSON(object: any): Payment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Payment_State.invalid; case 1: - case 'open': + case "open": return Payment_State.open; case 2: - case 'closed': + case "closed": return Payment_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return Payment_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Payment_State.UNRECOGNIZED; } @@ -127,42 +133,38 @@ export function payment_StateFromJSON(object: any): Payment_State { export function payment_StateToJSON(object: Payment_State): string { switch (object) { case Payment_State.invalid: - return 'invalid'; + return "invalid"; case Payment_State.open: - return 'open'; + return "open"; case Payment_State.closed: - return 'closed'; + return "closed"; case Payment_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case Payment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseAccountID(): AccountID { - return { $type: 'akash.escrow.v1beta1.AccountID', scope: '', xid: '' }; + return { $type: "akash.escrow.v1beta1.AccountID", scope: "", xid: "" }; } export const AccountID = { - $type: 'akash.escrow.v1beta1.AccountID' as const, + $type: "akash.escrow.v1beta1.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): AccountID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccountID(); while (reader.pos < end) { @@ -194,17 +196,17 @@ export const AccountID = { fromJSON(object: any): AccountID { return { $type: AccountID.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", }; }, toJSON(message: AccountID): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } return obj; @@ -215,8 +217,8 @@ export const AccountID = { }, fromPartial(object: DeepPartial): AccountID { const message = createBaseAccountID(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; return message; }, }; @@ -225,9 +227,9 @@ messageTypeRegistry.set(AccountID.$type, AccountID); function createBaseAccount(): Account { return { - $type: 'akash.escrow.v1beta1.Account', + $type: "akash.escrow.v1beta1.Account", id: undefined, - owner: '', + owner: "", state: 0, balance: undefined, transferred: undefined, @@ -236,16 +238,13 @@ function createBaseAccount(): Account { } export const Account = { - $type: 'akash.escrow.v1beta1.Account' as const, + $type: "akash.escrow.v1beta1.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } if (message.state !== 0) { @@ -264,8 +263,7 @@ export const Account = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Account { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccount(); while (reader.pos < end) { @@ -326,17 +324,11 @@ export const Account = { return { $type: Account.$type, id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? Coin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? Coin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, + balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? Coin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO, }; }, @@ -345,7 +337,7 @@ export const Account = { if (message.id !== undefined) { obj.id = AccountID.toJSON(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -368,24 +360,18 @@ export const Account = { }, fromPartial(object: DeepPartial): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; - message.owner = object.owner ?? ''; + message.id = (object.id !== undefined && object.id !== null) ? AccountID.fromPartial(object.id) : undefined; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? Coin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? Coin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; + message.balance = (object.balance !== undefined && object.balance !== null) + ? Coin.fromPartial(object.balance) + : undefined; + message.transferred = (object.transferred !== undefined && object.transferred !== null) + ? Coin.fromPartial(object.transferred) + : undefined; + message.settledAt = (object.settledAt !== undefined && object.settledAt !== null) + ? Long.fromValue(object.settledAt) + : Long.ZERO; return message; }, }; @@ -394,10 +380,10 @@ messageTypeRegistry.set(Account.$type, Account); function createBasePayment(): Payment { return { - $type: 'akash.escrow.v1beta1.Payment', + $type: "akash.escrow.v1beta1.Payment", accountId: undefined, - paymentId: '', - owner: '', + paymentId: "", + owner: "", state: 0, rate: undefined, balance: undefined, @@ -406,19 +392,16 @@ function createBasePayment(): Payment { } export const Payment = { - $type: 'akash.escrow.v1beta1.Payment' as const, + $type: "akash.escrow.v1beta1.Payment" as const, - encode( - message: Payment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Payment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { writer.uint32(18).string(message.paymentId); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } if (message.state !== 0) { @@ -437,8 +420,7 @@ export const Payment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Payment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePayment(); while (reader.pos < end) { @@ -505,21 +487,13 @@ export const Payment = { fromJSON(object: any): Payment { return { $type: Payment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, - paymentId: isSet(object.paymentId) - ? globalThis.String(object.paymentId) - : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, + paymentId: isSet(object.paymentId) ? globalThis.String(object.paymentId) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", state: isSet(object.state) ? payment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? Coin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? Coin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? Coin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined, }; }, @@ -528,10 +502,10 @@ export const Payment = { if (message.accountId !== undefined) { obj.accountId = AccountID.toJSON(message.accountId); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { obj.paymentId = message.paymentId; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -554,51 +528,32 @@ export const Payment = { }, fromPartial(object: DeepPartial): Payment { const message = createBasePayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; - message.paymentId = object.paymentId ?? ''; - message.owner = object.owner ?? ''; + message.accountId = (object.accountId !== undefined && object.accountId !== null) + ? AccountID.fromPartial(object.accountId) + : undefined; + message.paymentId = object.paymentId ?? ""; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? Coin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? Coin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = (object.rate !== undefined && object.rate !== null) ? Coin.fromPartial(object.rate) : undefined; + message.balance = (object.balance !== undefined && object.balance !== null) + ? Coin.fromPartial(object.balance) + : undefined; + message.withdrawn = (object.withdrawn !== undefined && object.withdrawn !== null) + ? Coin.fromPartial(object.withdrawn) + : undefined; return message; }, }; messageTypeRegistry.set(Payment.$type, Payment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta2/genesis.ts b/ts/src/generated/akash/escrow/v1beta2/genesis.ts index 89da761f..8d8d6503 100644 --- a/ts/src/generated/akash/escrow/v1beta2/genesis.ts +++ b/ts/src/generated/akash/escrow/v1beta2/genesis.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "./types"; /** GenesisState defines the basic genesis state used by escrow module */ export interface GenesisState { - $type: 'akash.escrow.v1beta2.GenesisState'; + $type: "akash.escrow.v1beta2.GenesisState"; accounts: Account[]; payments: FractionalPayment[]; } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.escrow.v1beta2.GenesisState', - accounts: [], - payments: [], - }; + return { $type: "akash.escrow.v1beta2.GenesisState", accounts: [], payments: [] }; } export const GenesisState = { - $type: 'akash.escrow.v1beta2.GenesisState' as const, + $type: "akash.escrow.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -55,9 +47,7 @@ export const GenesisState = { break; } - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()), - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -71,9 +61,7 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], @@ -96,36 +84,21 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.payments = object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta2/query.ts b/ts/src/generated/akash/escrow/v1beta2/query.ts index 1436edbd..eab85e09 100644 --- a/ts/src/generated/akash/escrow/v1beta2/query.ts +++ b/ts/src/generated/akash/escrow/v1beta2/query.ts @@ -1,16 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "./types"; /** QueryAccountRequest is request type for the Query/Account RPC method */ export interface QueryAccountsRequest { - $type: 'akash.escrow.v1beta2.QueryAccountsRequest'; + $type: "akash.escrow.v1beta2.QueryAccountsRequest"; scope: string; xid: string; owner: string; @@ -20,14 +17,14 @@ export interface QueryAccountsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryAccountsResponse { - $type: 'akash.escrow.v1beta2.QueryAccountsResponse'; + $type: "akash.escrow.v1beta2.QueryAccountsResponse"; accounts: Account[]; pagination: PageResponse | undefined; } /** QueryPaymentRequest is request type for the Query/Payment RPC method */ export interface QueryPaymentsRequest { - $type: 'akash.escrow.v1beta2.QueryPaymentsRequest'; + $type: "akash.escrow.v1beta2.QueryPaymentsRequest"; scope: string; xid: string; id: string; @@ -38,39 +35,36 @@ export interface QueryPaymentsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryPaymentsResponse { - $type: 'akash.escrow.v1beta2.QueryPaymentsResponse'; + $type: "akash.escrow.v1beta2.QueryPaymentsResponse"; payments: FractionalPayment[]; pagination: PageResponse | undefined; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { return { - $type: 'akash.escrow.v1beta2.QueryAccountsRequest', - scope: '', - xid: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta2.QueryAccountsRequest", + scope: "", + xid: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryAccountsRequest = { - $type: 'akash.escrow.v1beta2.QueryAccountsRequest' as const, + $type: "akash.escrow.v1beta2.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(34).string(message.state); } if (message.pagination !== undefined) { @@ -79,12 +73,8 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); while (reader.pos < end) { @@ -137,28 +127,26 @@ export const QueryAccountsRequest = { fromJSON(object: any): QueryAccountsRequest { return { $type: QueryAccountsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryAccountsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -172,14 +160,13 @@ export const QueryAccountsRequest = { }, fromPartial(object: DeepPartial): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -187,38 +174,24 @@ export const QueryAccountsRequest = { messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { - $type: 'akash.escrow.v1beta2.QueryAccountsResponse', - accounts: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta2.QueryAccountsResponse", accounts: [], pagination: undefined }; } export const QueryAccountsResponse = { - $type: 'akash.escrow.v1beta2.QueryAccountsResponse' as const, + $type: "akash.escrow.v1beta2.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); while (reader.pos < end) { @@ -250,12 +223,8 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -273,16 +242,12 @@ export const QueryAccountsResponse = { create(base?: DeepPartial): QueryAccountsResponse { return QueryAccountsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAccountsResponse { + fromPartial(object: DeepPartial): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -291,36 +256,33 @@ messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { return { - $type: 'akash.escrow.v1beta2.QueryPaymentsRequest', - scope: '', - xid: '', - id: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta2.QueryPaymentsRequest", + scope: "", + xid: "", + id: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryPaymentsRequest = { - $type: 'akash.escrow.v1beta2.QueryPaymentsRequest' as const, + $type: "akash.escrow.v1beta2.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.id !== '') { + if (message.id !== "") { writer.uint32(26).string(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(34).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } if (message.pagination !== undefined) { @@ -329,12 +291,8 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); while (reader.pos < end) { @@ -394,32 +352,30 @@ export const QueryPaymentsRequest = { fromJSON(object: any): QueryPaymentsRequest { return { $type: QueryPaymentsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - id: isSet(object.id) ? globalThis.String(object.id) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + id: isSet(object.id) ? globalThis.String(object.id) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryPaymentsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.id !== '') { + if (message.id !== "") { obj.id = message.id; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -433,15 +389,14 @@ export const QueryPaymentsRequest = { }, fromPartial(object: DeepPartial): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.id = object.id ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.id = object.id ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -449,38 +404,24 @@ export const QueryPaymentsRequest = { messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { - return { - $type: 'akash.escrow.v1beta2.QueryPaymentsResponse', - payments: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta2.QueryPaymentsResponse", payments: [], pagination: undefined }; } export const QueryPaymentsResponse = { - $type: 'akash.escrow.v1beta2.QueryPaymentsResponse' as const, + $type: "akash.escrow.v1beta2.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { FractionalPayment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); while (reader.pos < end) { @@ -491,9 +432,7 @@ export const QueryPaymentsResponse = { break; } - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()), - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -517,9 +456,7 @@ export const QueryPaymentsResponse = { payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -537,16 +474,12 @@ export const QueryPaymentsResponse = { create(base?: DeepPartial): QueryPaymentsResponse { return QueryPaymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryPaymentsResponse { + fromPartial(object: DeepPartial): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -569,7 +502,7 @@ export interface Query { Payments(request: QueryPaymentsRequest): Promise; } -export const QueryServiceName = 'akash.escrow.v1beta2.Query'; +export const QueryServiceName = "akash.escrow.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -581,49 +514,28 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Accounts', data); - return promise.then((data) => - QueryAccountsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Accounts", data); + return promise.then((data) => QueryAccountsResponse.decode(_m0.Reader.create(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Payments', data); - return promise.then((data) => - QueryPaymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Payments", data); + return promise.then((data) => QueryPaymentsResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta2/types.ts b/ts/src/generated/akash/escrow/v1beta2/types.ts index 563e5c69..35a66072 100644 --- a/ts/src/generated/akash/escrow/v1beta2/types.ts +++ b/ts/src/generated/akash/escrow/v1beta2/types.ts @@ -1,29 +1,35 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin, DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** AccountID is the account identifier */ export interface AccountID { - $type: 'akash.escrow.v1beta2.AccountID'; + $type: "akash.escrow.v1beta2.AccountID"; scope: string; xid: string; } /** Account stores state for an escrow account */ export interface Account { - $type: 'akash.escrow.v1beta2.Account'; + $type: "akash.escrow.v1beta2.Account"; /** unique identifier for this escrow account */ - id: AccountID | undefined; + id: + | AccountID + | undefined; /** bech32 encoded account address of the owner of this escrow account */ owner: string; /** current state of this escrow account */ state: Account_State; /** unspent coins received from the owner's wallet */ - balance: DecCoin | undefined; + balance: + | DecCoin + | undefined; /** total coins spent by this account */ - transferred: DecCoin | undefined; + transferred: + | DecCoin + | undefined; /** block height at which this account was last settled */ settledAt: Long; /** @@ -55,19 +61,19 @@ export enum Account_State { export function account_StateFromJSON(object: any): Account_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Account_State.invalid; case 1: - case 'open': + case "open": return Account_State.open; case 2: - case 'closed': + case "closed": return Account_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return Account_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Account_State.UNRECOGNIZED; } @@ -76,22 +82,22 @@ export function account_StateFromJSON(object: any): Account_State { export function account_StateToJSON(object: Account_State): string { switch (object) { case Account_State.invalid: - return 'invalid'; + return "invalid"; case Account_State.open: - return 'open'; + return "open"; case Account_State.closed: - return 'closed'; + return "closed"; case Account_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case Account_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** Payment stores state for a payment */ export interface FractionalPayment { - $type: 'akash.escrow.v1beta2.FractionalPayment'; + $type: "akash.escrow.v1beta2.FractionalPayment"; accountId: AccountID | undefined; paymentId: string; owner: string; @@ -114,70 +120,62 @@ export enum FractionalPayment_State { UNRECOGNIZED = -1, } -export function fractionalPayment_StateFromJSON( - object: any, -): FractionalPayment_State { +export function fractionalPayment_StateFromJSON(object: any): FractionalPayment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return FractionalPayment_State.invalid; case 1: - case 'open': + case "open": return FractionalPayment_State.open; case 2: - case 'closed': + case "closed": return FractionalPayment_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return FractionalPayment_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FractionalPayment_State.UNRECOGNIZED; } } -export function fractionalPayment_StateToJSON( - object: FractionalPayment_State, -): string { +export function fractionalPayment_StateToJSON(object: FractionalPayment_State): string { switch (object) { case FractionalPayment_State.invalid: - return 'invalid'; + return "invalid"; case FractionalPayment_State.open: - return 'open'; + return "open"; case FractionalPayment_State.closed: - return 'closed'; + return "closed"; case FractionalPayment_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case FractionalPayment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseAccountID(): AccountID { - return { $type: 'akash.escrow.v1beta2.AccountID', scope: '', xid: '' }; + return { $type: "akash.escrow.v1beta2.AccountID", scope: "", xid: "" }; } export const AccountID = { - $type: 'akash.escrow.v1beta2.AccountID' as const, + $type: "akash.escrow.v1beta2.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): AccountID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccountID(); while (reader.pos < end) { @@ -209,17 +207,17 @@ export const AccountID = { fromJSON(object: any): AccountID { return { $type: AccountID.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", }; }, toJSON(message: AccountID): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } return obj; @@ -230,8 +228,8 @@ export const AccountID = { }, fromPartial(object: DeepPartial): AccountID { const message = createBaseAccountID(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; return message; }, }; @@ -240,29 +238,26 @@ messageTypeRegistry.set(AccountID.$type, AccountID); function createBaseAccount(): Account { return { - $type: 'akash.escrow.v1beta2.Account', + $type: "akash.escrow.v1beta2.Account", id: undefined, - owner: '', + owner: "", state: 0, balance: undefined, transferred: undefined, settledAt: Long.ZERO, - depositor: '', + depositor: "", funds: undefined, }; } export const Account = { - $type: 'akash.escrow.v1beta2.Account' as const, + $type: "akash.escrow.v1beta2.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } if (message.state !== 0) { @@ -277,7 +272,7 @@ export const Account = { if (!message.settledAt.equals(Long.ZERO)) { writer.uint32(48).int64(message.settledAt); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(58).string(message.depositor); } if (message.funds !== undefined) { @@ -287,8 +282,7 @@ export const Account = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Account { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccount(); while (reader.pos < end) { @@ -363,20 +357,12 @@ export const Account = { return { $type: Account.$type, id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? DecCoin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? DecCoin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO, + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined, }; }, @@ -386,7 +372,7 @@ export const Account = { if (message.id !== undefined) { obj.id = AccountID.toJSON(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -401,7 +387,7 @@ export const Account = { if (!message.settledAt.equals(Long.ZERO)) { obj.settledAt = (message.settledAt || Long.ZERO).toString(); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } if (message.funds !== undefined) { @@ -415,29 +401,22 @@ export const Account = { }, fromPartial(object: DeepPartial): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; - message.owner = object.owner ?? ''; + message.id = (object.id !== undefined && object.id !== null) ? AccountID.fromPartial(object.id) : undefined; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? DecCoin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; - message.depositor = object.depositor ?? ''; - message.funds = - object.funds !== undefined && object.funds !== null - ? DecCoin.fromPartial(object.funds) - : undefined; + message.balance = (object.balance !== undefined && object.balance !== null) + ? DecCoin.fromPartial(object.balance) + : undefined; + message.transferred = (object.transferred !== undefined && object.transferred !== null) + ? DecCoin.fromPartial(object.transferred) + : undefined; + message.settledAt = (object.settledAt !== undefined && object.settledAt !== null) + ? Long.fromValue(object.settledAt) + : Long.ZERO; + message.depositor = object.depositor ?? ""; + message.funds = (object.funds !== undefined && object.funds !== null) + ? DecCoin.fromPartial(object.funds) + : undefined; return message; }, }; @@ -446,10 +425,10 @@ messageTypeRegistry.set(Account.$type, Account); function createBaseFractionalPayment(): FractionalPayment { return { - $type: 'akash.escrow.v1beta2.FractionalPayment', + $type: "akash.escrow.v1beta2.FractionalPayment", accountId: undefined, - paymentId: '', - owner: '', + paymentId: "", + owner: "", state: 0, rate: undefined, balance: undefined, @@ -458,19 +437,16 @@ function createBaseFractionalPayment(): FractionalPayment { } export const FractionalPayment = { - $type: 'akash.escrow.v1beta2.FractionalPayment' as const, + $type: "akash.escrow.v1beta2.FractionalPayment" as const, - encode( - message: FractionalPayment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: FractionalPayment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { writer.uint32(18).string(message.paymentId); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } if (message.state !== 0) { @@ -489,8 +465,7 @@ export const FractionalPayment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): FractionalPayment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFractionalPayment(); while (reader.pos < end) { @@ -557,23 +532,13 @@ export const FractionalPayment = { fromJSON(object: any): FractionalPayment { return { $type: FractionalPayment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, - paymentId: isSet(object.paymentId) - ? globalThis.String(object.paymentId) - : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) - ? fractionalPayment_StateFromJSON(object.state) - : 0, + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, + paymentId: isSet(object.paymentId) ? globalThis.String(object.paymentId) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? fractionalPayment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? DecCoin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined, }; }, @@ -582,10 +547,10 @@ export const FractionalPayment = { if (message.accountId !== undefined) { obj.accountId = AccountID.toJSON(message.accountId); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { obj.paymentId = message.paymentId; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -608,51 +573,32 @@ export const FractionalPayment = { }, fromPartial(object: DeepPartial): FractionalPayment { const message = createBaseFractionalPayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; - message.paymentId = object.paymentId ?? ''; - message.owner = object.owner ?? ''; + message.accountId = (object.accountId !== undefined && object.accountId !== null) + ? AccountID.fromPartial(object.accountId) + : undefined; + message.paymentId = object.paymentId ?? ""; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? DecCoin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = (object.rate !== undefined && object.rate !== null) ? DecCoin.fromPartial(object.rate) : undefined; + message.balance = (object.balance !== undefined && object.balance !== null) + ? DecCoin.fromPartial(object.balance) + : undefined; + message.withdrawn = (object.withdrawn !== undefined && object.withdrawn !== null) + ? Coin.fromPartial(object.withdrawn) + : undefined; return message; }, }; messageTypeRegistry.set(FractionalPayment.$type, FractionalPayment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta3/genesis.ts b/ts/src/generated/akash/escrow/v1beta3/genesis.ts index 65b907dd..e86e71ce 100644 --- a/ts/src/generated/akash/escrow/v1beta3/genesis.ts +++ b/ts/src/generated/akash/escrow/v1beta3/genesis.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "./types"; /** GenesisState defines the basic genesis state used by escrow module */ export interface GenesisState { - $type: 'akash.escrow.v1beta3.GenesisState'; + $type: "akash.escrow.v1beta3.GenesisState"; accounts: Account[]; payments: FractionalPayment[]; } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.escrow.v1beta3.GenesisState', - accounts: [], - payments: [], - }; + return { $type: "akash.escrow.v1beta3.GenesisState", accounts: [], payments: [] }; } export const GenesisState = { - $type: 'akash.escrow.v1beta3.GenesisState' as const, + $type: "akash.escrow.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -55,9 +47,7 @@ export const GenesisState = { break; } - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()), - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -71,9 +61,7 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], @@ -96,36 +84,21 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.payments = object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta3/query.ts b/ts/src/generated/akash/escrow/v1beta3/query.ts index 0e0bf65e..1922d2d6 100644 --- a/ts/src/generated/akash/escrow/v1beta3/query.ts +++ b/ts/src/generated/akash/escrow/v1beta3/query.ts @@ -1,16 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from './types'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "./types"; /** QueryAccountRequest is request type for the Query/Account RPC method */ export interface QueryAccountsRequest { - $type: 'akash.escrow.v1beta3.QueryAccountsRequest'; + $type: "akash.escrow.v1beta3.QueryAccountsRequest"; scope: string; xid: string; owner: string; @@ -20,14 +17,14 @@ export interface QueryAccountsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryAccountsResponse { - $type: 'akash.escrow.v1beta3.QueryAccountsResponse'; + $type: "akash.escrow.v1beta3.QueryAccountsResponse"; accounts: Account[]; pagination: PageResponse | undefined; } /** QueryPaymentRequest is request type for the Query/Payment RPC method */ export interface QueryPaymentsRequest { - $type: 'akash.escrow.v1beta3.QueryPaymentsRequest'; + $type: "akash.escrow.v1beta3.QueryPaymentsRequest"; scope: string; xid: string; id: string; @@ -38,39 +35,36 @@ export interface QueryPaymentsRequest { /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryPaymentsResponse { - $type: 'akash.escrow.v1beta3.QueryPaymentsResponse'; + $type: "akash.escrow.v1beta3.QueryPaymentsResponse"; payments: FractionalPayment[]; pagination: PageResponse | undefined; } function createBaseQueryAccountsRequest(): QueryAccountsRequest { return { - $type: 'akash.escrow.v1beta3.QueryAccountsRequest', - scope: '', - xid: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta3.QueryAccountsRequest", + scope: "", + xid: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryAccountsRequest = { - $type: 'akash.escrow.v1beta3.QueryAccountsRequest' as const, + $type: "akash.escrow.v1beta3.QueryAccountsRequest" as const, - encode( - message: QueryAccountsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryAccountsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(34).string(message.state); } if (message.pagination !== undefined) { @@ -79,12 +73,8 @@ export const QueryAccountsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsRequest(); while (reader.pos < end) { @@ -137,28 +127,26 @@ export const QueryAccountsRequest = { fromJSON(object: any): QueryAccountsRequest { return { $type: QueryAccountsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryAccountsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -172,14 +160,13 @@ export const QueryAccountsRequest = { }, fromPartial(object: DeepPartial): QueryAccountsRequest { const message = createBaseQueryAccountsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -187,38 +174,24 @@ export const QueryAccountsRequest = { messageTypeRegistry.set(QueryAccountsRequest.$type, QueryAccountsRequest); function createBaseQueryAccountsResponse(): QueryAccountsResponse { - return { - $type: 'akash.escrow.v1beta3.QueryAccountsResponse', - accounts: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta3.QueryAccountsResponse", accounts: [], pagination: undefined }; } export const QueryAccountsResponse = { - $type: 'akash.escrow.v1beta3.QueryAccountsResponse' as const, + $type: "akash.escrow.v1beta3.QueryAccountsResponse" as const, - encode( - message: QueryAccountsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryAccountsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.accounts) { Account.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryAccountsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryAccountsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryAccountsResponse(); while (reader.pos < end) { @@ -250,12 +223,8 @@ export const QueryAccountsResponse = { fromJSON(object: any): QueryAccountsResponse { return { $type: QueryAccountsResponse.$type, - accounts: globalThis.Array.isArray(object?.accounts) - ? object.accounts.map((e: any) => Account.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + accounts: globalThis.Array.isArray(object?.accounts) ? object.accounts.map((e: any) => Account.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -273,16 +242,12 @@ export const QueryAccountsResponse = { create(base?: DeepPartial): QueryAccountsResponse { return QueryAccountsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryAccountsResponse { + fromPartial(object: DeepPartial): QueryAccountsResponse { const message = createBaseQueryAccountsResponse(); - message.accounts = - object.accounts?.map((e) => Account.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.accounts = object.accounts?.map((e) => Account.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -291,36 +256,33 @@ messageTypeRegistry.set(QueryAccountsResponse.$type, QueryAccountsResponse); function createBaseQueryPaymentsRequest(): QueryPaymentsRequest { return { - $type: 'akash.escrow.v1beta3.QueryPaymentsRequest', - scope: '', - xid: '', - id: '', - owner: '', - state: '', + $type: "akash.escrow.v1beta3.QueryPaymentsRequest", + scope: "", + xid: "", + id: "", + owner: "", + state: "", pagination: undefined, }; } export const QueryPaymentsRequest = { - $type: 'akash.escrow.v1beta3.QueryPaymentsRequest' as const, + $type: "akash.escrow.v1beta3.QueryPaymentsRequest" as const, - encode( - message: QueryPaymentsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: QueryPaymentsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } - if (message.id !== '') { + if (message.id !== "") { writer.uint32(26).string(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(34).string(message.owner); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } if (message.pagination !== undefined) { @@ -329,12 +291,8 @@ export const QueryPaymentsRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsRequest(); while (reader.pos < end) { @@ -394,32 +352,30 @@ export const QueryPaymentsRequest = { fromJSON(object: any): QueryPaymentsRequest { return { $type: QueryPaymentsRequest.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', - id: isSet(object.id) ? globalThis.String(object.id) : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", + id: isSet(object.id) ? globalThis.String(object.id) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, toJSON(message: QueryPaymentsRequest): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } - if (message.id !== '') { + if (message.id !== "") { obj.id = message.id; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } if (message.pagination !== undefined) { @@ -433,15 +389,14 @@ export const QueryPaymentsRequest = { }, fromPartial(object: DeepPartial): QueryPaymentsRequest { const message = createBaseQueryPaymentsRequest(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; - message.id = object.id ?? ''; - message.owner = object.owner ?? ''; - message.state = object.state ?? ''; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; + message.id = object.id ?? ""; + message.owner = object.owner ?? ""; + message.state = object.state ?? ""; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -449,38 +404,24 @@ export const QueryPaymentsRequest = { messageTypeRegistry.set(QueryPaymentsRequest.$type, QueryPaymentsRequest); function createBaseQueryPaymentsResponse(): QueryPaymentsResponse { - return { - $type: 'akash.escrow.v1beta3.QueryPaymentsResponse', - payments: [], - pagination: undefined, - }; + return { $type: "akash.escrow.v1beta3.QueryPaymentsResponse", payments: [], pagination: undefined }; } export const QueryPaymentsResponse = { - $type: 'akash.escrow.v1beta3.QueryPaymentsResponse' as const, + $type: "akash.escrow.v1beta3.QueryPaymentsResponse" as const, - encode( - message: QueryPaymentsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryPaymentsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.payments) { FractionalPayment.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryPaymentsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryPaymentsResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryPaymentsResponse(); while (reader.pos < end) { @@ -491,9 +432,7 @@ export const QueryPaymentsResponse = { break; } - message.payments.push( - FractionalPayment.decode(reader, reader.uint32()), - ); + message.payments.push(FractionalPayment.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -517,9 +456,7 @@ export const QueryPaymentsResponse = { payments: globalThis.Array.isArray(object?.payments) ? object.payments.map((e: any) => FractionalPayment.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -537,16 +474,12 @@ export const QueryPaymentsResponse = { create(base?: DeepPartial): QueryPaymentsResponse { return QueryPaymentsResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryPaymentsResponse { + fromPartial(object: DeepPartial): QueryPaymentsResponse { const message = createBaseQueryPaymentsResponse(); - message.payments = - object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.payments = object.payments?.map((e) => FractionalPayment.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -569,7 +502,7 @@ export interface Query { Payments(request: QueryPaymentsRequest): Promise; } -export const QueryServiceName = 'akash.escrow.v1beta3.Query'; +export const QueryServiceName = "akash.escrow.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -581,49 +514,28 @@ export class QueryClientImpl implements Query { } Accounts(request: QueryAccountsRequest): Promise { const data = QueryAccountsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Accounts', data); - return promise.then((data) => - QueryAccountsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Accounts", data); + return promise.then((data) => QueryAccountsResponse.decode(_m0.Reader.create(data))); } Payments(request: QueryPaymentsRequest): Promise { const data = QueryPaymentsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Payments', data); - return promise.then((data) => - QueryPaymentsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Payments", data); + return promise.then((data) => QueryPaymentsResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/escrow/v1beta3/types.ts b/ts/src/generated/akash/escrow/v1beta3/types.ts index 2679e2c2..74c18806 100644 --- a/ts/src/generated/akash/escrow/v1beta3/types.ts +++ b/ts/src/generated/akash/escrow/v1beta3/types.ts @@ -1,29 +1,35 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin, DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** AccountID is the account identifier */ export interface AccountID { - $type: 'akash.escrow.v1beta3.AccountID'; + $type: "akash.escrow.v1beta3.AccountID"; scope: string; xid: string; } /** Account stores state for an escrow account */ export interface Account { - $type: 'akash.escrow.v1beta3.Account'; + $type: "akash.escrow.v1beta3.Account"; /** unique identifier for this escrow account */ - id: AccountID | undefined; + id: + | AccountID + | undefined; /** bech32 encoded account address of the owner of this escrow account */ owner: string; /** current state of this escrow account */ state: Account_State; /** unspent coins received from the owner's wallet */ - balance: DecCoin | undefined; + balance: + | DecCoin + | undefined; /** total coins spent by this account */ - transferred: DecCoin | undefined; + transferred: + | DecCoin + | undefined; /** block height at which this account was last settled */ settledAt: Long; /** @@ -55,19 +61,19 @@ export enum Account_State { export function account_StateFromJSON(object: any): Account_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Account_State.invalid; case 1: - case 'open': + case "open": return Account_State.open; case 2: - case 'closed': + case "closed": return Account_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return Account_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Account_State.UNRECOGNIZED; } @@ -76,22 +82,22 @@ export function account_StateFromJSON(object: any): Account_State { export function account_StateToJSON(object: Account_State): string { switch (object) { case Account_State.invalid: - return 'invalid'; + return "invalid"; case Account_State.open: - return 'open'; + return "open"; case Account_State.closed: - return 'closed'; + return "closed"; case Account_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case Account_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** Payment stores state for a payment */ export interface FractionalPayment { - $type: 'akash.escrow.v1beta3.FractionalPayment'; + $type: "akash.escrow.v1beta3.FractionalPayment"; accountId: AccountID | undefined; paymentId: string; owner: string; @@ -114,70 +120,62 @@ export enum FractionalPayment_State { UNRECOGNIZED = -1, } -export function fractionalPayment_StateFromJSON( - object: any, -): FractionalPayment_State { +export function fractionalPayment_StateFromJSON(object: any): FractionalPayment_State { switch (object) { case 0: - case 'invalid': + case "invalid": return FractionalPayment_State.invalid; case 1: - case 'open': + case "open": return FractionalPayment_State.open; case 2: - case 'closed': + case "closed": return FractionalPayment_State.closed; case 3: - case 'overdrawn': + case "overdrawn": return FractionalPayment_State.overdrawn; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FractionalPayment_State.UNRECOGNIZED; } } -export function fractionalPayment_StateToJSON( - object: FractionalPayment_State, -): string { +export function fractionalPayment_StateToJSON(object: FractionalPayment_State): string { switch (object) { case FractionalPayment_State.invalid: - return 'invalid'; + return "invalid"; case FractionalPayment_State.open: - return 'open'; + return "open"; case FractionalPayment_State.closed: - return 'closed'; + return "closed"; case FractionalPayment_State.overdrawn: - return 'overdrawn'; + return "overdrawn"; case FractionalPayment_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } function createBaseAccountID(): AccountID { - return { $type: 'akash.escrow.v1beta3.AccountID', scope: '', xid: '' }; + return { $type: "akash.escrow.v1beta3.AccountID", scope: "", xid: "" }; } export const AccountID = { - $type: 'akash.escrow.v1beta3.AccountID' as const, + $type: "akash.escrow.v1beta3.AccountID" as const, - encode( - message: AccountID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.scope !== '') { + encode(message: AccountID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.scope !== "") { writer.uint32(10).string(message.scope); } - if (message.xid !== '') { + if (message.xid !== "") { writer.uint32(18).string(message.xid); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): AccountID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccountID(); while (reader.pos < end) { @@ -209,17 +207,17 @@ export const AccountID = { fromJSON(object: any): AccountID { return { $type: AccountID.$type, - scope: isSet(object.scope) ? globalThis.String(object.scope) : '', - xid: isSet(object.xid) ? globalThis.String(object.xid) : '', + scope: isSet(object.scope) ? globalThis.String(object.scope) : "", + xid: isSet(object.xid) ? globalThis.String(object.xid) : "", }; }, toJSON(message: AccountID): unknown { const obj: any = {}; - if (message.scope !== '') { + if (message.scope !== "") { obj.scope = message.scope; } - if (message.xid !== '') { + if (message.xid !== "") { obj.xid = message.xid; } return obj; @@ -230,8 +228,8 @@ export const AccountID = { }, fromPartial(object: DeepPartial): AccountID { const message = createBaseAccountID(); - message.scope = object.scope ?? ''; - message.xid = object.xid ?? ''; + message.scope = object.scope ?? ""; + message.xid = object.xid ?? ""; return message; }, }; @@ -240,29 +238,26 @@ messageTypeRegistry.set(AccountID.$type, AccountID); function createBaseAccount(): Account { return { - $type: 'akash.escrow.v1beta3.Account', + $type: "akash.escrow.v1beta3.Account", id: undefined, - owner: '', + owner: "", state: 0, balance: undefined, transferred: undefined, settledAt: Long.ZERO, - depositor: '', + depositor: "", funds: undefined, }; } export const Account = { - $type: 'akash.escrow.v1beta3.Account' as const, + $type: "akash.escrow.v1beta3.Account" as const, - encode( - message: Account, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Account, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { AccountID.encode(message.id, writer.uint32(10).fork()).ldelim(); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(18).string(message.owner); } if (message.state !== 0) { @@ -277,7 +272,7 @@ export const Account = { if (!message.settledAt.equals(Long.ZERO)) { writer.uint32(48).int64(message.settledAt); } - if (message.depositor !== '') { + if (message.depositor !== "") { writer.uint32(58).string(message.depositor); } if (message.funds !== undefined) { @@ -287,8 +282,7 @@ export const Account = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Account { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseAccount(); while (reader.pos < end) { @@ -363,20 +357,12 @@ export const Account = { return { $type: Account.$type, id: isSet(object.id) ? AccountID.fromJSON(object.id) : undefined, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", state: isSet(object.state) ? account_StateFromJSON(object.state) : 0, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - transferred: isSet(object.transferred) - ? DecCoin.fromJSON(object.transferred) - : undefined, - settledAt: isSet(object.settledAt) - ? Long.fromValue(object.settledAt) - : Long.ZERO, - depositor: isSet(object.depositor) - ? globalThis.String(object.depositor) - : '', + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + transferred: isSet(object.transferred) ? DecCoin.fromJSON(object.transferred) : undefined, + settledAt: isSet(object.settledAt) ? Long.fromValue(object.settledAt) : Long.ZERO, + depositor: isSet(object.depositor) ? globalThis.String(object.depositor) : "", funds: isSet(object.funds) ? DecCoin.fromJSON(object.funds) : undefined, }; }, @@ -386,7 +372,7 @@ export const Account = { if (message.id !== undefined) { obj.id = AccountID.toJSON(message.id); } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -401,7 +387,7 @@ export const Account = { if (!message.settledAt.equals(Long.ZERO)) { obj.settledAt = (message.settledAt || Long.ZERO).toString(); } - if (message.depositor !== '') { + if (message.depositor !== "") { obj.depositor = message.depositor; } if (message.funds !== undefined) { @@ -415,29 +401,22 @@ export const Account = { }, fromPartial(object: DeepPartial): Account { const message = createBaseAccount(); - message.id = - object.id !== undefined && object.id !== null - ? AccountID.fromPartial(object.id) - : undefined; - message.owner = object.owner ?? ''; + message.id = (object.id !== undefined && object.id !== null) ? AccountID.fromPartial(object.id) : undefined; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.transferred = - object.transferred !== undefined && object.transferred !== null - ? DecCoin.fromPartial(object.transferred) - : undefined; - message.settledAt = - object.settledAt !== undefined && object.settledAt !== null - ? Long.fromValue(object.settledAt) - : Long.ZERO; - message.depositor = object.depositor ?? ''; - message.funds = - object.funds !== undefined && object.funds !== null - ? DecCoin.fromPartial(object.funds) - : undefined; + message.balance = (object.balance !== undefined && object.balance !== null) + ? DecCoin.fromPartial(object.balance) + : undefined; + message.transferred = (object.transferred !== undefined && object.transferred !== null) + ? DecCoin.fromPartial(object.transferred) + : undefined; + message.settledAt = (object.settledAt !== undefined && object.settledAt !== null) + ? Long.fromValue(object.settledAt) + : Long.ZERO; + message.depositor = object.depositor ?? ""; + message.funds = (object.funds !== undefined && object.funds !== null) + ? DecCoin.fromPartial(object.funds) + : undefined; return message; }, }; @@ -446,10 +425,10 @@ messageTypeRegistry.set(Account.$type, Account); function createBaseFractionalPayment(): FractionalPayment { return { - $type: 'akash.escrow.v1beta3.FractionalPayment', + $type: "akash.escrow.v1beta3.FractionalPayment", accountId: undefined, - paymentId: '', - owner: '', + paymentId: "", + owner: "", state: 0, rate: undefined, balance: undefined, @@ -458,19 +437,16 @@ function createBaseFractionalPayment(): FractionalPayment { } export const FractionalPayment = { - $type: 'akash.escrow.v1beta3.FractionalPayment' as const, + $type: "akash.escrow.v1beta3.FractionalPayment" as const, - encode( - message: FractionalPayment, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: FractionalPayment, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.accountId !== undefined) { AccountID.encode(message.accountId, writer.uint32(10).fork()).ldelim(); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { writer.uint32(18).string(message.paymentId); } - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(26).string(message.owner); } if (message.state !== 0) { @@ -489,8 +465,7 @@ export const FractionalPayment = { }, decode(input: _m0.Reader | Uint8Array, length?: number): FractionalPayment { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFractionalPayment(); while (reader.pos < end) { @@ -557,23 +532,13 @@ export const FractionalPayment = { fromJSON(object: any): FractionalPayment { return { $type: FractionalPayment.$type, - accountId: isSet(object.accountId) - ? AccountID.fromJSON(object.accountId) - : undefined, - paymentId: isSet(object.paymentId) - ? globalThis.String(object.paymentId) - : '', - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - state: isSet(object.state) - ? fractionalPayment_StateFromJSON(object.state) - : 0, + accountId: isSet(object.accountId) ? AccountID.fromJSON(object.accountId) : undefined, + paymentId: isSet(object.paymentId) ? globalThis.String(object.paymentId) : "", + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + state: isSet(object.state) ? fractionalPayment_StateFromJSON(object.state) : 0, rate: isSet(object.rate) ? DecCoin.fromJSON(object.rate) : undefined, - balance: isSet(object.balance) - ? DecCoin.fromJSON(object.balance) - : undefined, - withdrawn: isSet(object.withdrawn) - ? Coin.fromJSON(object.withdrawn) - : undefined, + balance: isSet(object.balance) ? DecCoin.fromJSON(object.balance) : undefined, + withdrawn: isSet(object.withdrawn) ? Coin.fromJSON(object.withdrawn) : undefined, }; }, @@ -582,10 +547,10 @@ export const FractionalPayment = { if (message.accountId !== undefined) { obj.accountId = AccountID.toJSON(message.accountId); } - if (message.paymentId !== '') { + if (message.paymentId !== "") { obj.paymentId = message.paymentId; } - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (message.state !== 0) { @@ -608,51 +573,32 @@ export const FractionalPayment = { }, fromPartial(object: DeepPartial): FractionalPayment { const message = createBaseFractionalPayment(); - message.accountId = - object.accountId !== undefined && object.accountId !== null - ? AccountID.fromPartial(object.accountId) - : undefined; - message.paymentId = object.paymentId ?? ''; - message.owner = object.owner ?? ''; + message.accountId = (object.accountId !== undefined && object.accountId !== null) + ? AccountID.fromPartial(object.accountId) + : undefined; + message.paymentId = object.paymentId ?? ""; + message.owner = object.owner ?? ""; message.state = object.state ?? 0; - message.rate = - object.rate !== undefined && object.rate !== null - ? DecCoin.fromPartial(object.rate) - : undefined; - message.balance = - object.balance !== undefined && object.balance !== null - ? DecCoin.fromPartial(object.balance) - : undefined; - message.withdrawn = - object.withdrawn !== undefined && object.withdrawn !== null - ? Coin.fromPartial(object.withdrawn) - : undefined; + message.rate = (object.rate !== undefined && object.rate !== null) ? DecCoin.fromPartial(object.rate) : undefined; + message.balance = (object.balance !== undefined && object.balance !== null) + ? DecCoin.fromPartial(object.balance) + : undefined; + message.withdrawn = (object.withdrawn !== undefined && object.withdrawn !== null) + ? Coin.fromPartial(object.withdrawn) + : undefined; return message; }, }; messageTypeRegistry.set(FractionalPayment.$type, FractionalPayment); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/gov/v1beta3/genesis.ts b/ts/src/generated/akash/gov/v1beta3/genesis.ts index 47d7ff85..affb38a8 100644 --- a/ts/src/generated/akash/gov/v1beta3/genesis.ts +++ b/ts/src/generated/akash/gov/v1beta3/genesis.ts @@ -1,38 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { DepositParams } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { DepositParams } from "./params"; /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.gov.v1beta3.GenesisState'; + $type: "akash.gov.v1beta3.GenesisState"; depositParams: DepositParams | undefined; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.gov.v1beta3.GenesisState', depositParams: undefined }; + return { $type: "akash.gov.v1beta3.GenesisState", depositParams: undefined }; } export const GenesisState = { - $type: 'akash.gov.v1beta3.GenesisState' as const, + $type: "akash.gov.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.depositParams !== undefined) { - DepositParams.encode( - message.depositParams, - writer.uint32(10).fork(), - ).ldelim(); + DepositParams.encode(message.depositParams, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -57,9 +50,7 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - depositParams: isSet(object.depositParams) - ? DepositParams.fromJSON(object.depositParams) - : undefined, + depositParams: isSet(object.depositParams) ? DepositParams.fromJSON(object.depositParams) : undefined, }; }, @@ -76,36 +67,22 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.depositParams = - object.depositParams !== undefined && object.depositParams !== null - ? DepositParams.fromPartial(object.depositParams) - : undefined; + message.depositParams = (object.depositParams !== undefined && object.depositParams !== null) + ? DepositParams.fromPartial(object.depositParams) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/gov/v1beta3/params.ts b/ts/src/generated/akash/gov/v1beta3/params.ts index bce65bc4..c6c0f935 100644 --- a/ts/src/generated/akash/gov/v1beta3/params.ts +++ b/ts/src/generated/akash/gov/v1beta3/params.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** DepositParams defines the parameters for the x/gov module */ export interface DepositParams { - $type: 'akash.gov.v1beta3.DepositParams'; + $type: "akash.gov.v1beta3.DepositParams"; /** * min_initial_deposit_rate minimum % of TotalDeposit * author of the proposal must put in order for proposal tx to be committed @@ -14,19 +14,13 @@ export interface DepositParams { } function createBaseDepositParams(): DepositParams { - return { - $type: 'akash.gov.v1beta3.DepositParams', - minInitialDepositRate: new Uint8Array(0), - }; + return { $type: "akash.gov.v1beta3.DepositParams", minInitialDepositRate: new Uint8Array(0) }; } export const DepositParams = { - $type: 'akash.gov.v1beta3.DepositParams' as const, + $type: "akash.gov.v1beta3.DepositParams" as const, - encode( - message: DepositParams, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DepositParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.minInitialDepositRate.length !== 0) { writer.uint32(10).bytes(message.minInitialDepositRate); } @@ -34,8 +28,7 @@ export const DepositParams = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DepositParams { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDepositParams(); while (reader.pos < end) { @@ -69,9 +62,7 @@ export const DepositParams = { toJSON(message: DepositParams): unknown { const obj: any = {}; if (message.minInitialDepositRate.length !== 0) { - obj.minInitialDepositRate = base64FromBytes( - message.minInitialDepositRate, - ); + obj.minInitialDepositRate = base64FromBytes(message.minInitialDepositRate); } return obj; }, @@ -81,8 +72,7 @@ export const DepositParams = { }, fromPartial(object: DeepPartial): DepositParams { const message = createBaseDepositParams(); - message.minInitialDepositRate = - object.minInitialDepositRate ?? new Uint8Array(0); + message.minInitialDepositRate = object.minInitialDepositRate ?? new Uint8Array(0); return message; }, }; @@ -91,7 +81,7 @@ messageTypeRegistry.set(DepositParams.$type, DepositParams); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -104,36 +94,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inflation/v1beta2/genesis.ts b/ts/src/generated/akash/inflation/v1beta2/genesis.ts index 05db8917..5bba7afe 100644 --- a/ts/src/generated/akash/inflation/v1beta2/genesis.ts +++ b/ts/src/generated/akash/inflation/v1beta2/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Params } from "./params"; /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.inflation.v1beta2.GenesisState'; + $type: "akash.inflation.v1beta2.GenesisState"; params: Params | undefined; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.inflation.v1beta2.GenesisState', params: undefined }; + return { $type: "akash.inflation.v1beta2.GenesisState", params: undefined }; } export const GenesisState = { - $type: 'akash.inflation.v1beta2.GenesisState' as const, + $type: "akash.inflation.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -52,10 +48,7 @@ export const GenesisState = { }, fromJSON(object: any): GenesisState { - return { - $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - }; + return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { @@ -71,36 +64,22 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inflation/v1beta2/params.ts b/ts/src/generated/akash/inflation/v1beta2/params.ts index ac2ca087..8f7f89d6 100644 --- a/ts/src/generated/akash/inflation/v1beta2/params.ts +++ b/ts/src/generated/akash/inflation/v1beta2/params.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params defines the parameters for the x/deployment package */ export interface Params { - $type: 'akash.inflation.v1beta2.Params'; + $type: "akash.inflation.v1beta2.Params"; /** InflationDecayFactor is the number of years it takes inflation to halve. */ inflationDecayFactor: string; /** @@ -21,36 +21,27 @@ export interface Params { } function createBaseParams(): Params { - return { - $type: 'akash.inflation.v1beta2.Params', - inflationDecayFactor: '', - initialInflation: '', - variance: '', - }; + return { $type: "akash.inflation.v1beta2.Params", inflationDecayFactor: "", initialInflation: "", variance: "" }; } export const Params = { - $type: 'akash.inflation.v1beta2.Params' as const, + $type: "akash.inflation.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.inflationDecayFactor !== '') { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.inflationDecayFactor !== "") { writer.uint32(10).string(message.inflationDecayFactor); } - if (message.initialInflation !== '') { + if (message.initialInflation !== "") { writer.uint32(18).string(message.initialInflation); } - if (message.variance !== '') { + if (message.variance !== "") { writer.uint32(26).string(message.variance); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -89,27 +80,21 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - inflationDecayFactor: isSet(object.inflationDecayFactor) - ? globalThis.String(object.inflationDecayFactor) - : '', - initialInflation: isSet(object.initialInflation) - ? globalThis.String(object.initialInflation) - : '', - variance: isSet(object.variance) - ? globalThis.String(object.variance) - : '', + inflationDecayFactor: isSet(object.inflationDecayFactor) ? globalThis.String(object.inflationDecayFactor) : "", + initialInflation: isSet(object.initialInflation) ? globalThis.String(object.initialInflation) : "", + variance: isSet(object.variance) ? globalThis.String(object.variance) : "", }; }, toJSON(message: Params): unknown { const obj: any = {}; - if (message.inflationDecayFactor !== '') { + if (message.inflationDecayFactor !== "") { obj.inflationDecayFactor = message.inflationDecayFactor; } - if (message.initialInflation !== '') { + if (message.initialInflation !== "") { obj.initialInflation = message.initialInflation; } - if (message.variance !== '') { + if (message.variance !== "") { obj.variance = message.variance; } return obj; @@ -120,35 +105,22 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.inflationDecayFactor = object.inflationDecayFactor ?? ''; - message.initialInflation = object.initialInflation ?? ''; - message.variance = object.variance ?? ''; + message.inflationDecayFactor = object.inflationDecayFactor ?? ""; + message.initialInflation = object.initialInflation ?? ""; + message.variance = object.variance ?? ""; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inflation/v1beta3/genesis.ts b/ts/src/generated/akash/inflation/v1beta3/genesis.ts index 46c73c62..810f322f 100644 --- a/ts/src/generated/akash/inflation/v1beta3/genesis.ts +++ b/ts/src/generated/akash/inflation/v1beta3/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Params } from "./params"; /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.inflation.v1beta3.GenesisState'; + $type: "akash.inflation.v1beta3.GenesisState"; params: Params | undefined; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.inflation.v1beta3.GenesisState', params: undefined }; + return { $type: "akash.inflation.v1beta3.GenesisState", params: undefined }; } export const GenesisState = { - $type: 'akash.inflation.v1beta3.GenesisState' as const, + $type: "akash.inflation.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -52,10 +48,7 @@ export const GenesisState = { }, fromJSON(object: any): GenesisState { - return { - $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - }; + return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { @@ -71,36 +64,22 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inflation/v1beta3/params.ts b/ts/src/generated/akash/inflation/v1beta3/params.ts index 1ad7b606..469cf104 100644 --- a/ts/src/generated/akash/inflation/v1beta3/params.ts +++ b/ts/src/generated/akash/inflation/v1beta3/params.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params defines the parameters for the x/deployment package */ export interface Params { - $type: 'akash.inflation.v1beta3.Params'; + $type: "akash.inflation.v1beta3.Params"; /** InflationDecayFactor is the number of years it takes inflation to halve. */ inflationDecayFactor: string; /** @@ -21,36 +21,27 @@ export interface Params { } function createBaseParams(): Params { - return { - $type: 'akash.inflation.v1beta3.Params', - inflationDecayFactor: '', - initialInflation: '', - variance: '', - }; + return { $type: "akash.inflation.v1beta3.Params", inflationDecayFactor: "", initialInflation: "", variance: "" }; } export const Params = { - $type: 'akash.inflation.v1beta3.Params' as const, + $type: "akash.inflation.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.inflationDecayFactor !== '') { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.inflationDecayFactor !== "") { writer.uint32(10).string(message.inflationDecayFactor); } - if (message.initialInflation !== '') { + if (message.initialInflation !== "") { writer.uint32(18).string(message.initialInflation); } - if (message.variance !== '') { + if (message.variance !== "") { writer.uint32(26).string(message.variance); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -89,27 +80,21 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - inflationDecayFactor: isSet(object.inflationDecayFactor) - ? globalThis.String(object.inflationDecayFactor) - : '', - initialInflation: isSet(object.initialInflation) - ? globalThis.String(object.initialInflation) - : '', - variance: isSet(object.variance) - ? globalThis.String(object.variance) - : '', + inflationDecayFactor: isSet(object.inflationDecayFactor) ? globalThis.String(object.inflationDecayFactor) : "", + initialInflation: isSet(object.initialInflation) ? globalThis.String(object.initialInflation) : "", + variance: isSet(object.variance) ? globalThis.String(object.variance) : "", }; }, toJSON(message: Params): unknown { const obj: any = {}; - if (message.inflationDecayFactor !== '') { + if (message.inflationDecayFactor !== "") { obj.inflationDecayFactor = message.inflationDecayFactor; } - if (message.initialInflation !== '') { + if (message.initialInflation !== "") { obj.initialInflation = message.initialInflation; } - if (message.variance !== '') { + if (message.variance !== "") { obj.variance = message.variance; } return obj; @@ -120,35 +105,22 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.inflationDecayFactor = object.inflationDecayFactor ?? ''; - message.initialInflation = object.initialInflation ?? ''; - message.variance = object.variance ?? ''; + message.inflationDecayFactor = object.inflationDecayFactor ?? ""; + message.initialInflation = object.initialInflation ?? ""; + message.variance = object.variance ?? ""; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/cluster.ts b/ts/src/generated/akash/inventory/v1/cluster.ts index 339e454f..20875603 100644 --- a/ts/src/generated/akash/inventory/v1/cluster.ts +++ b/ts/src/generated/akash/inventory/v1/cluster.ts @@ -1,28 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Node } from './node'; -import { Storage } from './storage'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Node } from "./node"; +import { Storage } from "./storage"; /** Cluster reports inventory across entire cluster */ export interface Cluster { - $type: 'akash.inventory.v1.Cluster'; + $type: "akash.inventory.v1.Cluster"; nodes: Node[]; storage: Storage[]; } function createBaseCluster(): Cluster { - return { $type: 'akash.inventory.v1.Cluster', nodes: [], storage: [] }; + return { $type: "akash.inventory.v1.Cluster", nodes: [], storage: [] }; } export const Cluster = { - $type: 'akash.inventory.v1.Cluster' as const, + $type: "akash.inventory.v1.Cluster" as const, - encode( - message: Cluster, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Cluster, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.nodes) { Node.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -33,8 +30,7 @@ export const Cluster = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Cluster { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCluster(); while (reader.pos < end) { @@ -66,12 +62,8 @@ export const Cluster = { fromJSON(object: any): Cluster { return { $type: Cluster.$type, - nodes: globalThis.Array.isArray(object?.nodes) - ? object.nodes.map((e: any) => Node.fromJSON(e)) - : [], - storage: globalThis.Array.isArray(object?.storage) - ? object.storage.map((e: any) => Storage.fromJSON(e)) - : [], + nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => Node.fromJSON(e)) : [], + storage: globalThis.Array.isArray(object?.storage) ? object.storage.map((e: any) => Storage.fromJSON(e)) : [], }; }, @@ -99,26 +91,13 @@ export const Cluster = { messageTypeRegistry.set(Cluster.$type, Cluster); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/cpu.ts b/ts/src/generated/akash/inventory/v1/cpu.ts index b205382b..e2293337 100644 --- a/ts/src/generated/akash/inventory/v1/cpu.ts +++ b/ts/src/generated/akash/inventory/v1/cpu.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourcePair } from './resourcepair'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourcePair } from "./resourcepair"; /** CPUInfo reports CPU details */ export interface CPUInfo { - $type: 'akash.inventory.v1.CPUInfo'; + $type: "akash.inventory.v1.CPUInfo"; id: string; vendor: string; model: string; @@ -15,35 +15,26 @@ export interface CPUInfo { /** CPU reports CPU inventory details */ export interface CPU { - $type: 'akash.inventory.v1.CPU'; + $type: "akash.inventory.v1.CPU"; quantity: ResourcePair | undefined; info: CPUInfo[]; } function createBaseCPUInfo(): CPUInfo { - return { - $type: 'akash.inventory.v1.CPUInfo', - id: '', - vendor: '', - model: '', - vcores: 0, - }; + return { $type: "akash.inventory.v1.CPUInfo", id: "", vendor: "", model: "", vcores: 0 }; } export const CPUInfo = { - $type: 'akash.inventory.v1.CPUInfo' as const, + $type: "akash.inventory.v1.CPUInfo" as const, - encode( - message: CPUInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.id !== '') { + encode(message: CPUInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.id !== "") { writer.uint32(10).string(message.id); } - if (message.vendor !== '') { + if (message.vendor !== "") { writer.uint32(18).string(message.vendor); } - if (message.model !== '') { + if (message.model !== "") { writer.uint32(26).string(message.model); } if (message.vcores !== 0) { @@ -53,8 +44,7 @@ export const CPUInfo = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CPUInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCPUInfo(); while (reader.pos < end) { @@ -100,22 +90,22 @@ export const CPUInfo = { fromJSON(object: any): CPUInfo { return { $type: CPUInfo.$type, - id: isSet(object.id) ? globalThis.String(object.id) : '', - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : '', - model: isSet(object.model) ? globalThis.String(object.model) : '', + id: isSet(object.id) ? globalThis.String(object.id) : "", + vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", + model: isSet(object.model) ? globalThis.String(object.model) : "", vcores: isSet(object.vcores) ? globalThis.Number(object.vcores) : 0, }; }, toJSON(message: CPUInfo): unknown { const obj: any = {}; - if (message.id !== '') { + if (message.id !== "") { obj.id = message.id; } - if (message.vendor !== '') { + if (message.vendor !== "") { obj.vendor = message.vendor; } - if (message.model !== '') { + if (message.model !== "") { obj.model = message.model; } if (message.vcores !== 0) { @@ -129,9 +119,9 @@ export const CPUInfo = { }, fromPartial(object: DeepPartial): CPUInfo { const message = createBaseCPUInfo(); - message.id = object.id ?? ''; - message.vendor = object.vendor ?? ''; - message.model = object.model ?? ''; + message.id = object.id ?? ""; + message.vendor = object.vendor ?? ""; + message.model = object.model ?? ""; message.vcores = object.vcores ?? 0; return message; }, @@ -140,11 +130,11 @@ export const CPUInfo = { messageTypeRegistry.set(CPUInfo.$type, CPUInfo); function createBaseCPU(): CPU { - return { $type: 'akash.inventory.v1.CPU', quantity: undefined, info: [] }; + return { $type: "akash.inventory.v1.CPU", quantity: undefined, info: [] }; } export const CPU = { - $type: 'akash.inventory.v1.CPU' as const, + $type: "akash.inventory.v1.CPU" as const, encode(message: CPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { @@ -157,8 +147,7 @@ export const CPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): CPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCPU(); while (reader.pos < end) { @@ -190,12 +179,8 @@ export const CPU = { fromJSON(object: any): CPU { return { $type: CPU.$type, - quantity: isSet(object.quantity) - ? ResourcePair.fromJSON(object.quantity) - : undefined, - info: globalThis.Array.isArray(object?.info) - ? object.info.map((e: any) => CPUInfo.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourcePair.fromJSON(object.quantity) : undefined, + info: globalThis.Array.isArray(object?.info) ? object.info.map((e: any) => CPUInfo.fromJSON(e)) : [], }; }, @@ -215,10 +200,9 @@ export const CPU = { }, fromPartial(object: DeepPartial): CPU { const message = createBaseCPU(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourcePair.fromPartial(object.quantity) - : undefined; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourcePair.fromPartial(object.quantity) + : undefined; message.info = object.info?.map((e) => CPUInfo.fromPartial(e)) || []; return message; }, @@ -226,26 +210,13 @@ export const CPU = { messageTypeRegistry.set(CPU.$type, CPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/gpu.ts b/ts/src/generated/akash/inventory/v1/gpu.ts index dd5114dc..55af1cfe 100644 --- a/ts/src/generated/akash/inventory/v1/gpu.ts +++ b/ts/src/generated/akash/inventory/v1/gpu.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourcePair } from './resourcepair'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourcePair } from "./resourcepair"; /** GPUInfo reports GPU details */ export interface GPUInfo { - $type: 'akash.inventory.v1.GPUInfo'; + $type: "akash.inventory.v1.GPUInfo"; vendor: string; vendorId: string; name: string; @@ -17,54 +17,50 @@ export interface GPUInfo { /** GPUInfo reports GPU inventory details */ export interface GPU { - $type: 'akash.inventory.v1.GPU'; + $type: "akash.inventory.v1.GPU"; quantity: ResourcePair | undefined; info: GPUInfo[]; } function createBaseGPUInfo(): GPUInfo { return { - $type: 'akash.inventory.v1.GPUInfo', - vendor: '', - vendorId: '', - name: '', - modelid: '', - interface: '', - memorySize: '', + $type: "akash.inventory.v1.GPUInfo", + vendor: "", + vendorId: "", + name: "", + modelid: "", + interface: "", + memorySize: "", }; } export const GPUInfo = { - $type: 'akash.inventory.v1.GPUInfo' as const, + $type: "akash.inventory.v1.GPUInfo" as const, - encode( - message: GPUInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.vendor !== '') { + encode(message: GPUInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.vendor !== "") { writer.uint32(10).string(message.vendor); } - if (message.vendorId !== '') { + if (message.vendorId !== "") { writer.uint32(18).string(message.vendorId); } - if (message.name !== '') { + if (message.name !== "") { writer.uint32(26).string(message.name); } - if (message.modelid !== '') { + if (message.modelid !== "") { writer.uint32(34).string(message.modelid); } - if (message.interface !== '') { + if (message.interface !== "") { writer.uint32(42).string(message.interface); } - if (message.memorySize !== '') { + if (message.memorySize !== "") { writer.uint32(50).string(message.memorySize); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GPUInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGPUInfo(); while (reader.pos < end) { @@ -124,39 +120,33 @@ export const GPUInfo = { fromJSON(object: any): GPUInfo { return { $type: GPUInfo.$type, - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : '', - vendorId: isSet(object.vendorId) - ? globalThis.String(object.vendorId) - : '', - name: isSet(object.name) ? globalThis.String(object.name) : '', - modelid: isSet(object.modelid) ? globalThis.String(object.modelid) : '', - interface: isSet(object.interface) - ? globalThis.String(object.interface) - : '', - memorySize: isSet(object.memorySize) - ? globalThis.String(object.memorySize) - : '', + vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", + vendorId: isSet(object.vendorId) ? globalThis.String(object.vendorId) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", + modelid: isSet(object.modelid) ? globalThis.String(object.modelid) : "", + interface: isSet(object.interface) ? globalThis.String(object.interface) : "", + memorySize: isSet(object.memorySize) ? globalThis.String(object.memorySize) : "", }; }, toJSON(message: GPUInfo): unknown { const obj: any = {}; - if (message.vendor !== '') { + if (message.vendor !== "") { obj.vendor = message.vendor; } - if (message.vendorId !== '') { + if (message.vendorId !== "") { obj.vendorId = message.vendorId; } - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } - if (message.modelid !== '') { + if (message.modelid !== "") { obj.modelid = message.modelid; } - if (message.interface !== '') { + if (message.interface !== "") { obj.interface = message.interface; } - if (message.memorySize !== '') { + if (message.memorySize !== "") { obj.memorySize = message.memorySize; } return obj; @@ -167,12 +157,12 @@ export const GPUInfo = { }, fromPartial(object: DeepPartial): GPUInfo { const message = createBaseGPUInfo(); - message.vendor = object.vendor ?? ''; - message.vendorId = object.vendorId ?? ''; - message.name = object.name ?? ''; - message.modelid = object.modelid ?? ''; - message.interface = object.interface ?? ''; - message.memorySize = object.memorySize ?? ''; + message.vendor = object.vendor ?? ""; + message.vendorId = object.vendorId ?? ""; + message.name = object.name ?? ""; + message.modelid = object.modelid ?? ""; + message.interface = object.interface ?? ""; + message.memorySize = object.memorySize ?? ""; return message; }, }; @@ -180,11 +170,11 @@ export const GPUInfo = { messageTypeRegistry.set(GPUInfo.$type, GPUInfo); function createBaseGPU(): GPU { - return { $type: 'akash.inventory.v1.GPU', quantity: undefined, info: [] }; + return { $type: "akash.inventory.v1.GPU", quantity: undefined, info: [] }; } export const GPU = { - $type: 'akash.inventory.v1.GPU' as const, + $type: "akash.inventory.v1.GPU" as const, encode(message: GPU, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { @@ -197,8 +187,7 @@ export const GPU = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GPU { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGPU(); while (reader.pos < end) { @@ -230,12 +219,8 @@ export const GPU = { fromJSON(object: any): GPU { return { $type: GPU.$type, - quantity: isSet(object.quantity) - ? ResourcePair.fromJSON(object.quantity) - : undefined, - info: globalThis.Array.isArray(object?.info) - ? object.info.map((e: any) => GPUInfo.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourcePair.fromJSON(object.quantity) : undefined, + info: globalThis.Array.isArray(object?.info) ? object.info.map((e: any) => GPUInfo.fromJSON(e)) : [], }; }, @@ -255,10 +240,9 @@ export const GPU = { }, fromPartial(object: DeepPartial): GPU { const message = createBaseGPU(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourcePair.fromPartial(object.quantity) - : undefined; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourcePair.fromPartial(object.quantity) + : undefined; message.info = object.info?.map((e) => GPUInfo.fromPartial(e)) || []; return message; }, @@ -266,26 +250,13 @@ export const GPU = { messageTypeRegistry.set(GPU.$type, GPU); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/memory.ts b/ts/src/generated/akash/inventory/v1/memory.ts index 6bfbb4da..c2fd288d 100644 --- a/ts/src/generated/akash/inventory/v1/memory.ts +++ b/ts/src/generated/akash/inventory/v1/memory.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourcePair } from './resourcepair'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourcePair } from "./resourcepair"; /** MemoryInfo reports Memory details */ export interface MemoryInfo { - $type: 'akash.inventory.v1.MemoryInfo'; + $type: "akash.inventory.v1.MemoryInfo"; vendor: string; type: string; totalSize: string; @@ -15,46 +15,36 @@ export interface MemoryInfo { /** Memory reports Memory inventory details */ export interface Memory { - $type: 'akash.inventory.v1.Memory'; + $type: "akash.inventory.v1.Memory"; quantity: ResourcePair | undefined; info: MemoryInfo[]; } function createBaseMemoryInfo(): MemoryInfo { - return { - $type: 'akash.inventory.v1.MemoryInfo', - vendor: '', - type: '', - totalSize: '', - speed: '', - }; + return { $type: "akash.inventory.v1.MemoryInfo", vendor: "", type: "", totalSize: "", speed: "" }; } export const MemoryInfo = { - $type: 'akash.inventory.v1.MemoryInfo' as const, + $type: "akash.inventory.v1.MemoryInfo" as const, - encode( - message: MemoryInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.vendor !== '') { + encode(message: MemoryInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.vendor !== "") { writer.uint32(10).string(message.vendor); } - if (message.type !== '') { + if (message.type !== "") { writer.uint32(18).string(message.type); } - if (message.totalSize !== '') { + if (message.totalSize !== "") { writer.uint32(26).string(message.totalSize); } - if (message.speed !== '') { + if (message.speed !== "") { writer.uint32(34).string(message.speed); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MemoryInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMemoryInfo(); while (reader.pos < end) { @@ -100,27 +90,25 @@ export const MemoryInfo = { fromJSON(object: any): MemoryInfo { return { $type: MemoryInfo.$type, - vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : '', - type: isSet(object.type) ? globalThis.String(object.type) : '', - totalSize: isSet(object.totalSize) - ? globalThis.String(object.totalSize) - : '', - speed: isSet(object.speed) ? globalThis.String(object.speed) : '', + vendor: isSet(object.vendor) ? globalThis.String(object.vendor) : "", + type: isSet(object.type) ? globalThis.String(object.type) : "", + totalSize: isSet(object.totalSize) ? globalThis.String(object.totalSize) : "", + speed: isSet(object.speed) ? globalThis.String(object.speed) : "", }; }, toJSON(message: MemoryInfo): unknown { const obj: any = {}; - if (message.vendor !== '') { + if (message.vendor !== "") { obj.vendor = message.vendor; } - if (message.type !== '') { + if (message.type !== "") { obj.type = message.type; } - if (message.totalSize !== '') { + if (message.totalSize !== "") { obj.totalSize = message.totalSize; } - if (message.speed !== '') { + if (message.speed !== "") { obj.speed = message.speed; } return obj; @@ -131,10 +119,10 @@ export const MemoryInfo = { }, fromPartial(object: DeepPartial): MemoryInfo { const message = createBaseMemoryInfo(); - message.vendor = object.vendor ?? ''; - message.type = object.type ?? ''; - message.totalSize = object.totalSize ?? ''; - message.speed = object.speed ?? ''; + message.vendor = object.vendor ?? ""; + message.type = object.type ?? ""; + message.totalSize = object.totalSize ?? ""; + message.speed = object.speed ?? ""; return message; }, }; @@ -142,16 +130,13 @@ export const MemoryInfo = { messageTypeRegistry.set(MemoryInfo.$type, MemoryInfo); function createBaseMemory(): Memory { - return { $type: 'akash.inventory.v1.Memory', quantity: undefined, info: [] }; + return { $type: "akash.inventory.v1.Memory", quantity: undefined, info: [] }; } export const Memory = { - $type: 'akash.inventory.v1.Memory' as const, + $type: "akash.inventory.v1.Memory" as const, - encode( - message: Memory, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Memory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourcePair.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -162,8 +147,7 @@ export const Memory = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Memory { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMemory(); while (reader.pos < end) { @@ -195,12 +179,8 @@ export const Memory = { fromJSON(object: any): Memory { return { $type: Memory.$type, - quantity: isSet(object.quantity) - ? ResourcePair.fromJSON(object.quantity) - : undefined, - info: globalThis.Array.isArray(object?.info) - ? object.info.map((e: any) => MemoryInfo.fromJSON(e)) - : [], + quantity: isSet(object.quantity) ? ResourcePair.fromJSON(object.quantity) : undefined, + info: globalThis.Array.isArray(object?.info) ? object.info.map((e: any) => MemoryInfo.fromJSON(e)) : [], }; }, @@ -220,10 +200,9 @@ export const Memory = { }, fromPartial(object: DeepPartial): Memory { const message = createBaseMemory(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourcePair.fromPartial(object.quantity) - : undefined; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourcePair.fromPartial(object.quantity) + : undefined; message.info = object.info?.map((e) => MemoryInfo.fromPartial(e)) || []; return message; }, @@ -231,26 +210,13 @@ export const Memory = { messageTypeRegistry.set(Memory.$type, Memory); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/node.ts b/ts/src/generated/akash/inventory/v1/node.ts index f0e1d99b..e38aa46f 100644 --- a/ts/src/generated/akash/inventory/v1/node.ts +++ b/ts/src/generated/akash/inventory/v1/node.ts @@ -1,34 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { NodeResources } from './resources'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { NodeResources } from "./resources"; /** NodeCapabilities extended list of node capabilities */ export interface NodeCapabilities { - $type: 'akash.inventory.v1.NodeCapabilities'; + $type: "akash.inventory.v1.NodeCapabilities"; storageClasses: string[]; } /** Node reports node inventory details */ export interface Node { - $type: 'akash.inventory.v1.Node'; + $type: "akash.inventory.v1.Node"; name: string; resources: NodeResources | undefined; capabilities: NodeCapabilities | undefined; } function createBaseNodeCapabilities(): NodeCapabilities { - return { $type: 'akash.inventory.v1.NodeCapabilities', storageClasses: [] }; + return { $type: "akash.inventory.v1.NodeCapabilities", storageClasses: [] }; } export const NodeCapabilities = { - $type: 'akash.inventory.v1.NodeCapabilities' as const, + $type: "akash.inventory.v1.NodeCapabilities" as const, - encode( - message: NodeCapabilities, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: NodeCapabilities, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.storageClasses) { writer.uint32(10).string(v!); } @@ -36,8 +33,7 @@ export const NodeCapabilities = { }, decode(input: _m0.Reader | Uint8Array, length?: number): NodeCapabilities { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNodeCapabilities(); while (reader.pos < end) { @@ -89,39 +85,27 @@ export const NodeCapabilities = { messageTypeRegistry.set(NodeCapabilities.$type, NodeCapabilities); function createBaseNode(): Node { - return { - $type: 'akash.inventory.v1.Node', - name: '', - resources: undefined, - capabilities: undefined, - }; + return { $type: "akash.inventory.v1.Node", name: "", resources: undefined, capabilities: undefined }; } export const Node = { - $type: 'akash.inventory.v1.Node' as const, + $type: "akash.inventory.v1.Node" as const, encode(message: Node, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== '') { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.resources !== undefined) { - NodeResources.encode( - message.resources, - writer.uint32(18).fork(), - ).ldelim(); + NodeResources.encode(message.resources, writer.uint32(18).fork()).ldelim(); } if (message.capabilities !== undefined) { - NodeCapabilities.encode( - message.capabilities, - writer.uint32(26).fork(), - ).ldelim(); + NodeCapabilities.encode(message.capabilities, writer.uint32(26).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Node { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNode(); while (reader.pos < end) { @@ -146,10 +130,7 @@ export const Node = { break; } - message.capabilities = NodeCapabilities.decode( - reader, - reader.uint32(), - ); + message.capabilities = NodeCapabilities.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -163,19 +144,15 @@ export const Node = { fromJSON(object: any): Node { return { $type: Node.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - resources: isSet(object.resources) - ? NodeResources.fromJSON(object.resources) - : undefined, - capabilities: isSet(object.capabilities) - ? NodeCapabilities.fromJSON(object.capabilities) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + resources: isSet(object.resources) ? NodeResources.fromJSON(object.resources) : undefined, + capabilities: isSet(object.capabilities) ? NodeCapabilities.fromJSON(object.capabilities) : undefined, }; }, toJSON(message: Node): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.resources !== undefined) { @@ -192,41 +169,26 @@ export const Node = { }, fromPartial(object: DeepPartial): Node { const message = createBaseNode(); - message.name = object.name ?? ''; - message.resources = - object.resources !== undefined && object.resources !== null - ? NodeResources.fromPartial(object.resources) - : undefined; - message.capabilities = - object.capabilities !== undefined && object.capabilities !== null - ? NodeCapabilities.fromPartial(object.capabilities) - : undefined; + message.name = object.name ?? ""; + message.resources = (object.resources !== undefined && object.resources !== null) + ? NodeResources.fromPartial(object.resources) + : undefined; + message.capabilities = (object.capabilities !== undefined && object.capabilities !== null) + ? NodeCapabilities.fromPartial(object.capabilities) + : undefined; return message; }, }; messageTypeRegistry.set(Node.$type, Node); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/resourcepair.ts b/ts/src/generated/akash/inventory/v1/resourcepair.ts index a41f85d7..1a9957cf 100644 --- a/ts/src/generated/akash/inventory/v1/resourcepair.ts +++ b/ts/src/generated/akash/inventory/v1/resourcepair.ts @@ -1,34 +1,26 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Quantity } from '../../../k8s.io/apimachinery/pkg/api/resource/generated'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta3/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Quantity } from "../../../k8s.io/apimachinery/pkg/api/resource/generated"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta3/attribute"; /** ResourcePair to extents resource.Quantity to provide total and available units of the resource */ export interface ResourcePair { - $type: 'akash.inventory.v1.ResourcePair'; + $type: "akash.inventory.v1.ResourcePair"; allocatable: Quantity | undefined; allocated: Quantity | undefined; attributes: Attribute[]; } function createBaseResourcePair(): ResourcePair { - return { - $type: 'akash.inventory.v1.ResourcePair', - allocatable: undefined, - allocated: undefined, - attributes: [], - }; + return { $type: "akash.inventory.v1.ResourcePair", allocatable: undefined, allocated: undefined, attributes: [] }; } export const ResourcePair = { - $type: 'akash.inventory.v1.ResourcePair' as const, + $type: "akash.inventory.v1.ResourcePair" as const, - encode( - message: ResourcePair, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourcePair, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.allocatable !== undefined) { Quantity.encode(message.allocatable, writer.uint32(10).fork()).ldelim(); } @@ -42,8 +34,7 @@ export const ResourcePair = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourcePair { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourcePair(); while (reader.pos < end) { @@ -82,12 +73,8 @@ export const ResourcePair = { fromJSON(object: any): ResourcePair { return { $type: ResourcePair.$type, - allocatable: isSet(object.allocatable) - ? Quantity.fromJSON(object.allocatable) - : undefined, - allocated: isSet(object.allocated) - ? Quantity.fromJSON(object.allocated) - : undefined, + allocatable: isSet(object.allocatable) ? Quantity.fromJSON(object.allocatable) : undefined, + allocated: isSet(object.allocated) ? Quantity.fromJSON(object.allocated) : undefined, attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -113,42 +100,26 @@ export const ResourcePair = { }, fromPartial(object: DeepPartial): ResourcePair { const message = createBaseResourcePair(); - message.allocatable = - object.allocatable !== undefined && object.allocatable !== null - ? Quantity.fromPartial(object.allocatable) - : undefined; - message.allocated = - object.allocated !== undefined && object.allocated !== null - ? Quantity.fromPartial(object.allocated) - : undefined; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.allocatable = (object.allocatable !== undefined && object.allocatable !== null) + ? Quantity.fromPartial(object.allocatable) + : undefined; + message.allocated = (object.allocated !== undefined && object.allocated !== null) + ? Quantity.fromPartial(object.allocated) + : undefined; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(ResourcePair.$type, ResourcePair); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/resources.ts b/ts/src/generated/akash/inventory/v1/resources.ts index 23721c56..b3342602 100644 --- a/ts/src/generated/akash/inventory/v1/resources.ts +++ b/ts/src/generated/akash/inventory/v1/resources.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { CPU } from './cpu'; -import { GPU } from './gpu'; -import { Memory } from './memory'; -import { ResourcePair } from './resourcepair'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { CPU } from "./cpu"; +import { GPU } from "./gpu"; +import { Memory } from "./memory"; +import { ResourcePair } from "./resourcepair"; /** NodeResources reports node inventory details */ export interface NodeResources { - $type: 'akash.inventory.v1.NodeResources'; + $type: "akash.inventory.v1.NodeResources"; cpu: CPU | undefined; memory: Memory | undefined; gpu: GPU | undefined; @@ -20,7 +20,7 @@ export interface NodeResources { function createBaseNodeResources(): NodeResources { return { - $type: 'akash.inventory.v1.NodeResources', + $type: "akash.inventory.v1.NodeResources", cpu: undefined, memory: undefined, gpu: undefined, @@ -31,12 +31,9 @@ function createBaseNodeResources(): NodeResources { } export const NodeResources = { - $type: 'akash.inventory.v1.NodeResources' as const, + $type: "akash.inventory.v1.NodeResources" as const, - encode( - message: NodeResources, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: NodeResources, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { CPU.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -47,29 +44,19 @@ export const NodeResources = { GPU.encode(message.gpu, writer.uint32(26).fork()).ldelim(); } if (message.ephemeralStorage !== undefined) { - ResourcePair.encode( - message.ephemeralStorage, - writer.uint32(34).fork(), - ).ldelim(); + ResourcePair.encode(message.ephemeralStorage, writer.uint32(34).fork()).ldelim(); } if (message.volumesAttached !== undefined) { - ResourcePair.encode( - message.volumesAttached, - writer.uint32(42).fork(), - ).ldelim(); + ResourcePair.encode(message.volumesAttached, writer.uint32(42).fork()).ldelim(); } if (message.volumesMounted !== undefined) { - ResourcePair.encode( - message.volumesMounted, - writer.uint32(50).fork(), - ).ldelim(); + ResourcePair.encode(message.volumesMounted, writer.uint32(50).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): NodeResources { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseNodeResources(); while (reader.pos < end) { @@ -101,20 +88,14 @@ export const NodeResources = { break; } - message.ephemeralStorage = ResourcePair.decode( - reader, - reader.uint32(), - ); + message.ephemeralStorage = ResourcePair.decode(reader, reader.uint32()); continue; case 5: if (tag !== 42) { break; } - message.volumesAttached = ResourcePair.decode( - reader, - reader.uint32(), - ); + message.volumesAttached = ResourcePair.decode(reader, reader.uint32()); continue; case 6: if (tag !== 50) { @@ -138,15 +119,9 @@ export const NodeResources = { cpu: isSet(object.cpu) ? CPU.fromJSON(object.cpu) : undefined, memory: isSet(object.memory) ? Memory.fromJSON(object.memory) : undefined, gpu: isSet(object.gpu) ? GPU.fromJSON(object.gpu) : undefined, - ephemeralStorage: isSet(object.ephemeralStorage) - ? ResourcePair.fromJSON(object.ephemeralStorage) - : undefined, - volumesAttached: isSet(object.volumesAttached) - ? ResourcePair.fromJSON(object.volumesAttached) - : undefined, - volumesMounted: isSet(object.volumesMounted) - ? ResourcePair.fromJSON(object.volumesMounted) - : undefined, + ephemeralStorage: isSet(object.ephemeralStorage) ? ResourcePair.fromJSON(object.ephemeralStorage) : undefined, + volumesAttached: isSet(object.volumesAttached) ? ResourcePair.fromJSON(object.volumesAttached) : undefined, + volumesMounted: isSet(object.volumesMounted) ? ResourcePair.fromJSON(object.volumesMounted) : undefined, }; }, @@ -178,56 +153,33 @@ export const NodeResources = { }, fromPartial(object: DeepPartial): NodeResources { const message = createBaseNodeResources(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? CPU.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Memory.fromPartial(object.memory) - : undefined; - message.gpu = - object.gpu !== undefined && object.gpu !== null - ? GPU.fromPartial(object.gpu) - : undefined; - message.ephemeralStorage = - object.ephemeralStorage !== undefined && object.ephemeralStorage !== null - ? ResourcePair.fromPartial(object.ephemeralStorage) - : undefined; - message.volumesAttached = - object.volumesAttached !== undefined && object.volumesAttached !== null - ? ResourcePair.fromPartial(object.volumesAttached) - : undefined; - message.volumesMounted = - object.volumesMounted !== undefined && object.volumesMounted !== null - ? ResourcePair.fromPartial(object.volumesMounted) - : undefined; + message.cpu = (object.cpu !== undefined && object.cpu !== null) ? CPU.fromPartial(object.cpu) : undefined; + message.memory = (object.memory !== undefined && object.memory !== null) + ? Memory.fromPartial(object.memory) + : undefined; + message.gpu = (object.gpu !== undefined && object.gpu !== null) ? GPU.fromPartial(object.gpu) : undefined; + message.ephemeralStorage = (object.ephemeralStorage !== undefined && object.ephemeralStorage !== null) + ? ResourcePair.fromPartial(object.ephemeralStorage) + : undefined; + message.volumesAttached = (object.volumesAttached !== undefined && object.volumesAttached !== null) + ? ResourcePair.fromPartial(object.volumesAttached) + : undefined; + message.volumesMounted = (object.volumesMounted !== undefined && object.volumesMounted !== null) + ? ResourcePair.fromPartial(object.volumesMounted) + : undefined; return message; }, }; messageTypeRegistry.set(NodeResources.$type, NodeResources); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/inventory/v1/service.ts b/ts/src/generated/akash/inventory/v1/service.ts index 2ddc066b..cd0cdf6a 100644 --- a/ts/src/generated/akash/inventory/v1/service.ts +++ b/ts/src/generated/akash/inventory/v1/service.ts @@ -1,10 +1,10 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { Empty } from '../../../google/protobuf/empty'; -import { Cluster } from './cluster'; -import { Node } from './node'; +import _m0 from "protobufjs/minimal"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { Empty } from "../../../google/protobuf/empty"; +import { Cluster } from "./cluster"; +import { Node } from "./node"; /** NodeRPC defines the RPC server of node */ export interface NodeRPC { @@ -22,7 +22,7 @@ export interface NodeRPC { StreamNode(request: Empty): Observable; } -export const NodeRPCServiceName = 'akash.inventory.v1.NodeRPC'; +export const NodeRPCServiceName = "akash.inventory.v1.NodeRPC"; export class NodeRPCClientImpl implements NodeRPC { private readonly rpc: Rpc; private readonly service: string; @@ -34,17 +34,13 @@ export class NodeRPCClientImpl implements NodeRPC { } QueryNode(request: Empty): Promise { const data = Empty.encode(request).finish(); - const promise = this.rpc.request(this.service, 'QueryNode', data); + const promise = this.rpc.request(this.service, "QueryNode", data); return promise.then((data) => Node.decode(_m0.Reader.create(data))); } StreamNode(request: Empty): Observable { const data = Empty.encode(request).finish(); - const result = this.rpc.serverStreamingRequest( - this.service, - 'StreamNode', - data, - ); + const result = this.rpc.serverStreamingRequest(this.service, "StreamNode", data); return result.pipe(map((data) => Node.decode(_m0.Reader.create(data)))); } } @@ -65,7 +61,7 @@ export interface ClusterRPC { StreamCluster(request: Empty): Observable; } -export const ClusterRPCServiceName = 'akash.inventory.v1.ClusterRPC'; +export const ClusterRPCServiceName = "akash.inventory.v1.ClusterRPC"; export class ClusterRPCClientImpl implements ClusterRPC { private readonly rpc: Rpc; private readonly service: string; @@ -77,40 +73,20 @@ export class ClusterRPCClientImpl implements ClusterRPC { } QueryCluster(request: Empty): Promise { const data = Empty.encode(request).finish(); - const promise = this.rpc.request(this.service, 'QueryCluster', data); + const promise = this.rpc.request(this.service, "QueryCluster", data); return promise.then((data) => Cluster.decode(_m0.Reader.create(data))); } StreamCluster(request: Empty): Observable { const data = Empty.encode(request).finish(); - const result = this.rpc.serverStreamingRequest( - this.service, - 'StreamCluster', - data, - ); + const result = this.rpc.serverStreamingRequest(this.service, "StreamCluster", data); return result.pipe(map((data) => Cluster.decode(_m0.Reader.create(data)))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; - clientStreamingRequest( - service: string, - method: string, - data: Observable, - ): Promise; - serverStreamingRequest( - service: string, - method: string, - data: Uint8Array, - ): Observable; - bidirectionalStreamingRequest( - service: string, - method: string, - data: Observable, - ): Observable; + request(service: string, method: string, data: Uint8Array): Promise; + clientStreamingRequest(service: string, method: string, data: Observable): Promise; + serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; + bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; } diff --git a/ts/src/generated/akash/inventory/v1/storage.ts b/ts/src/generated/akash/inventory/v1/storage.ts index e109e9b5..29cef67e 100644 --- a/ts/src/generated/akash/inventory/v1/storage.ts +++ b/ts/src/generated/akash/inventory/v1/storage.ts @@ -1,46 +1,42 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourcePair } from './resourcepair'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourcePair } from "./resourcepair"; /** StorageInfo reports Storage details */ export interface StorageInfo { - $type: 'akash.inventory.v1.StorageInfo'; + $type: "akash.inventory.v1.StorageInfo"; class: string; iops: string; } /** Storage reports Storage inventory details */ export interface Storage { - $type: 'akash.inventory.v1.Storage'; + $type: "akash.inventory.v1.Storage"; quantity: ResourcePair | undefined; info: StorageInfo | undefined; } function createBaseStorageInfo(): StorageInfo { - return { $type: 'akash.inventory.v1.StorageInfo', class: '', iops: '' }; + return { $type: "akash.inventory.v1.StorageInfo", class: "", iops: "" }; } export const StorageInfo = { - $type: 'akash.inventory.v1.StorageInfo' as const, + $type: "akash.inventory.v1.StorageInfo" as const, - encode( - message: StorageInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.class !== '') { + encode(message: StorageInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.class !== "") { writer.uint32(10).string(message.class); } - if (message.iops !== '') { + if (message.iops !== "") { writer.uint32(18).string(message.iops); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): StorageInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorageInfo(); while (reader.pos < end) { @@ -72,17 +68,17 @@ export const StorageInfo = { fromJSON(object: any): StorageInfo { return { $type: StorageInfo.$type, - class: isSet(object.class) ? globalThis.String(object.class) : '', - iops: isSet(object.iops) ? globalThis.String(object.iops) : '', + class: isSet(object.class) ? globalThis.String(object.class) : "", + iops: isSet(object.iops) ? globalThis.String(object.iops) : "", }; }, toJSON(message: StorageInfo): unknown { const obj: any = {}; - if (message.class !== '') { + if (message.class !== "") { obj.class = message.class; } - if (message.iops !== '') { + if (message.iops !== "") { obj.iops = message.iops; } return obj; @@ -93,8 +89,8 @@ export const StorageInfo = { }, fromPartial(object: DeepPartial): StorageInfo { const message = createBaseStorageInfo(); - message.class = object.class ?? ''; - message.iops = object.iops ?? ''; + message.class = object.class ?? ""; + message.iops = object.iops ?? ""; return message; }, }; @@ -102,20 +98,13 @@ export const StorageInfo = { messageTypeRegistry.set(StorageInfo.$type, StorageInfo); function createBaseStorage(): Storage { - return { - $type: 'akash.inventory.v1.Storage', - quantity: undefined, - info: undefined, - }; + return { $type: "akash.inventory.v1.Storage", quantity: undefined, info: undefined }; } export const Storage = { - $type: 'akash.inventory.v1.Storage' as const, + $type: "akash.inventory.v1.Storage" as const, - encode( - message: Storage, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Storage, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.quantity !== undefined) { ResourcePair.encode(message.quantity, writer.uint32(10).fork()).ldelim(); } @@ -126,8 +115,7 @@ export const Storage = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Storage { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorage(); while (reader.pos < end) { @@ -159,9 +147,7 @@ export const Storage = { fromJSON(object: any): Storage { return { $type: Storage.$type, - quantity: isSet(object.quantity) - ? ResourcePair.fromJSON(object.quantity) - : undefined, + quantity: isSet(object.quantity) ? ResourcePair.fromJSON(object.quantity) : undefined, info: isSet(object.info) ? StorageInfo.fromJSON(object.info) : undefined, }; }, @@ -182,40 +168,25 @@ export const Storage = { }, fromPartial(object: DeepPartial): Storage { const message = createBaseStorage(); - message.quantity = - object.quantity !== undefined && object.quantity !== null - ? ResourcePair.fromPartial(object.quantity) - : undefined; - message.info = - object.info !== undefined && object.info !== null - ? StorageInfo.fromPartial(object.info) - : undefined; + message.quantity = (object.quantity !== undefined && object.quantity !== null) + ? ResourcePair.fromPartial(object.quantity) + : undefined; + message.info = (object.info !== undefined && object.info !== null) + ? StorageInfo.fromPartial(object.info) + : undefined; return message; }, }; messageTypeRegistry.set(Storage.$type, Storage); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta1/group.ts b/ts/src/generated/akash/manifest/v2beta1/group.ts index 944e124e..5a1caef2 100644 --- a/ts/src/generated/akash/manifest/v2beta1/group.ts +++ b/ts/src/generated/akash/manifest/v2beta1/group.ts @@ -1,25 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Service } from './service'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Service } from "./service"; /** Group store name and list of services */ export interface Group { - $type: 'akash.manifest.v2beta1.Group'; + $type: "akash.manifest.v2beta1.Group"; name: string; services: Service[]; } function createBaseGroup(): Group { - return { $type: 'akash.manifest.v2beta1.Group', name: '', services: [] }; + return { $type: "akash.manifest.v2beta1.Group", name: "", services: [] }; } export const Group = { - $type: 'akash.manifest.v2beta1.Group' as const, + $type: "akash.manifest.v2beta1.Group" as const, encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== '') { + if (message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.services) { @@ -29,8 +29,7 @@ export const Group = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { @@ -62,16 +61,14 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - services: globalThis.Array.isArray(object?.services) - ? object.services.map((e: any) => Service.fromJSON(e)) - : [], + name: isSet(object.name) ? globalThis.String(object.name) : "", + services: globalThis.Array.isArray(object?.services) ? object.services.map((e: any) => Service.fromJSON(e)) : [], }; }, toJSON(message: Group): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.services?.length) { @@ -85,35 +82,21 @@ export const Group = { }, fromPartial(object: DeepPartial): Group { const message = createBaseGroup(); - message.name = object.name ?? ''; - message.services = - object.services?.map((e) => Service.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.services = object.services?.map((e) => Service.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta1/httpoptions.ts b/ts/src/generated/akash/manifest/v2beta1/httpoptions.ts index 12cda9ad..59887992 100644 --- a/ts/src/generated/akash/manifest/v2beta1/httpoptions.ts +++ b/ts/src/generated/akash/manifest/v2beta1/httpoptions.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** ServiceExposeHTTPOptions */ export interface ServiceExposeHTTPOptions { - $type: 'akash.manifest.v2beta1.ServiceExposeHTTPOptions'; + $type: "akash.manifest.v2beta1.ServiceExposeHTTPOptions"; maxBodySize: number; readTimeout: number; sendTimeout: number; @@ -16,7 +16,7 @@ export interface ServiceExposeHTTPOptions { function createBaseServiceExposeHTTPOptions(): ServiceExposeHTTPOptions { return { - $type: 'akash.manifest.v2beta1.ServiceExposeHTTPOptions', + $type: "akash.manifest.v2beta1.ServiceExposeHTTPOptions", maxBodySize: 0, readTimeout: 0, sendTimeout: 0, @@ -27,12 +27,9 @@ function createBaseServiceExposeHTTPOptions(): ServiceExposeHTTPOptions { } export const ServiceExposeHTTPOptions = { - $type: 'akash.manifest.v2beta1.ServiceExposeHTTPOptions' as const, + $type: "akash.manifest.v2beta1.ServiceExposeHTTPOptions" as const, - encode( - message: ServiceExposeHTTPOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceExposeHTTPOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.maxBodySize !== 0) { writer.uint32(8).uint32(message.maxBodySize); } @@ -54,12 +51,8 @@ export const ServiceExposeHTTPOptions = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceExposeHTTPOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceExposeHTTPOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceExposeHTTPOptions(); while (reader.pos < end) { @@ -119,21 +112,11 @@ export const ServiceExposeHTTPOptions = { fromJSON(object: any): ServiceExposeHTTPOptions { return { $type: ServiceExposeHTTPOptions.$type, - maxBodySize: isSet(object.maxBodySize) - ? globalThis.Number(object.maxBodySize) - : 0, - readTimeout: isSet(object.readTimeout) - ? globalThis.Number(object.readTimeout) - : 0, - sendTimeout: isSet(object.sendTimeout) - ? globalThis.Number(object.sendTimeout) - : 0, - nextTries: isSet(object.nextTries) - ? globalThis.Number(object.nextTries) - : 0, - nextTimeout: isSet(object.nextTimeout) - ? globalThis.Number(object.nextTimeout) - : 0, + maxBodySize: isSet(object.maxBodySize) ? globalThis.Number(object.maxBodySize) : 0, + readTimeout: isSet(object.readTimeout) ? globalThis.Number(object.readTimeout) : 0, + sendTimeout: isSet(object.sendTimeout) ? globalThis.Number(object.sendTimeout) : 0, + nextTries: isSet(object.nextTries) ? globalThis.Number(object.nextTries) : 0, + nextTimeout: isSet(object.nextTimeout) ? globalThis.Number(object.nextTimeout) : 0, nextCases: globalThis.Array.isArray(object?.nextCases) ? object.nextCases.map((e: any) => globalThis.String(e)) : [], @@ -163,14 +146,10 @@ export const ServiceExposeHTTPOptions = { return obj; }, - create( - base?: DeepPartial, - ): ServiceExposeHTTPOptions { + create(base?: DeepPartial): ServiceExposeHTTPOptions { return ServiceExposeHTTPOptions.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ServiceExposeHTTPOptions { + fromPartial(object: DeepPartial): ServiceExposeHTTPOptions { const message = createBaseServiceExposeHTTPOptions(); message.maxBodySize = object.maxBodySize ?? 0; message.readTimeout = object.readTimeout ?? 0; @@ -182,31 +161,15 @@ export const ServiceExposeHTTPOptions = { }, }; -messageTypeRegistry.set( - ServiceExposeHTTPOptions.$type, - ServiceExposeHTTPOptions, -); - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +messageTypeRegistry.set(ServiceExposeHTTPOptions.$type, ServiceExposeHTTPOptions); + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta1/service.ts b/ts/src/generated/akash/manifest/v2beta1/service.ts index 7bceaba8..67984843 100644 --- a/ts/src/generated/akash/manifest/v2beta1/service.ts +++ b/ts/src/generated/akash/manifest/v2beta1/service.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ResourceUnits } from '../../base/v1beta2/resourceunits'; -import { ServiceExpose } from './serviceexpose'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ResourceUnits } from "../../base/v1beta2/resourceunits"; +import { ServiceExpose } from "./serviceexpose"; /** StorageParams */ export interface StorageParams { - $type: 'akash.manifest.v2beta1.StorageParams'; + $type: "akash.manifest.v2beta1.StorageParams"; name: string; mount: string; readOnly: boolean; @@ -15,13 +15,13 @@ export interface StorageParams { /** ServiceParams */ export interface ServiceParams { - $type: 'akash.manifest.v2beta1.ServiceParams'; + $type: "akash.manifest.v2beta1.ServiceParams"; storage: StorageParams[]; } /** Service stores name, image, args, env, unit, count and expose list of service */ export interface Service { - $type: 'akash.manifest.v2beta1.Service'; + $type: "akash.manifest.v2beta1.Service"; name: string; image: string; command: string[]; @@ -34,25 +34,17 @@ export interface Service { } function createBaseStorageParams(): StorageParams { - return { - $type: 'akash.manifest.v2beta1.StorageParams', - name: '', - mount: '', - readOnly: false, - }; + return { $type: "akash.manifest.v2beta1.StorageParams", name: "", mount: "", readOnly: false }; } export const StorageParams = { - $type: 'akash.manifest.v2beta1.StorageParams' as const, + $type: "akash.manifest.v2beta1.StorageParams" as const, - encode( - message: StorageParams, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: StorageParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } - if (message.mount !== '') { + if (message.mount !== "") { writer.uint32(18).string(message.mount); } if (message.readOnly !== false) { @@ -62,8 +54,7 @@ export const StorageParams = { }, decode(input: _m0.Reader | Uint8Array, length?: number): StorageParams { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorageParams(); while (reader.pos < end) { @@ -102,20 +93,18 @@ export const StorageParams = { fromJSON(object: any): StorageParams { return { $type: StorageParams.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - mount: isSet(object.mount) ? globalThis.String(object.mount) : '', - readOnly: isSet(object.readOnly) - ? globalThis.Boolean(object.readOnly) - : false, + name: isSet(object.name) ? globalThis.String(object.name) : "", + mount: isSet(object.mount) ? globalThis.String(object.mount) : "", + readOnly: isSet(object.readOnly) ? globalThis.Boolean(object.readOnly) : false, }; }, toJSON(message: StorageParams): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } - if (message.mount !== '') { + if (message.mount !== "") { obj.mount = message.mount; } if (message.readOnly !== false) { @@ -129,8 +118,8 @@ export const StorageParams = { }, fromPartial(object: DeepPartial): StorageParams { const message = createBaseStorageParams(); - message.name = object.name ?? ''; - message.mount = object.mount ?? ''; + message.name = object.name ?? ""; + message.mount = object.mount ?? ""; message.readOnly = object.readOnly ?? false; return message; }, @@ -139,16 +128,13 @@ export const StorageParams = { messageTypeRegistry.set(StorageParams.$type, StorageParams); function createBaseServiceParams(): ServiceParams { - return { $type: 'akash.manifest.v2beta1.ServiceParams', storage: [] }; + return { $type: "akash.manifest.v2beta1.ServiceParams", storage: [] }; } export const ServiceParams = { - $type: 'akash.manifest.v2beta1.ServiceParams' as const, + $type: "akash.manifest.v2beta1.ServiceParams" as const, - encode( - message: ServiceParams, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.storage) { StorageParams.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -156,8 +142,7 @@ export const ServiceParams = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceParams { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceParams(); while (reader.pos < end) { @@ -201,8 +186,7 @@ export const ServiceParams = { }, fromPartial(object: DeepPartial): ServiceParams { const message = createBaseServiceParams(); - message.storage = - object.storage?.map((e) => StorageParams.fromPartial(e)) || []; + message.storage = object.storage?.map((e) => StorageParams.fromPartial(e)) || []; return message; }, }; @@ -211,9 +195,9 @@ messageTypeRegistry.set(ServiceParams.$type, ServiceParams); function createBaseService(): Service { return { - $type: 'akash.manifest.v2beta1.Service', - name: '', - image: '', + $type: "akash.manifest.v2beta1.Service", + name: "", + image: "", command: [], args: [], env: [], @@ -225,16 +209,13 @@ function createBaseService(): Service { } export const Service = { - $type: 'akash.manifest.v2beta1.Service' as const, + $type: "akash.manifest.v2beta1.Service" as const, - encode( - message: Service, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: Service, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } - if (message.image !== '') { + if (message.image !== "") { writer.uint32(18).string(message.image); } for (const v of message.command) { @@ -247,10 +228,7 @@ export const Service = { writer.uint32(42).string(v!); } if (message.resources !== undefined) { - ResourceUnits.encode( - message.resources, - writer.uint32(50).fork(), - ).ldelim(); + ResourceUnits.encode(message.resources, writer.uint32(50).fork()).ldelim(); } if (message.count !== 0) { writer.uint32(56).uint32(message.count); @@ -265,8 +243,7 @@ export const Service = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Service { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseService(); while (reader.pos < end) { @@ -347,36 +324,24 @@ export const Service = { fromJSON(object: any): Service { return { $type: Service.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - image: isSet(object.image) ? globalThis.String(object.image) : '', - command: globalThis.Array.isArray(object?.command) - ? object.command.map((e: any) => globalThis.String(e)) - : [], - args: globalThis.Array.isArray(object?.args) - ? object.args.map((e: any) => globalThis.String(e)) - : [], - env: globalThis.Array.isArray(object?.env) - ? object.env.map((e: any) => globalThis.String(e)) - : [], - resources: isSet(object.resources) - ? ResourceUnits.fromJSON(object.resources) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + image: isSet(object.image) ? globalThis.String(object.image) : "", + command: globalThis.Array.isArray(object?.command) ? object.command.map((e: any) => globalThis.String(e)) : [], + args: globalThis.Array.isArray(object?.args) ? object.args.map((e: any) => globalThis.String(e)) : [], + env: globalThis.Array.isArray(object?.env) ? object.env.map((e: any) => globalThis.String(e)) : [], + resources: isSet(object.resources) ? ResourceUnits.fromJSON(object.resources) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, - expose: globalThis.Array.isArray(object?.expose) - ? object.expose.map((e: any) => ServiceExpose.fromJSON(e)) - : [], - params: isSet(object.params) - ? ServiceParams.fromJSON(object.params) - : undefined, + expose: globalThis.Array.isArray(object?.expose) ? object.expose.map((e: any) => ServiceExpose.fromJSON(e)) : [], + params: isSet(object.params) ? ServiceParams.fromJSON(object.params) : undefined, }; }, toJSON(message: Service): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } - if (message.image !== '') { + if (message.image !== "") { obj.image = message.image; } if (message.command?.length) { @@ -408,48 +373,32 @@ export const Service = { }, fromPartial(object: DeepPartial): Service { const message = createBaseService(); - message.name = object.name ?? ''; - message.image = object.image ?? ''; + message.name = object.name ?? ""; + message.image = object.image ?? ""; message.command = object.command?.map((e) => e) || []; message.args = object.args?.map((e) => e) || []; message.env = object.env?.map((e) => e) || []; - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourceUnits.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? ResourceUnits.fromPartial(object.resources) + : undefined; message.count = object.count ?? 0; - message.expose = - object.expose?.map((e) => ServiceExpose.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? ServiceParams.fromPartial(object.params) - : undefined; + message.expose = object.expose?.map((e) => ServiceExpose.fromPartial(e)) || []; + message.params = (object.params !== undefined && object.params !== null) + ? ServiceParams.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(Service.$type, Service); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta1/serviceexpose.ts b/ts/src/generated/akash/manifest/v2beta1/serviceexpose.ts index f7026d31..a3aea7ef 100644 --- a/ts/src/generated/akash/manifest/v2beta1/serviceexpose.ts +++ b/ts/src/generated/akash/manifest/v2beta1/serviceexpose.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ServiceExposeHTTPOptions } from './httpoptions'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ServiceExposeHTTPOptions } from "./httpoptions"; /** ServiceExpose stores exposed ports and hosts details */ export interface ServiceExpose { - $type: 'akash.manifest.v2beta1.ServiceExpose'; + $type: "akash.manifest.v2beta1.ServiceExpose"; /** port on the container */ port: number; /** port on the service definition */ @@ -15,7 +15,9 @@ export interface ServiceExpose { service: string; global: boolean; hosts: string[]; - httpOptions: ServiceExposeHTTPOptions | undefined; + httpOptions: + | ServiceExposeHTTPOptions + | undefined; /** The name of the IP address associated with this, if any */ ip: string; /** The sequence number of the associated endpoint in the on-chain data */ @@ -24,36 +26,33 @@ export interface ServiceExpose { function createBaseServiceExpose(): ServiceExpose { return { - $type: 'akash.manifest.v2beta1.ServiceExpose', + $type: "akash.manifest.v2beta1.ServiceExpose", port: 0, externalPort: 0, - proto: '', - service: '', + proto: "", + service: "", global: false, hosts: [], httpOptions: undefined, - ip: '', + ip: "", endpointSequenceNumber: 0, }; } export const ServiceExpose = { - $type: 'akash.manifest.v2beta1.ServiceExpose' as const, + $type: "akash.manifest.v2beta1.ServiceExpose" as const, - encode( - message: ServiceExpose, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceExpose, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.port !== 0) { writer.uint32(8).uint32(message.port); } if (message.externalPort !== 0) { writer.uint32(16).uint32(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { writer.uint32(26).string(message.proto); } - if (message.service !== '') { + if (message.service !== "") { writer.uint32(34).string(message.service); } if (message.global !== false) { @@ -63,12 +62,9 @@ export const ServiceExpose = { writer.uint32(50).string(v!); } if (message.httpOptions !== undefined) { - ServiceExposeHTTPOptions.encode( - message.httpOptions, - writer.uint32(58).fork(), - ).ldelim(); + ServiceExposeHTTPOptions.encode(message.httpOptions, writer.uint32(58).fork()).ldelim(); } - if (message.ip !== '') { + if (message.ip !== "") { writer.uint32(66).string(message.ip); } if (message.endpointSequenceNumber !== 0) { @@ -78,8 +74,7 @@ export const ServiceExpose = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceExpose { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceExpose(); while (reader.pos < end) { @@ -132,10 +127,7 @@ export const ServiceExpose = { break; } - message.httpOptions = ServiceExposeHTTPOptions.decode( - reader, - reader.uint32(), - ); + message.httpOptions = ServiceExposeHTTPOptions.decode(reader, reader.uint32()); continue; case 8: if (tag !== 66) { @@ -164,19 +156,13 @@ export const ServiceExpose = { return { $type: ServiceExpose.$type, port: isSet(object.port) ? globalThis.Number(object.port) : 0, - externalPort: isSet(object.externalPort) - ? globalThis.Number(object.externalPort) - : 0, - proto: isSet(object.proto) ? globalThis.String(object.proto) : '', - service: isSet(object.service) ? globalThis.String(object.service) : '', + externalPort: isSet(object.externalPort) ? globalThis.Number(object.externalPort) : 0, + proto: isSet(object.proto) ? globalThis.String(object.proto) : "", + service: isSet(object.service) ? globalThis.String(object.service) : "", global: isSet(object.global) ? globalThis.Boolean(object.global) : false, - hosts: globalThis.Array.isArray(object?.hosts) - ? object.hosts.map((e: any) => globalThis.String(e)) - : [], - httpOptions: isSet(object.httpOptions) - ? ServiceExposeHTTPOptions.fromJSON(object.httpOptions) - : undefined, - ip: isSet(object.ip) ? globalThis.String(object.ip) : '', + hosts: globalThis.Array.isArray(object?.hosts) ? object.hosts.map((e: any) => globalThis.String(e)) : [], + httpOptions: isSet(object.httpOptions) ? ServiceExposeHTTPOptions.fromJSON(object.httpOptions) : undefined, + ip: isSet(object.ip) ? globalThis.String(object.ip) : "", endpointSequenceNumber: isSet(object.endpointSequenceNumber) ? globalThis.Number(object.endpointSequenceNumber) : 0, @@ -191,10 +177,10 @@ export const ServiceExpose = { if (message.externalPort !== 0) { obj.externalPort = Math.round(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { obj.proto = message.proto; } - if (message.service !== '') { + if (message.service !== "") { obj.service = message.service; } if (message.global !== false) { @@ -206,7 +192,7 @@ export const ServiceExpose = { if (message.httpOptions !== undefined) { obj.httpOptions = ServiceExposeHTTPOptions.toJSON(message.httpOptions); } - if (message.ip !== '') { + if (message.ip !== "") { obj.ip = message.ip; } if (message.endpointSequenceNumber !== 0) { @@ -222,15 +208,14 @@ export const ServiceExpose = { const message = createBaseServiceExpose(); message.port = object.port ?? 0; message.externalPort = object.externalPort ?? 0; - message.proto = object.proto ?? ''; - message.service = object.service ?? ''; + message.proto = object.proto ?? ""; + message.service = object.service ?? ""; message.global = object.global ?? false; message.hosts = object.hosts?.map((e) => e) || []; - message.httpOptions = - object.httpOptions !== undefined && object.httpOptions !== null - ? ServiceExposeHTTPOptions.fromPartial(object.httpOptions) - : undefined; - message.ip = object.ip ?? ''; + message.httpOptions = (object.httpOptions !== undefined && object.httpOptions !== null) + ? ServiceExposeHTTPOptions.fromPartial(object.httpOptions) + : undefined; + message.ip = object.ip ?? ""; message.endpointSequenceNumber = object.endpointSequenceNumber ?? 0; return message; }, @@ -238,26 +223,13 @@ export const ServiceExpose = { messageTypeRegistry.set(ServiceExpose.$type, ServiceExpose); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta2/group.ts b/ts/src/generated/akash/manifest/v2beta2/group.ts index 10cd0a30..f1310a28 100644 --- a/ts/src/generated/akash/manifest/v2beta2/group.ts +++ b/ts/src/generated/akash/manifest/v2beta2/group.ts @@ -1,25 +1,25 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Service } from './service'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Service } from "./service"; /** Group store name and list of services */ export interface Group { - $type: 'akash.manifest.v2beta2.Group'; + $type: "akash.manifest.v2beta2.Group"; name: string; services: Service[]; } function createBaseGroup(): Group { - return { $type: 'akash.manifest.v2beta2.Group', name: '', services: [] }; + return { $type: "akash.manifest.v2beta2.Group", name: "", services: [] }; } export const Group = { - $type: 'akash.manifest.v2beta2.Group' as const, + $type: "akash.manifest.v2beta2.Group" as const, encode(message: Group, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.name !== '') { + if (message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.services) { @@ -29,8 +29,7 @@ export const Group = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Group { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGroup(); while (reader.pos < end) { @@ -62,16 +61,14 @@ export const Group = { fromJSON(object: any): Group { return { $type: Group.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - services: globalThis.Array.isArray(object?.services) - ? object.services.map((e: any) => Service.fromJSON(e)) - : [], + name: isSet(object.name) ? globalThis.String(object.name) : "", + services: globalThis.Array.isArray(object?.services) ? object.services.map((e: any) => Service.fromJSON(e)) : [], }; }, toJSON(message: Group): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.services?.length) { @@ -85,35 +82,21 @@ export const Group = { }, fromPartial(object: DeepPartial): Group { const message = createBaseGroup(); - message.name = object.name ?? ''; - message.services = - object.services?.map((e) => Service.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.services = object.services?.map((e) => Service.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(Group.$type, Group); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta2/httpoptions.ts b/ts/src/generated/akash/manifest/v2beta2/httpoptions.ts index 449d3990..ff008154 100644 --- a/ts/src/generated/akash/manifest/v2beta2/httpoptions.ts +++ b/ts/src/generated/akash/manifest/v2beta2/httpoptions.ts @@ -1,11 +1,11 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** ServiceExposeHTTPOptions */ export interface ServiceExposeHTTPOptions { - $type: 'akash.manifest.v2beta2.ServiceExposeHTTPOptions'; + $type: "akash.manifest.v2beta2.ServiceExposeHTTPOptions"; maxBodySize: number; readTimeout: number; sendTimeout: number; @@ -16,7 +16,7 @@ export interface ServiceExposeHTTPOptions { function createBaseServiceExposeHTTPOptions(): ServiceExposeHTTPOptions { return { - $type: 'akash.manifest.v2beta2.ServiceExposeHTTPOptions', + $type: "akash.manifest.v2beta2.ServiceExposeHTTPOptions", maxBodySize: 0, readTimeout: 0, sendTimeout: 0, @@ -27,12 +27,9 @@ function createBaseServiceExposeHTTPOptions(): ServiceExposeHTTPOptions { } export const ServiceExposeHTTPOptions = { - $type: 'akash.manifest.v2beta2.ServiceExposeHTTPOptions' as const, + $type: "akash.manifest.v2beta2.ServiceExposeHTTPOptions" as const, - encode( - message: ServiceExposeHTTPOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceExposeHTTPOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.maxBodySize !== 0) { writer.uint32(8).uint32(message.maxBodySize); } @@ -54,12 +51,8 @@ export const ServiceExposeHTTPOptions = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceExposeHTTPOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceExposeHTTPOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceExposeHTTPOptions(); while (reader.pos < end) { @@ -119,21 +112,11 @@ export const ServiceExposeHTTPOptions = { fromJSON(object: any): ServiceExposeHTTPOptions { return { $type: ServiceExposeHTTPOptions.$type, - maxBodySize: isSet(object.maxBodySize) - ? globalThis.Number(object.maxBodySize) - : 0, - readTimeout: isSet(object.readTimeout) - ? globalThis.Number(object.readTimeout) - : 0, - sendTimeout: isSet(object.sendTimeout) - ? globalThis.Number(object.sendTimeout) - : 0, - nextTries: isSet(object.nextTries) - ? globalThis.Number(object.nextTries) - : 0, - nextTimeout: isSet(object.nextTimeout) - ? globalThis.Number(object.nextTimeout) - : 0, + maxBodySize: isSet(object.maxBodySize) ? globalThis.Number(object.maxBodySize) : 0, + readTimeout: isSet(object.readTimeout) ? globalThis.Number(object.readTimeout) : 0, + sendTimeout: isSet(object.sendTimeout) ? globalThis.Number(object.sendTimeout) : 0, + nextTries: isSet(object.nextTries) ? globalThis.Number(object.nextTries) : 0, + nextTimeout: isSet(object.nextTimeout) ? globalThis.Number(object.nextTimeout) : 0, nextCases: globalThis.Array.isArray(object?.nextCases) ? object.nextCases.map((e: any) => globalThis.String(e)) : [], @@ -163,14 +146,10 @@ export const ServiceExposeHTTPOptions = { return obj; }, - create( - base?: DeepPartial, - ): ServiceExposeHTTPOptions { + create(base?: DeepPartial): ServiceExposeHTTPOptions { return ServiceExposeHTTPOptions.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ServiceExposeHTTPOptions { + fromPartial(object: DeepPartial): ServiceExposeHTTPOptions { const message = createBaseServiceExposeHTTPOptions(); message.maxBodySize = object.maxBodySize ?? 0; message.readTimeout = object.readTimeout ?? 0; @@ -182,31 +161,15 @@ export const ServiceExposeHTTPOptions = { }, }; -messageTypeRegistry.set( - ServiceExposeHTTPOptions.$type, - ServiceExposeHTTPOptions, -); - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +messageTypeRegistry.set(ServiceExposeHTTPOptions.$type, ServiceExposeHTTPOptions); + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta2/service.ts b/ts/src/generated/akash/manifest/v2beta2/service.ts index a31c1486..58178ccc 100644 --- a/ts/src/generated/akash/manifest/v2beta2/service.ts +++ b/ts/src/generated/akash/manifest/v2beta2/service.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Resources } from '../../base/v1beta3/resources'; -import { ServiceExpose } from './serviceexpose'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Resources } from "../../base/v1beta3/resources"; +import { ServiceExpose } from "./serviceexpose"; /** StorageParams */ export interface StorageParams { - $type: 'akash.manifest.v2beta2.StorageParams'; + $type: "akash.manifest.v2beta2.StorageParams"; name: string; mount: string; readOnly: boolean; @@ -15,13 +15,13 @@ export interface StorageParams { /** ServiceParams */ export interface ServiceParams { - $type: 'akash.manifest.v2beta2.ServiceParams'; + $type: "akash.manifest.v2beta2.ServiceParams"; storage: StorageParams[]; } /** Credentials to fetch image from registry */ export interface ServiceImageCredentials { - $type: 'akash.manifest.v2beta2.ServiceImageCredentials'; + $type: "akash.manifest.v2beta2.ServiceImageCredentials"; host: string; email: string; username: string; @@ -30,7 +30,7 @@ export interface ServiceImageCredentials { /** Service stores name, image, args, env, unit, count and expose list of service */ export interface Service { - $type: 'akash.manifest.v2beta2.Service'; + $type: "akash.manifest.v2beta2.Service"; name: string; image: string; command: string[]; @@ -44,25 +44,17 @@ export interface Service { } function createBaseStorageParams(): StorageParams { - return { - $type: 'akash.manifest.v2beta2.StorageParams', - name: '', - mount: '', - readOnly: false, - }; + return { $type: "akash.manifest.v2beta2.StorageParams", name: "", mount: "", readOnly: false }; } export const StorageParams = { - $type: 'akash.manifest.v2beta2.StorageParams' as const, + $type: "akash.manifest.v2beta2.StorageParams" as const, - encode( - message: StorageParams, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: StorageParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } - if (message.mount !== '') { + if (message.mount !== "") { writer.uint32(18).string(message.mount); } if (message.readOnly !== false) { @@ -72,8 +64,7 @@ export const StorageParams = { }, decode(input: _m0.Reader | Uint8Array, length?: number): StorageParams { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStorageParams(); while (reader.pos < end) { @@ -112,20 +103,18 @@ export const StorageParams = { fromJSON(object: any): StorageParams { return { $type: StorageParams.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - mount: isSet(object.mount) ? globalThis.String(object.mount) : '', - readOnly: isSet(object.readOnly) - ? globalThis.Boolean(object.readOnly) - : false, + name: isSet(object.name) ? globalThis.String(object.name) : "", + mount: isSet(object.mount) ? globalThis.String(object.mount) : "", + readOnly: isSet(object.readOnly) ? globalThis.Boolean(object.readOnly) : false, }; }, toJSON(message: StorageParams): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } - if (message.mount !== '') { + if (message.mount !== "") { obj.mount = message.mount; } if (message.readOnly !== false) { @@ -139,8 +128,8 @@ export const StorageParams = { }, fromPartial(object: DeepPartial): StorageParams { const message = createBaseStorageParams(); - message.name = object.name ?? ''; - message.mount = object.mount ?? ''; + message.name = object.name ?? ""; + message.mount = object.mount ?? ""; message.readOnly = object.readOnly ?? false; return message; }, @@ -149,16 +138,13 @@ export const StorageParams = { messageTypeRegistry.set(StorageParams.$type, StorageParams); function createBaseServiceParams(): ServiceParams { - return { $type: 'akash.manifest.v2beta2.ServiceParams', storage: [] }; + return { $type: "akash.manifest.v2beta2.ServiceParams", storage: [] }; } export const ServiceParams = { - $type: 'akash.manifest.v2beta2.ServiceParams' as const, + $type: "akash.manifest.v2beta2.ServiceParams" as const, - encode( - message: ServiceParams, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.storage) { StorageParams.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -166,8 +152,7 @@ export const ServiceParams = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceParams { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceParams(); while (reader.pos < end) { @@ -211,8 +196,7 @@ export const ServiceParams = { }, fromPartial(object: DeepPartial): ServiceParams { const message = createBaseServiceParams(); - message.storage = - object.storage?.map((e) => StorageParams.fromPartial(e)) || []; + message.storage = object.storage?.map((e) => StorageParams.fromPartial(e)) || []; return message; }, }; @@ -220,43 +204,30 @@ export const ServiceParams = { messageTypeRegistry.set(ServiceParams.$type, ServiceParams); function createBaseServiceImageCredentials(): ServiceImageCredentials { - return { - $type: 'akash.manifest.v2beta2.ServiceImageCredentials', - host: '', - email: '', - username: '', - password: '', - }; + return { $type: "akash.manifest.v2beta2.ServiceImageCredentials", host: "", email: "", username: "", password: "" }; } export const ServiceImageCredentials = { - $type: 'akash.manifest.v2beta2.ServiceImageCredentials' as const, + $type: "akash.manifest.v2beta2.ServiceImageCredentials" as const, - encode( - message: ServiceImageCredentials, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.host !== '') { + encode(message: ServiceImageCredentials, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.host !== "") { writer.uint32(10).string(message.host); } - if (message.email !== '') { + if (message.email !== "") { writer.uint32(18).string(message.email); } - if (message.username !== '') { + if (message.username !== "") { writer.uint32(26).string(message.username); } - if (message.password !== '') { + if (message.password !== "") { writer.uint32(34).string(message.password); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceImageCredentials { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceImageCredentials { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceImageCredentials(); while (reader.pos < end) { @@ -302,29 +273,25 @@ export const ServiceImageCredentials = { fromJSON(object: any): ServiceImageCredentials { return { $type: ServiceImageCredentials.$type, - host: isSet(object.host) ? globalThis.String(object.host) : '', - email: isSet(object.email) ? globalThis.String(object.email) : '', - username: isSet(object.username) - ? globalThis.String(object.username) - : '', - password: isSet(object.password) - ? globalThis.String(object.password) - : '', + host: isSet(object.host) ? globalThis.String(object.host) : "", + email: isSet(object.email) ? globalThis.String(object.email) : "", + username: isSet(object.username) ? globalThis.String(object.username) : "", + password: isSet(object.password) ? globalThis.String(object.password) : "", }; }, toJSON(message: ServiceImageCredentials): unknown { const obj: any = {}; - if (message.host !== '') { + if (message.host !== "") { obj.host = message.host; } - if (message.email !== '') { + if (message.email !== "") { obj.email = message.email; } - if (message.username !== '') { + if (message.username !== "") { obj.username = message.username; } - if (message.password !== '') { + if (message.password !== "") { obj.password = message.password; } return obj; @@ -333,14 +300,12 @@ export const ServiceImageCredentials = { create(base?: DeepPartial): ServiceImageCredentials { return ServiceImageCredentials.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ServiceImageCredentials { + fromPartial(object: DeepPartial): ServiceImageCredentials { const message = createBaseServiceImageCredentials(); - message.host = object.host ?? ''; - message.email = object.email ?? ''; - message.username = object.username ?? ''; - message.password = object.password ?? ''; + message.host = object.host ?? ""; + message.email = object.email ?? ""; + message.username = object.username ?? ""; + message.password = object.password ?? ""; return message; }, }; @@ -349,9 +314,9 @@ messageTypeRegistry.set(ServiceImageCredentials.$type, ServiceImageCredentials); function createBaseService(): Service { return { - $type: 'akash.manifest.v2beta2.Service', - name: '', - image: '', + $type: "akash.manifest.v2beta2.Service", + name: "", + image: "", command: [], args: [], env: [], @@ -364,16 +329,13 @@ function createBaseService(): Service { } export const Service = { - $type: 'akash.manifest.v2beta2.Service' as const, + $type: "akash.manifest.v2beta2.Service" as const, - encode( - message: Service, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: Service, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } - if (message.image !== '') { + if (message.image !== "") { writer.uint32(18).string(message.image); } for (const v of message.command) { @@ -398,17 +360,13 @@ export const Service = { ServiceParams.encode(message.params, writer.uint32(74).fork()).ldelim(); } if (message.credentials !== undefined) { - ServiceImageCredentials.encode( - message.credentials, - writer.uint32(82).fork(), - ).ldelim(); + ServiceImageCredentials.encode(message.credentials, writer.uint32(82).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Service { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseService(); while (reader.pos < end) { @@ -482,10 +440,7 @@ export const Service = { break; } - message.credentials = ServiceImageCredentials.decode( - reader, - reader.uint32(), - ); + message.credentials = ServiceImageCredentials.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -499,39 +454,25 @@ export const Service = { fromJSON(object: any): Service { return { $type: Service.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - image: isSet(object.image) ? globalThis.String(object.image) : '', - command: globalThis.Array.isArray(object?.command) - ? object.command.map((e: any) => globalThis.String(e)) - : [], - args: globalThis.Array.isArray(object?.args) - ? object.args.map((e: any) => globalThis.String(e)) - : [], - env: globalThis.Array.isArray(object?.env) - ? object.env.map((e: any) => globalThis.String(e)) - : [], - resources: isSet(object.resources) - ? Resources.fromJSON(object.resources) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + image: isSet(object.image) ? globalThis.String(object.image) : "", + command: globalThis.Array.isArray(object?.command) ? object.command.map((e: any) => globalThis.String(e)) : [], + args: globalThis.Array.isArray(object?.args) ? object.args.map((e: any) => globalThis.String(e)) : [], + env: globalThis.Array.isArray(object?.env) ? object.env.map((e: any) => globalThis.String(e)) : [], + resources: isSet(object.resources) ? Resources.fromJSON(object.resources) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, - expose: globalThis.Array.isArray(object?.expose) - ? object.expose.map((e: any) => ServiceExpose.fromJSON(e)) - : [], - params: isSet(object.params) - ? ServiceParams.fromJSON(object.params) - : undefined, - credentials: isSet(object.credentials) - ? ServiceImageCredentials.fromJSON(object.credentials) - : undefined, + expose: globalThis.Array.isArray(object?.expose) ? object.expose.map((e: any) => ServiceExpose.fromJSON(e)) : [], + params: isSet(object.params) ? ServiceParams.fromJSON(object.params) : undefined, + credentials: isSet(object.credentials) ? ServiceImageCredentials.fromJSON(object.credentials) : undefined, }; }, toJSON(message: Service): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } - if (message.image !== '') { + if (message.image !== "") { obj.image = message.image; } if (message.command?.length) { @@ -566,52 +507,35 @@ export const Service = { }, fromPartial(object: DeepPartial): Service { const message = createBaseService(); - message.name = object.name ?? ''; - message.image = object.image ?? ''; + message.name = object.name ?? ""; + message.image = object.image ?? ""; message.command = object.command?.map((e) => e) || []; message.args = object.args?.map((e) => e) || []; message.env = object.env?.map((e) => e) || []; - message.resources = - object.resources !== undefined && object.resources !== null - ? Resources.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? Resources.fromPartial(object.resources) + : undefined; message.count = object.count ?? 0; - message.expose = - object.expose?.map((e) => ServiceExpose.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? ServiceParams.fromPartial(object.params) - : undefined; - message.credentials = - object.credentials !== undefined && object.credentials !== null - ? ServiceImageCredentials.fromPartial(object.credentials) - : undefined; + message.expose = object.expose?.map((e) => ServiceExpose.fromPartial(e)) || []; + message.params = (object.params !== undefined && object.params !== null) + ? ServiceParams.fromPartial(object.params) + : undefined; + message.credentials = (object.credentials !== undefined && object.credentials !== null) + ? ServiceImageCredentials.fromPartial(object.credentials) + : undefined; return message; }, }; messageTypeRegistry.set(Service.$type, Service); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/manifest/v2beta2/serviceexpose.ts b/ts/src/generated/akash/manifest/v2beta2/serviceexpose.ts index 44b77258..da01e77d 100644 --- a/ts/src/generated/akash/manifest/v2beta2/serviceexpose.ts +++ b/ts/src/generated/akash/manifest/v2beta2/serviceexpose.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { ServiceExposeHTTPOptions } from './httpoptions'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { ServiceExposeHTTPOptions } from "./httpoptions"; /** ServiceExpose stores exposed ports and hosts details */ export interface ServiceExpose { - $type: 'akash.manifest.v2beta2.ServiceExpose'; + $type: "akash.manifest.v2beta2.ServiceExpose"; /** port on the container */ port: number; /** port on the service definition */ @@ -15,7 +15,9 @@ export interface ServiceExpose { service: string; global: boolean; hosts: string[]; - httpOptions: ServiceExposeHTTPOptions | undefined; + httpOptions: + | ServiceExposeHTTPOptions + | undefined; /** The name of the IP address associated with this, if any */ ip: string; /** The sequence number of the associated endpoint in the on-chain data */ @@ -24,36 +26,33 @@ export interface ServiceExpose { function createBaseServiceExpose(): ServiceExpose { return { - $type: 'akash.manifest.v2beta2.ServiceExpose', + $type: "akash.manifest.v2beta2.ServiceExpose", port: 0, externalPort: 0, - proto: '', - service: '', + proto: "", + service: "", global: false, hosts: [], httpOptions: undefined, - ip: '', + ip: "", endpointSequenceNumber: 0, }; } export const ServiceExpose = { - $type: 'akash.manifest.v2beta2.ServiceExpose' as const, + $type: "akash.manifest.v2beta2.ServiceExpose" as const, - encode( - message: ServiceExpose, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceExpose, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.port !== 0) { writer.uint32(8).uint32(message.port); } if (message.externalPort !== 0) { writer.uint32(16).uint32(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { writer.uint32(26).string(message.proto); } - if (message.service !== '') { + if (message.service !== "") { writer.uint32(34).string(message.service); } if (message.global !== false) { @@ -63,12 +62,9 @@ export const ServiceExpose = { writer.uint32(50).string(v!); } if (message.httpOptions !== undefined) { - ServiceExposeHTTPOptions.encode( - message.httpOptions, - writer.uint32(58).fork(), - ).ldelim(); + ServiceExposeHTTPOptions.encode(message.httpOptions, writer.uint32(58).fork()).ldelim(); } - if (message.ip !== '') { + if (message.ip !== "") { writer.uint32(66).string(message.ip); } if (message.endpointSequenceNumber !== 0) { @@ -78,8 +74,7 @@ export const ServiceExpose = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceExpose { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceExpose(); while (reader.pos < end) { @@ -132,10 +127,7 @@ export const ServiceExpose = { break; } - message.httpOptions = ServiceExposeHTTPOptions.decode( - reader, - reader.uint32(), - ); + message.httpOptions = ServiceExposeHTTPOptions.decode(reader, reader.uint32()); continue; case 8: if (tag !== 66) { @@ -164,19 +156,13 @@ export const ServiceExpose = { return { $type: ServiceExpose.$type, port: isSet(object.port) ? globalThis.Number(object.port) : 0, - externalPort: isSet(object.externalPort) - ? globalThis.Number(object.externalPort) - : 0, - proto: isSet(object.proto) ? globalThis.String(object.proto) : '', - service: isSet(object.service) ? globalThis.String(object.service) : '', + externalPort: isSet(object.externalPort) ? globalThis.Number(object.externalPort) : 0, + proto: isSet(object.proto) ? globalThis.String(object.proto) : "", + service: isSet(object.service) ? globalThis.String(object.service) : "", global: isSet(object.global) ? globalThis.Boolean(object.global) : false, - hosts: globalThis.Array.isArray(object?.hosts) - ? object.hosts.map((e: any) => globalThis.String(e)) - : [], - httpOptions: isSet(object.httpOptions) - ? ServiceExposeHTTPOptions.fromJSON(object.httpOptions) - : undefined, - ip: isSet(object.ip) ? globalThis.String(object.ip) : '', + hosts: globalThis.Array.isArray(object?.hosts) ? object.hosts.map((e: any) => globalThis.String(e)) : [], + httpOptions: isSet(object.httpOptions) ? ServiceExposeHTTPOptions.fromJSON(object.httpOptions) : undefined, + ip: isSet(object.ip) ? globalThis.String(object.ip) : "", endpointSequenceNumber: isSet(object.endpointSequenceNumber) ? globalThis.Number(object.endpointSequenceNumber) : 0, @@ -191,10 +177,10 @@ export const ServiceExpose = { if (message.externalPort !== 0) { obj.externalPort = Math.round(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { obj.proto = message.proto; } - if (message.service !== '') { + if (message.service !== "") { obj.service = message.service; } if (message.global !== false) { @@ -206,7 +192,7 @@ export const ServiceExpose = { if (message.httpOptions !== undefined) { obj.httpOptions = ServiceExposeHTTPOptions.toJSON(message.httpOptions); } - if (message.ip !== '') { + if (message.ip !== "") { obj.ip = message.ip; } if (message.endpointSequenceNumber !== 0) { @@ -222,15 +208,14 @@ export const ServiceExpose = { const message = createBaseServiceExpose(); message.port = object.port ?? 0; message.externalPort = object.externalPort ?? 0; - message.proto = object.proto ?? ''; - message.service = object.service ?? ''; + message.proto = object.proto ?? ""; + message.service = object.service ?? ""; message.global = object.global ?? false; message.hosts = object.hosts?.map((e) => e) || []; - message.httpOptions = - object.httpOptions !== undefined && object.httpOptions !== null - ? ServiceExposeHTTPOptions.fromPartial(object.httpOptions) - : undefined; - message.ip = object.ip ?? ''; + message.httpOptions = (object.httpOptions !== undefined && object.httpOptions !== null) + ? ServiceExposeHTTPOptions.fromPartial(object.httpOptions) + : undefined; + message.ip = object.ip ?? ""; message.endpointSequenceNumber = object.endpointSequenceNumber ?? 0; return message; }, @@ -238,26 +223,13 @@ export const ServiceExpose = { messageTypeRegistry.set(ServiceExpose.$type, ServiceExpose); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/bid.ts b/ts/src/generated/akash/market/v1beta2/bid.ts index 535f1ae4..54fa3d6a 100644 --- a/ts/src/generated/akash/market/v1beta2/bid.ts +++ b/ts/src/generated/akash/market/v1beta2/bid.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin, DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { OrderID } from "./order"; /** MsgCreateBid defines an SDK message for creating Bid */ export interface MsgCreateBid { - $type: 'akash.market.v1beta2.MsgCreateBid'; + $type: "akash.market.v1beta2.MsgCreateBid"; order: OrderID | undefined; provider: string; price: DecCoin | undefined; @@ -16,18 +16,18 @@ export interface MsgCreateBid { /** MsgCreateBidResponse defines the Msg/CreateBid response type. */ export interface MsgCreateBidResponse { - $type: 'akash.market.v1beta2.MsgCreateBidResponse'; + $type: "akash.market.v1beta2.MsgCreateBidResponse"; } /** MsgCloseBid defines an SDK message for closing bid */ export interface MsgCloseBid { - $type: 'akash.market.v1beta2.MsgCloseBid'; + $type: "akash.market.v1beta2.MsgCloseBid"; bidId: BidID | undefined; } /** MsgCloseBidResponse defines the Msg/CloseBid response type. */ export interface MsgCloseBidResponse { - $type: 'akash.market.v1beta2.MsgCloseBidResponse'; + $type: "akash.market.v1beta2.MsgCloseBidResponse"; } /** @@ -35,7 +35,7 @@ export interface MsgCloseBidResponse { * A successful bid becomes a Lease(ID). */ export interface BidID { - $type: 'akash.market.v1beta2.BidID'; + $type: "akash.market.v1beta2.BidID"; owner: string; dseq: Long; gseq: number; @@ -45,7 +45,7 @@ export interface BidID { /** Bid stores BidID, state of bid and price */ export interface Bid { - $type: 'akash.market.v1beta2.Bid'; + $type: "akash.market.v1beta2.Bid"; bidId: BidID | undefined; state: Bid_State; price: DecCoin | undefined; @@ -70,22 +70,22 @@ export enum Bid_State { export function bid_StateFromJSON(object: any): Bid_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Bid_State.invalid; case 1: - case 'open': + case "open": return Bid_State.open; case 2: - case 'active': + case "active": return Bid_State.active; case 3: - case 'lost': + case "lost": return Bid_State.lost; case 4: - case 'closed': + case "closed": return Bid_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Bid_State.UNRECOGNIZED; } @@ -94,24 +94,24 @@ export function bid_StateFromJSON(object: any): Bid_State { export function bid_StateToJSON(object: Bid_State): string { switch (object) { case Bid_State.invalid: - return 'invalid'; + return "invalid"; case Bid_State.open: - return 'open'; + return "open"; case Bid_State.active: - return 'active'; + return "active"; case Bid_State.lost: - return 'lost'; + return "lost"; case Bid_State.closed: - return 'closed'; + return "closed"; case Bid_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** BidFilters defines flags for bid list filter */ export interface BidFilters { - $type: 'akash.market.v1beta2.BidFilters'; + $type: "akash.market.v1beta2.BidFilters"; owner: string; dseq: Long; gseq: number; @@ -122,25 +122,22 @@ export interface BidFilters { function createBaseMsgCreateBid(): MsgCreateBid { return { - $type: 'akash.market.v1beta2.MsgCreateBid', + $type: "akash.market.v1beta2.MsgCreateBid", order: undefined, - provider: '', + provider: "", price: undefined, deposit: undefined, }; } export const MsgCreateBid = { - $type: 'akash.market.v1beta2.MsgCreateBid' as const, + $type: "akash.market.v1beta2.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(18).string(message.provider); } if (message.price !== undefined) { @@ -153,8 +150,7 @@ export const MsgCreateBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBid(); while (reader.pos < end) { @@ -201,13 +197,9 @@ export const MsgCreateBid = { return { $type: MsgCreateBid.$type, order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, }; }, @@ -216,7 +208,7 @@ export const MsgCreateBid = { if (message.order !== undefined) { obj.order = OrderID.toJSON(message.order); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } if (message.price !== undefined) { @@ -233,19 +225,16 @@ export const MsgCreateBid = { }, fromPartial(object: DeepPartial): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; - message.provider = object.provider ?? ''; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.order = (object.order !== undefined && object.order !== null) + ? OrderID.fromPartial(object.order) + : undefined; + message.provider = object.provider ?? ""; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; return message; }, }; @@ -253,25 +242,18 @@ export const MsgCreateBid = { messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { - return { $type: 'akash.market.v1beta2.MsgCreateBidResponse' }; + return { $type: "akash.market.v1beta2.MsgCreateBidResponse" }; } export const MsgCreateBidResponse = { - $type: 'akash.market.v1beta2.MsgCreateBidResponse' as const, + $type: "akash.market.v1beta2.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); while (reader.pos < end) { @@ -307,16 +289,13 @@ export const MsgCreateBidResponse = { messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); function createBaseMsgCloseBid(): MsgCloseBid { - return { $type: 'akash.market.v1beta2.MsgCloseBid', bidId: undefined }; + return { $type: "akash.market.v1beta2.MsgCloseBid", bidId: undefined }; } export const MsgCloseBid = { - $type: 'akash.market.v1beta2.MsgCloseBid' as const, + $type: "akash.market.v1beta2.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -324,8 +303,7 @@ export const MsgCloseBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBid(); while (reader.pos < end) { @@ -348,10 +326,7 @@ export const MsgCloseBid = { }, fromJSON(object: any): MsgCloseBid { - return { - $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCloseBid.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { @@ -367,10 +342,7 @@ export const MsgCloseBid = { }, fromPartial(object: DeepPartial): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -378,22 +350,18 @@ export const MsgCloseBid = { messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { - return { $type: 'akash.market.v1beta2.MsgCloseBidResponse' }; + return { $type: "akash.market.v1beta2.MsgCloseBidResponse" }; } export const MsgCloseBidResponse = { - $type: 'akash.market.v1beta2.MsgCloseBidResponse' as const, + $type: "akash.market.v1beta2.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBidResponse(); while (reader.pos < end) { @@ -429,21 +397,14 @@ export const MsgCloseBidResponse = { messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); function createBaseBidID(): BidID { - return { - $type: 'akash.market.v1beta2.BidID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta2.BidID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const BidID = { - $type: 'akash.market.v1beta2.BidID' as const, + $type: "akash.market.v1beta2.BidID" as const, encode(message: BidID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -455,15 +416,14 @@ export const BidID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidID(); while (reader.pos < end) { @@ -516,19 +476,17 @@ export const BidID = { fromJSON(object: any): BidID { return { $type: BidID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: BidID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -540,7 +498,7 @@ export const BidID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -551,14 +509,11 @@ export const BidID = { }, fromPartial(object: DeepPartial): BidID { const message = createBaseBidID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -566,17 +521,11 @@ export const BidID = { messageTypeRegistry.set(BidID.$type, BidID); function createBaseBid(): Bid { - return { - $type: 'akash.market.v1beta2.Bid', - bidId: undefined, - state: 0, - price: undefined, - createdAt: Long.ZERO, - }; + return { $type: "akash.market.v1beta2.Bid", bidId: undefined, state: 0, price: undefined, createdAt: Long.ZERO }; } export const Bid = { - $type: 'akash.market.v1beta2.Bid' as const, + $type: "akash.market.v1beta2.Bid" as const, encode(message: Bid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { @@ -595,8 +544,7 @@ export const Bid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Bid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBid(); while (reader.pos < end) { @@ -645,9 +593,7 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -673,19 +619,14 @@ export const Bid = { }, fromPartial(object: DeepPartial): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -694,24 +635,21 @@ messageTypeRegistry.set(Bid.$type, Bid); function createBaseBidFilters(): BidFilters { return { - $type: 'akash.market.v1beta2.BidFilters', - owner: '', + $type: "akash.market.v1beta2.BidFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const BidFilters = { - $type: 'akash.market.v1beta2.BidFilters' as const, + $type: "akash.market.v1beta2.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -723,18 +661,17 @@ export const BidFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidFilters(); while (reader.pos < end) { @@ -794,20 +731,18 @@ export const BidFilters = { fromJSON(object: any): BidFilters { return { $type: BidFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -819,10 +754,10 @@ export const BidFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -833,41 +768,25 @@ export const BidFilters = { }, fromPartial(object: DeepPartial): BidFilters { const message = createBaseBidFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/genesis.ts b/ts/src/generated/akash/market/v1beta2/genesis.ts index 9d8050db..53d46a08 100644 --- a/ts/src/generated/akash/market/v1beta2/genesis.ts +++ b/ts/src/generated/akash/market/v1beta2/genesis.ts @@ -1,35 +1,27 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Lease } from './lease'; -import { Order } from './order'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Lease } from "./lease"; +import { Order } from "./order"; +import { Params } from "./params"; /** GenesisState defines the basic genesis state used by market module */ export interface GenesisState { - $type: 'akash.market.v1beta2.GenesisState'; + $type: "akash.market.v1beta2.GenesisState"; orders: Order[]; leases: Lease[]; params: Params | undefined; } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.market.v1beta2.GenesisState', - orders: [], - leases: [], - params: undefined, - }; + return { $type: "akash.market.v1beta2.GenesisState", orders: [], leases: [], params: undefined }; } export const GenesisState = { - $type: 'akash.market.v1beta2.GenesisState' as const, + $type: "akash.market.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -43,8 +35,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -83,12 +74,8 @@ export const GenesisState = { fromJSON(object: any): GenesisState { return { $type: GenesisState.$type, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: globalThis.Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, }; }, @@ -114,36 +101,22 @@ export const GenesisState = { const message = createBaseGenesisState(); message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/lease.ts b/ts/src/generated/akash/market/v1beta2/lease.ts index cce5d9fb..05948586 100644 --- a/ts/src/generated/akash/market/v1beta2/lease.ts +++ b/ts/src/generated/akash/market/v1beta2/lease.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { BidID } from './bid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { BidID } from "./bid"; /** LeaseID stores bid details of lease */ export interface LeaseID { - $type: 'akash.market.v1beta2.LeaseID'; + $type: "akash.market.v1beta2.LeaseID"; owner: string; dseq: Long; gseq: number; @@ -17,7 +17,7 @@ export interface LeaseID { /** Lease stores LeaseID, state of lease and price */ export interface Lease { - $type: 'akash.market.v1beta2.Lease'; + $type: "akash.market.v1beta2.Lease"; leaseId: LeaseID | undefined; state: Lease_State; price: DecCoin | undefined; @@ -41,19 +41,19 @@ export enum Lease_State { export function lease_StateFromJSON(object: any): Lease_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Lease_State.invalid; case 1: - case 'active': + case "active": return Lease_State.active; case 2: - case 'insufficient_funds': + case "insufficient_funds": return Lease_State.insufficient_funds; case 3: - case 'closed': + case "closed": return Lease_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Lease_State.UNRECOGNIZED; } @@ -62,22 +62,22 @@ export function lease_StateFromJSON(object: any): Lease_State { export function lease_StateToJSON(object: Lease_State): string { switch (object) { case Lease_State.invalid: - return 'invalid'; + return "invalid"; case Lease_State.active: - return 'active'; + return "active"; case Lease_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Lease_State.closed: - return 'closed'; + return "closed"; case Lease_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** LeaseFilters defines flags for lease list filter */ export interface LeaseFilters { - $type: 'akash.market.v1beta2.LeaseFilters'; + $type: "akash.market.v1beta2.LeaseFilters"; owner: string; dseq: Long; gseq: number; @@ -88,56 +88,46 @@ export interface LeaseFilters { /** MsgCreateLease is sent to create a lease */ export interface MsgCreateLease { - $type: 'akash.market.v1beta2.MsgCreateLease'; + $type: "akash.market.v1beta2.MsgCreateLease"; bidId: BidID | undefined; } /** MsgCreateLeaseResponse is the response from creating a lease */ export interface MsgCreateLeaseResponse { - $type: 'akash.market.v1beta2.MsgCreateLeaseResponse'; + $type: "akash.market.v1beta2.MsgCreateLeaseResponse"; } /** MsgWithdrawLease defines an SDK message for closing bid */ export interface MsgWithdrawLease { - $type: 'akash.market.v1beta2.MsgWithdrawLease'; + $type: "akash.market.v1beta2.MsgWithdrawLease"; bidId: LeaseID | undefined; } /** MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. */ export interface MsgWithdrawLeaseResponse { - $type: 'akash.market.v1beta2.MsgWithdrawLeaseResponse'; + $type: "akash.market.v1beta2.MsgWithdrawLeaseResponse"; } /** MsgCloseLease defines an SDK message for closing order */ export interface MsgCloseLease { - $type: 'akash.market.v1beta2.MsgCloseLease'; + $type: "akash.market.v1beta2.MsgCloseLease"; leaseId: LeaseID | undefined; } /** MsgCloseLeaseResponse defines the Msg/CloseLease response type. */ export interface MsgCloseLeaseResponse { - $type: 'akash.market.v1beta2.MsgCloseLeaseResponse'; + $type: "akash.market.v1beta2.MsgCloseLeaseResponse"; } function createBaseLeaseID(): LeaseID { - return { - $type: 'akash.market.v1beta2.LeaseID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta2.LeaseID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const LeaseID = { - $type: 'akash.market.v1beta2.LeaseID' as const, + $type: "akash.market.v1beta2.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -149,15 +139,14 @@ export const LeaseID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseID(); while (reader.pos < end) { @@ -210,19 +199,17 @@ export const LeaseID = { fromJSON(object: any): LeaseID { return { $type: LeaseID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -234,7 +221,7 @@ export const LeaseID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -245,14 +232,11 @@ export const LeaseID = { }, fromPartial(object: DeepPartial): LeaseID { const message = createBaseLeaseID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -261,7 +245,7 @@ messageTypeRegistry.set(LeaseID.$type, LeaseID); function createBaseLease(): Lease { return { - $type: 'akash.market.v1beta2.Lease', + $type: "akash.market.v1beta2.Lease", leaseId: undefined, state: 0, price: undefined, @@ -271,7 +255,7 @@ function createBaseLease(): Lease { } export const Lease = { - $type: 'akash.market.v1beta2.Lease' as const, + $type: "akash.market.v1beta2.Lease" as const, encode(message: Lease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { @@ -293,8 +277,7 @@ export const Lease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Lease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLease(); while (reader.pos < end) { @@ -347,17 +330,11 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO, }; }, @@ -386,23 +363,19 @@ export const Lease = { }, fromPartial(object: DeepPartial): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; + message.closedOn = (object.closedOn !== undefined && object.closedOn !== null) + ? Long.fromValue(object.closedOn) + : Long.ZERO; return message; }, }; @@ -411,24 +384,21 @@ messageTypeRegistry.set(Lease.$type, Lease); function createBaseLeaseFilters(): LeaseFilters { return { - $type: 'akash.market.v1beta2.LeaseFilters', - owner: '', + $type: "akash.market.v1beta2.LeaseFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const LeaseFilters = { - $type: 'akash.market.v1beta2.LeaseFilters' as const, + $type: "akash.market.v1beta2.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -440,18 +410,17 @@ export const LeaseFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseFilters(); while (reader.pos < end) { @@ -511,20 +480,18 @@ export const LeaseFilters = { fromJSON(object: any): LeaseFilters { return { $type: LeaseFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -536,10 +503,10 @@ export const LeaseFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -550,15 +517,12 @@ export const LeaseFilters = { }, fromPartial(object: DeepPartial): LeaseFilters { const message = createBaseLeaseFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; @@ -566,16 +530,13 @@ export const LeaseFilters = { messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); function createBaseMsgCreateLease(): MsgCreateLease { - return { $type: 'akash.market.v1beta2.MsgCreateLease', bidId: undefined }; + return { $type: "akash.market.v1beta2.MsgCreateLease", bidId: undefined }; } export const MsgCreateLease = { - $type: 'akash.market.v1beta2.MsgCreateLease' as const, + $type: "akash.market.v1beta2.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -583,8 +544,7 @@ export const MsgCreateLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLease(); while (reader.pos < end) { @@ -607,10 +567,7 @@ export const MsgCreateLease = { }, fromJSON(object: any): MsgCreateLease { - return { - $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCreateLease.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { @@ -626,10 +583,7 @@ export const MsgCreateLease = { }, fromPartial(object: DeepPartial): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -637,25 +591,18 @@ export const MsgCreateLease = { messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { - return { $type: 'akash.market.v1beta2.MsgCreateLeaseResponse' }; + return { $type: "akash.market.v1beta2.MsgCreateLeaseResponse" }; } export const MsgCreateLeaseResponse = { - $type: 'akash.market.v1beta2.MsgCreateLeaseResponse' as const, + $type: "akash.market.v1beta2.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); while (reader.pos < end) { @@ -691,16 +638,13 @@ export const MsgCreateLeaseResponse = { messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); function createBaseMsgWithdrawLease(): MsgWithdrawLease { - return { $type: 'akash.market.v1beta2.MsgWithdrawLease', bidId: undefined }; + return { $type: "akash.market.v1beta2.MsgWithdrawLease", bidId: undefined }; } export const MsgWithdrawLease = { - $type: 'akash.market.v1beta2.MsgWithdrawLease' as const, + $type: "akash.market.v1beta2.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -708,8 +652,7 @@ export const MsgWithdrawLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLease(); while (reader.pos < end) { @@ -732,10 +675,7 @@ export const MsgWithdrawLease = { }, fromJSON(object: any): MsgWithdrawLease { - return { - $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgWithdrawLease.$type, bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { @@ -751,10 +691,9 @@ export const MsgWithdrawLease = { }, fromPartial(object: DeepPartial): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) + ? LeaseID.fromPartial(object.bidId) + : undefined; return message; }, }; @@ -762,25 +701,18 @@ export const MsgWithdrawLease = { messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { - return { $type: 'akash.market.v1beta2.MsgWithdrawLeaseResponse' }; + return { $type: "akash.market.v1beta2.MsgWithdrawLeaseResponse" }; } export const MsgWithdrawLeaseResponse = { - $type: 'akash.market.v1beta2.MsgWithdrawLeaseResponse' as const, + $type: "akash.market.v1beta2.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgWithdrawLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); while (reader.pos < end) { @@ -804,35 +736,25 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgWithdrawLeaseResponse { + create(base?: DeepPartial): MsgWithdrawLeaseResponse { return MsgWithdrawLeaseResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgWithdrawLeaseResponse { + fromPartial(_: DeepPartial): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; }, }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse, -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { - return { $type: 'akash.market.v1beta2.MsgCloseLease', leaseId: undefined }; + return { $type: "akash.market.v1beta2.MsgCloseLease", leaseId: undefined }; } export const MsgCloseLease = { - $type: 'akash.market.v1beta2.MsgCloseLease' as const, + $type: "akash.market.v1beta2.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -840,8 +762,7 @@ export const MsgCloseLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLease(); while (reader.pos < end) { @@ -866,9 +787,7 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, }; }, @@ -885,10 +804,9 @@ export const MsgCloseLease = { }, fromPartial(object: DeepPartial): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; return message; }, }; @@ -896,25 +814,18 @@ export const MsgCloseLease = { messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { - return { $type: 'akash.market.v1beta2.MsgCloseLeaseResponse' }; + return { $type: "akash.market.v1beta2.MsgCloseLeaseResponse" }; } export const MsgCloseLeaseResponse = { - $type: 'akash.market.v1beta2.MsgCloseLeaseResponse' as const, + $type: "akash.market.v1beta2.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); while (reader.pos < end) { @@ -949,26 +860,13 @@ export const MsgCloseLeaseResponse = { messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/order.ts b/ts/src/generated/akash/market/v1beta2/order.ts index 2e572ba7..2e347006 100644 --- a/ts/src/generated/akash/market/v1beta2/order.ts +++ b/ts/src/generated/akash/market/v1beta2/order.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupSpec } from '../../deployment/v1beta2/groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupSpec } from "../../deployment/v1beta2/groupspec"; /** OrderID stores owner and all other seq numbers */ export interface OrderID { - $type: 'akash.market.v1beta2.OrderID'; + $type: "akash.market.v1beta2.OrderID"; owner: string; dseq: Long; gseq: number; @@ -15,7 +15,7 @@ export interface OrderID { /** Order stores orderID, state of order and other details */ export interface Order { - $type: 'akash.market.v1beta2.Order'; + $type: "akash.market.v1beta2.Order"; orderId: OrderID | undefined; state: Order_State; spec: GroupSpec | undefined; @@ -38,19 +38,19 @@ export enum Order_State { export function order_StateFromJSON(object: any): Order_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Order_State.invalid; case 1: - case 'open': + case "open": return Order_State.open; case 2: - case 'active': + case "active": return Order_State.active; case 3: - case 'closed': + case "closed": return Order_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Order_State.UNRECOGNIZED; } @@ -59,22 +59,22 @@ export function order_StateFromJSON(object: any): Order_State { export function order_StateToJSON(object: Order_State): string { switch (object) { case Order_State.invalid: - return 'invalid'; + return "invalid"; case Order_State.open: - return 'open'; + return "open"; case Order_State.active: - return 'active'; + return "active"; case Order_State.closed: - return 'closed'; + return "closed"; case Order_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** OrderFilters defines flags for order list filter */ export interface OrderFilters { - $type: 'akash.market.v1beta2.OrderFilters'; + $type: "akash.market.v1beta2.OrderFilters"; owner: string; dseq: Long; gseq: number; @@ -83,23 +83,14 @@ export interface OrderFilters { } function createBaseOrderID(): OrderID { - return { - $type: 'akash.market.v1beta2.OrderID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - }; + return { $type: "akash.market.v1beta2.OrderID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0 }; } export const OrderID = { - $type: 'akash.market.v1beta2.OrderID' as const, + $type: "akash.market.v1beta2.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -115,8 +106,7 @@ export const OrderID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderID(); while (reader.pos < end) { @@ -162,7 +152,7 @@ export const OrderID = { fromJSON(object: any): OrderID { return { $type: OrderID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, @@ -171,7 +161,7 @@ export const OrderID = { toJSON(message: OrderID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -191,11 +181,8 @@ export const OrderID = { }, fromPartial(object: DeepPartial): OrderID { const message = createBaseOrderID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; @@ -205,17 +192,11 @@ export const OrderID = { messageTypeRegistry.set(OrderID.$type, OrderID); function createBaseOrder(): Order { - return { - $type: 'akash.market.v1beta2.Order', - orderId: undefined, - state: 0, - spec: undefined, - createdAt: Long.ZERO, - }; + return { $type: "akash.market.v1beta2.Order", orderId: undefined, state: 0, spec: undefined, createdAt: Long.ZERO }; } export const Order = { - $type: 'akash.market.v1beta2.Order' as const, + $type: "akash.market.v1beta2.Order" as const, encode(message: Order, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.orderId !== undefined) { @@ -234,8 +215,7 @@ export const Order = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Order { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrder(); while (reader.pos < end) { @@ -281,14 +261,10 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -314,19 +290,14 @@ export const Order = { }, fromPartial(object: DeepPartial): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = (object.orderId !== undefined && object.orderId !== null) + ? OrderID.fromPartial(object.orderId) + : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = (object.spec !== undefined && object.spec !== null) ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -334,24 +305,14 @@ export const Order = { messageTypeRegistry.set(Order.$type, Order); function createBaseOrderFilters(): OrderFilters { - return { - $type: 'akash.market.v1beta2.OrderFilters', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - state: '', - }; + return { $type: "akash.market.v1beta2.OrderFilters", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, state: "" }; } export const OrderFilters = { - $type: 'akash.market.v1beta2.OrderFilters' as const, + $type: "akash.market.v1beta2.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -363,15 +324,14 @@ export const OrderFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderFilters(); while (reader.pos < end) { @@ -424,17 +384,17 @@ export const OrderFilters = { fromJSON(object: any): OrderFilters { return { $type: OrderFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -446,7 +406,7 @@ export const OrderFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -457,40 +417,24 @@ export const OrderFilters = { }, fromPartial(object: DeepPartial): OrderFilters { const message = createBaseOrderFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.state = object.state ?? ''; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/params.ts b/ts/src/generated/akash/market/v1beta2/params.ts index 0f5fe302..15e5a524 100644 --- a/ts/src/generated/akash/market/v1beta2/params.ts +++ b/ts/src/generated/akash/market/v1beta2/params.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params is the params for the x/market module */ export interface Params { - $type: 'akash.market.v1beta2.Params'; + $type: "akash.market.v1beta2.Params"; bidMinDeposit: Coin | undefined; orderMaxBids: number; } function createBaseParams(): Params { - return { - $type: 'akash.market.v1beta2.Params', - bidMinDeposit: undefined, - orderMaxBids: 0, - }; + return { $type: "akash.market.v1beta2.Params", bidMinDeposit: undefined, orderMaxBids: 0 }; } export const Params = { - $type: 'akash.market.v1beta2.Params' as const, + $type: "akash.market.v1beta2.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const Params = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -69,12 +61,8 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? globalThis.Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? globalThis.Number(object.orderMaxBids) : 0, }; }, @@ -94,10 +82,9 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = (object.bidMinDeposit !== undefined && object.bidMinDeposit !== null) + ? Coin.fromPartial(object.bidMinDeposit) + : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; }, @@ -105,26 +92,13 @@ export const Params = { messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/query.ts b/ts/src/generated/akash/market/v1beta2/query.ts index c5765b13..3e544a4e 100644 --- a/ts/src/generated/akash/market/v1beta2/query.ts +++ b/ts/src/generated/akash/market/v1beta2/query.ts @@ -1,111 +1,101 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from '../../escrow/v1beta2/types'; -import { Bid, BidFilters, BidID } from './bid'; -import { Lease, LeaseFilters, LeaseID } from './lease'; -import { Order, OrderFilters, OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "../../escrow/v1beta2/types"; +import { Bid, BidFilters, BidID } from "./bid"; +import { Lease, LeaseFilters, LeaseID } from "./lease"; +import { Order, OrderFilters, OrderID } from "./order"; /** QueryOrdersRequest is request type for the Query/Orders RPC method */ export interface QueryOrdersRequest { - $type: 'akash.market.v1beta2.QueryOrdersRequest'; + $type: "akash.market.v1beta2.QueryOrdersRequest"; filters: OrderFilters | undefined; pagination: PageRequest | undefined; } /** QueryOrdersResponse is response type for the Query/Orders RPC method */ export interface QueryOrdersResponse { - $type: 'akash.market.v1beta2.QueryOrdersResponse'; + $type: "akash.market.v1beta2.QueryOrdersResponse"; orders: Order[]; pagination: PageResponse | undefined; } /** QueryOrderRequest is request type for the Query/Order RPC method */ export interface QueryOrderRequest { - $type: 'akash.market.v1beta2.QueryOrderRequest'; + $type: "akash.market.v1beta2.QueryOrderRequest"; id: OrderID | undefined; } /** QueryOrderResponse is response type for the Query/Order RPC method */ export interface QueryOrderResponse { - $type: 'akash.market.v1beta2.QueryOrderResponse'; + $type: "akash.market.v1beta2.QueryOrderResponse"; order: Order | undefined; } /** QueryBidsRequest is request type for the Query/Bids RPC method */ export interface QueryBidsRequest { - $type: 'akash.market.v1beta2.QueryBidsRequest'; + $type: "akash.market.v1beta2.QueryBidsRequest"; filters: BidFilters | undefined; pagination: PageRequest | undefined; } /** QueryBidsResponse is response type for the Query/Bids RPC method */ export interface QueryBidsResponse { - $type: 'akash.market.v1beta2.QueryBidsResponse'; + $type: "akash.market.v1beta2.QueryBidsResponse"; bids: QueryBidResponse[]; pagination: PageResponse | undefined; } /** QueryBidRequest is request type for the Query/Bid RPC method */ export interface QueryBidRequest { - $type: 'akash.market.v1beta2.QueryBidRequest'; + $type: "akash.market.v1beta2.QueryBidRequest"; id: BidID | undefined; } /** QueryBidResponse is response type for the Query/Bid RPC method */ export interface QueryBidResponse { - $type: 'akash.market.v1beta2.QueryBidResponse'; + $type: "akash.market.v1beta2.QueryBidResponse"; bid: Bid | undefined; escrowAccount: Account | undefined; } /** QueryLeasesRequest is request type for the Query/Leases RPC method */ export interface QueryLeasesRequest { - $type: 'akash.market.v1beta2.QueryLeasesRequest'; + $type: "akash.market.v1beta2.QueryLeasesRequest"; filters: LeaseFilters | undefined; pagination: PageRequest | undefined; } /** QueryLeasesResponse is response type for the Query/Leases RPC method */ export interface QueryLeasesResponse { - $type: 'akash.market.v1beta2.QueryLeasesResponse'; + $type: "akash.market.v1beta2.QueryLeasesResponse"; leases: QueryLeaseResponse[]; pagination: PageResponse | undefined; } /** QueryLeaseRequest is request type for the Query/Lease RPC method */ export interface QueryLeaseRequest { - $type: 'akash.market.v1beta2.QueryLeaseRequest'; + $type: "akash.market.v1beta2.QueryLeaseRequest"; id: LeaseID | undefined; } /** QueryLeaseResponse is response type for the Query/Lease RPC method */ export interface QueryLeaseResponse { - $type: 'akash.market.v1beta2.QueryLeaseResponse'; + $type: "akash.market.v1beta2.QueryLeaseResponse"; lease: Lease | undefined; escrowPayment: FractionalPayment | undefined; } function createBaseQueryOrdersRequest(): QueryOrdersRequest { - return { - $type: 'akash.market.v1beta2.QueryOrdersRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryOrdersRequest", filters: undefined, pagination: undefined }; } export const QueryOrdersRequest = { - $type: 'akash.market.v1beta2.QueryOrdersRequest' as const, + $type: "akash.market.v1beta2.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -116,8 +106,7 @@ export const QueryOrdersRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersRequest(); while (reader.pos < end) { @@ -149,12 +138,8 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -174,14 +159,12 @@ export const QueryOrdersRequest = { }, fromPartial(object: DeepPartial): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? OrderFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -189,35 +172,24 @@ export const QueryOrdersRequest = { messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); function createBaseQueryOrdersResponse(): QueryOrdersResponse { - return { - $type: 'akash.market.v1beta2.QueryOrdersResponse', - orders: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryOrdersResponse", orders: [], pagination: undefined }; } export const QueryOrdersResponse = { - $type: 'akash.market.v1beta2.QueryOrdersResponse' as const, + $type: "akash.market.v1beta2.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersResponse(); while (reader.pos < end) { @@ -249,12 +221,8 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -275,10 +243,9 @@ export const QueryOrdersResponse = { fromPartial(object: DeepPartial): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -286,16 +253,13 @@ export const QueryOrdersResponse = { messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); function createBaseQueryOrderRequest(): QueryOrderRequest { - return { $type: 'akash.market.v1beta2.QueryOrderRequest', id: undefined }; + return { $type: "akash.market.v1beta2.QueryOrderRequest", id: undefined }; } export const QueryOrderRequest = { - $type: 'akash.market.v1beta2.QueryOrderRequest' as const, + $type: "akash.market.v1beta2.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -303,8 +267,7 @@ export const QueryOrderRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderRequest(); while (reader.pos < end) { @@ -327,10 +290,7 @@ export const QueryOrderRequest = { }, fromJSON(object: any): QueryOrderRequest { - return { - $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, - }; + return { $type: QueryOrderRequest.$type, id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { @@ -346,10 +306,7 @@ export const QueryOrderRequest = { }, fromPartial(object: DeepPartial): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? OrderID.fromPartial(object.id) : undefined; return message; }, }; @@ -357,16 +314,13 @@ export const QueryOrderRequest = { messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); function createBaseQueryOrderResponse(): QueryOrderResponse { - return { $type: 'akash.market.v1beta2.QueryOrderResponse', order: undefined }; + return { $type: "akash.market.v1beta2.QueryOrderResponse", order: undefined }; } export const QueryOrderResponse = { - $type: 'akash.market.v1beta2.QueryOrderResponse' as const, + $type: "akash.market.v1beta2.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -374,8 +328,7 @@ export const QueryOrderResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderResponse(); while (reader.pos < end) { @@ -398,10 +351,7 @@ export const QueryOrderResponse = { }, fromJSON(object: any): QueryOrderResponse { - return { - $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, - }; + return { $type: QueryOrderResponse.$type, order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { @@ -417,10 +367,7 @@ export const QueryOrderResponse = { }, fromPartial(object: DeepPartial): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = (object.order !== undefined && object.order !== null) ? Order.fromPartial(object.order) : undefined; return message; }, }; @@ -428,20 +375,13 @@ export const QueryOrderResponse = { messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); function createBaseQueryBidsRequest(): QueryBidsRequest { - return { - $type: 'akash.market.v1beta2.QueryBidsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryBidsRequest", filters: undefined, pagination: undefined }; } export const QueryBidsRequest = { - $type: 'akash.market.v1beta2.QueryBidsRequest' as const, + $type: "akash.market.v1beta2.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -452,8 +392,7 @@ export const QueryBidsRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsRequest(); while (reader.pos < end) { @@ -485,12 +424,8 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -510,14 +445,12 @@ export const QueryBidsRequest = { }, fromPartial(object: DeepPartial): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? BidFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -525,35 +458,24 @@ export const QueryBidsRequest = { messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); function createBaseQueryBidsResponse(): QueryBidsResponse { - return { - $type: 'akash.market.v1beta2.QueryBidsResponse', - bids: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryBidsResponse", bids: [], pagination: undefined }; } export const QueryBidsResponse = { - $type: 'akash.market.v1beta2.QueryBidsResponse' as const, + $type: "akash.market.v1beta2.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsResponse(); while (reader.pos < end) { @@ -585,12 +507,8 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: globalThis.Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: globalThis.Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -610,12 +528,10 @@ export const QueryBidsResponse = { }, fromPartial(object: DeepPartial): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -623,16 +539,13 @@ export const QueryBidsResponse = { messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); function createBaseQueryBidRequest(): QueryBidRequest { - return { $type: 'akash.market.v1beta2.QueryBidRequest', id: undefined }; + return { $type: "akash.market.v1beta2.QueryBidRequest", id: undefined }; } export const QueryBidRequest = { - $type: 'akash.market.v1beta2.QueryBidRequest' as const, + $type: "akash.market.v1beta2.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -640,8 +553,7 @@ export const QueryBidRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidRequest(); while (reader.pos < end) { @@ -664,10 +576,7 @@ export const QueryBidRequest = { }, fromJSON(object: any): QueryBidRequest { - return { - $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, - }; + return { $type: QueryBidRequest.$type, id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { @@ -683,10 +592,7 @@ export const QueryBidRequest = { }, fromPartial(object: DeepPartial): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? BidID.fromPartial(object.id) : undefined; return message; }, }; @@ -694,20 +600,13 @@ export const QueryBidRequest = { messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); function createBaseQueryBidResponse(): QueryBidResponse { - return { - $type: 'akash.market.v1beta2.QueryBidResponse', - bid: undefined, - escrowAccount: undefined, - }; + return { $type: "akash.market.v1beta2.QueryBidResponse", bid: undefined, escrowAccount: undefined }; } export const QueryBidResponse = { - $type: 'akash.market.v1beta2.QueryBidResponse' as const, + $type: "akash.market.v1beta2.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -718,8 +617,7 @@ export const QueryBidResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidResponse(); while (reader.pos < end) { @@ -752,9 +650,7 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -774,14 +670,10 @@ export const QueryBidResponse = { }, fromPartial(object: DeepPartial): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = (object.bid !== undefined && object.bid !== null) ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -789,20 +681,13 @@ export const QueryBidResponse = { messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); function createBaseQueryLeasesRequest(): QueryLeasesRequest { - return { - $type: 'akash.market.v1beta2.QueryLeasesRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryLeasesRequest", filters: undefined, pagination: undefined }; } export const QueryLeasesRequest = { - $type: 'akash.market.v1beta2.QueryLeasesRequest' as const, + $type: "akash.market.v1beta2.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -813,8 +698,7 @@ export const QueryLeasesRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesRequest(); while (reader.pos < end) { @@ -846,12 +730,8 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -871,14 +751,12 @@ export const QueryLeasesRequest = { }, fromPartial(object: DeepPartial): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? LeaseFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -886,35 +764,24 @@ export const QueryLeasesRequest = { messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); function createBaseQueryLeasesResponse(): QueryLeasesResponse { - return { - $type: 'akash.market.v1beta2.QueryLeasesResponse', - leases: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta2.QueryLeasesResponse", leases: [], pagination: undefined }; } export const QueryLeasesResponse = { - $type: 'akash.market.v1beta2.QueryLeasesResponse' as const, + $type: "akash.market.v1beta2.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesResponse(); while (reader.pos < end) { @@ -925,9 +792,7 @@ export const QueryLeasesResponse = { break; } - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()), - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -951,9 +816,7 @@ export const QueryLeasesResponse = { leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -973,12 +836,10 @@ export const QueryLeasesResponse = { }, fromPartial(object: DeepPartial): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -986,16 +847,13 @@ export const QueryLeasesResponse = { messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); function createBaseQueryLeaseRequest(): QueryLeaseRequest { - return { $type: 'akash.market.v1beta2.QueryLeaseRequest', id: undefined }; + return { $type: "akash.market.v1beta2.QueryLeaseRequest", id: undefined }; } export const QueryLeaseRequest = { - $type: 'akash.market.v1beta2.QueryLeaseRequest' as const, + $type: "akash.market.v1beta2.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -1003,8 +861,7 @@ export const QueryLeaseRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseRequest(); while (reader.pos < end) { @@ -1027,10 +884,7 @@ export const QueryLeaseRequest = { }, fromJSON(object: any): QueryLeaseRequest { - return { - $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, - }; + return { $type: QueryLeaseRequest.$type, id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { @@ -1046,10 +900,7 @@ export const QueryLeaseRequest = { }, fromPartial(object: DeepPartial): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? LeaseID.fromPartial(object.id) : undefined; return message; }, }; @@ -1057,35 +908,24 @@ export const QueryLeaseRequest = { messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); function createBaseQueryLeaseResponse(): QueryLeaseResponse { - return { - $type: 'akash.market.v1beta2.QueryLeaseResponse', - lease: undefined, - escrowPayment: undefined, - }; + return { $type: "akash.market.v1beta2.QueryLeaseResponse", lease: undefined, escrowPayment: undefined }; } export const QueryLeaseResponse = { - $type: 'akash.market.v1beta2.QueryLeaseResponse' as const, + $type: "akash.market.v1beta2.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork(), - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseResponse(); while (reader.pos < end) { @@ -1103,10 +943,7 @@ export const QueryLeaseResponse = { break; } - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32(), - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1121,9 +958,7 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined, }; }, @@ -1143,14 +978,10 @@ export const QueryLeaseResponse = { }, fromPartial(object: DeepPartial): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; - message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + message.lease = (object.lease !== undefined && object.lease !== null) ? Lease.fromPartial(object.lease) : undefined; + message.escrowPayment = (object.escrowPayment !== undefined && object.escrowPayment !== null) + ? FractionalPayment.fromPartial(object.escrowPayment) + : undefined; return message; }, }; @@ -1173,7 +1004,7 @@ export interface Query { Lease(request: QueryLeaseRequest): Promise; } -export const QueryServiceName = 'akash.market.v1beta2.Query'; +export const QueryServiceName = "akash.market.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -1189,81 +1020,52 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Orders', data); - return promise.then((data) => - QueryOrdersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Orders", data); + return promise.then((data) => QueryOrdersResponse.decode(_m0.Reader.create(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Order', data); - return promise.then((data) => - QueryOrderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Order", data); + return promise.then((data) => QueryOrderResponse.decode(_m0.Reader.create(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bids', data); - return promise.then((data) => - QueryBidsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bids", data); + return promise.then((data) => QueryBidsResponse.decode(_m0.Reader.create(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bid', data); - return promise.then((data) => - QueryBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bid", data); + return promise.then((data) => QueryBidResponse.decode(_m0.Reader.create(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Leases', data); - return promise.then((data) => - QueryLeasesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Leases", data); + return promise.then((data) => QueryLeasesResponse.decode(_m0.Reader.create(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Lease', data); - return promise.then((data) => - QueryLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Lease", data); + return promise.then((data) => QueryLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta2/service.ts b/ts/src/generated/akash/market/v1beta2/service.ts index af5baa23..082c18ea 100644 --- a/ts/src/generated/akash/market/v1beta2/service.ts +++ b/ts/src/generated/akash/market/v1beta2/service.ts @@ -1,11 +1,6 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; -import { - MsgCloseBid, - MsgCloseBidResponse, - MsgCreateBid, - MsgCreateBidResponse, -} from './bid'; +import _m0 from "protobufjs/minimal"; +import { MsgCloseBid, MsgCloseBidResponse, MsgCreateBid, MsgCreateBidResponse } from "./bid"; import { MsgCloseLease, MsgCloseLeaseResponse, @@ -13,7 +8,7 @@ import { MsgCreateLeaseResponse, MsgWithdrawLease, MsgWithdrawLeaseResponse, -} from './lease'; +} from "./lease"; /** Msg defines the market Msg service */ export interface Msg { @@ -29,7 +24,7 @@ export interface Msg { CloseLease(request: MsgCloseLease): Promise; } -export const MsgServiceName = 'akash.market.v1beta2.Msg'; +export const MsgServiceName = "akash.market.v1beta2.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -44,49 +39,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateBid', data); - return promise.then((data) => - MsgCreateBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateBid", data); + return promise.then((data) => MsgCreateBidResponse.decode(_m0.Reader.create(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseBid', data); - return promise.then((data) => - MsgCloseBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseBid", data); + return promise.then((data) => MsgCloseBidResponse.decode(_m0.Reader.create(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'WithdrawLease', data); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "WithdrawLease", data); + return promise.then((data) => MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateLease', data); - return promise.then((data) => - MsgCreateLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateLease", data); + return promise.then((data) => MsgCreateLeaseResponse.decode(_m0.Reader.create(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseLease', data); - return promise.then((data) => - MsgCloseLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseLease", data); + return promise.then((data) => MsgCloseLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/akash/market/v1beta3/bid.ts b/ts/src/generated/akash/market/v1beta3/bid.ts index 10e12c1b..811d17ad 100644 --- a/ts/src/generated/akash/market/v1beta3/bid.ts +++ b/ts/src/generated/akash/market/v1beta3/bid.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin, DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { OrderID } from "./order"; /** MsgCreateBid defines an SDK message for creating Bid */ export interface MsgCreateBid { - $type: 'akash.market.v1beta3.MsgCreateBid'; + $type: "akash.market.v1beta3.MsgCreateBid"; order: OrderID | undefined; provider: string; price: DecCoin | undefined; @@ -16,18 +16,18 @@ export interface MsgCreateBid { /** MsgCreateBidResponse defines the Msg/CreateBid response type. */ export interface MsgCreateBidResponse { - $type: 'akash.market.v1beta3.MsgCreateBidResponse'; + $type: "akash.market.v1beta3.MsgCreateBidResponse"; } /** MsgCloseBid defines an SDK message for closing bid */ export interface MsgCloseBid { - $type: 'akash.market.v1beta3.MsgCloseBid'; + $type: "akash.market.v1beta3.MsgCloseBid"; bidId: BidID | undefined; } /** MsgCloseBidResponse defines the Msg/CloseBid response type. */ export interface MsgCloseBidResponse { - $type: 'akash.market.v1beta3.MsgCloseBidResponse'; + $type: "akash.market.v1beta3.MsgCloseBidResponse"; } /** @@ -35,7 +35,7 @@ export interface MsgCloseBidResponse { * A successful bid becomes a Lease(ID). */ export interface BidID { - $type: 'akash.market.v1beta3.BidID'; + $type: "akash.market.v1beta3.BidID"; owner: string; dseq: Long; gseq: number; @@ -45,7 +45,7 @@ export interface BidID { /** Bid stores BidID, state of bid and price */ export interface Bid { - $type: 'akash.market.v1beta3.Bid'; + $type: "akash.market.v1beta3.Bid"; bidId: BidID | undefined; state: Bid_State; price: DecCoin | undefined; @@ -70,22 +70,22 @@ export enum Bid_State { export function bid_StateFromJSON(object: any): Bid_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Bid_State.invalid; case 1: - case 'open': + case "open": return Bid_State.open; case 2: - case 'active': + case "active": return Bid_State.active; case 3: - case 'lost': + case "lost": return Bid_State.lost; case 4: - case 'closed': + case "closed": return Bid_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Bid_State.UNRECOGNIZED; } @@ -94,24 +94,24 @@ export function bid_StateFromJSON(object: any): Bid_State { export function bid_StateToJSON(object: Bid_State): string { switch (object) { case Bid_State.invalid: - return 'invalid'; + return "invalid"; case Bid_State.open: - return 'open'; + return "open"; case Bid_State.active: - return 'active'; + return "active"; case Bid_State.lost: - return 'lost'; + return "lost"; case Bid_State.closed: - return 'closed'; + return "closed"; case Bid_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** BidFilters defines flags for bid list filter */ export interface BidFilters { - $type: 'akash.market.v1beta3.BidFilters'; + $type: "akash.market.v1beta3.BidFilters"; owner: string; dseq: Long; gseq: number; @@ -122,25 +122,22 @@ export interface BidFilters { function createBaseMsgCreateBid(): MsgCreateBid { return { - $type: 'akash.market.v1beta3.MsgCreateBid', + $type: "akash.market.v1beta3.MsgCreateBid", order: undefined, - provider: '', + provider: "", price: undefined, deposit: undefined, }; } export const MsgCreateBid = { - $type: 'akash.market.v1beta3.MsgCreateBid' as const, + $type: "akash.market.v1beta3.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(18).string(message.provider); } if (message.price !== undefined) { @@ -153,8 +150,7 @@ export const MsgCreateBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBid(); while (reader.pos < end) { @@ -201,13 +197,9 @@ export const MsgCreateBid = { return { $type: MsgCreateBid.$type, order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, }; }, @@ -216,7 +208,7 @@ export const MsgCreateBid = { if (message.order !== undefined) { obj.order = OrderID.toJSON(message.order); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } if (message.price !== undefined) { @@ -233,19 +225,16 @@ export const MsgCreateBid = { }, fromPartial(object: DeepPartial): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; - message.provider = object.provider ?? ''; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; + message.order = (object.order !== undefined && object.order !== null) + ? OrderID.fromPartial(object.order) + : undefined; + message.provider = object.provider ?? ""; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; return message; }, }; @@ -253,25 +242,18 @@ export const MsgCreateBid = { messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { - return { $type: 'akash.market.v1beta3.MsgCreateBidResponse' }; + return { $type: "akash.market.v1beta3.MsgCreateBidResponse" }; } export const MsgCreateBidResponse = { - $type: 'akash.market.v1beta3.MsgCreateBidResponse' as const, + $type: "akash.market.v1beta3.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); while (reader.pos < end) { @@ -307,16 +289,13 @@ export const MsgCreateBidResponse = { messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); function createBaseMsgCloseBid(): MsgCloseBid { - return { $type: 'akash.market.v1beta3.MsgCloseBid', bidId: undefined }; + return { $type: "akash.market.v1beta3.MsgCloseBid", bidId: undefined }; } export const MsgCloseBid = { - $type: 'akash.market.v1beta3.MsgCloseBid' as const, + $type: "akash.market.v1beta3.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -324,8 +303,7 @@ export const MsgCloseBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBid(); while (reader.pos < end) { @@ -348,10 +326,7 @@ export const MsgCloseBid = { }, fromJSON(object: any): MsgCloseBid { - return { - $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCloseBid.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { @@ -367,10 +342,7 @@ export const MsgCloseBid = { }, fromPartial(object: DeepPartial): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -378,22 +350,18 @@ export const MsgCloseBid = { messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { - return { $type: 'akash.market.v1beta3.MsgCloseBidResponse' }; + return { $type: "akash.market.v1beta3.MsgCloseBidResponse" }; } export const MsgCloseBidResponse = { - $type: 'akash.market.v1beta3.MsgCloseBidResponse' as const, + $type: "akash.market.v1beta3.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBidResponse(); while (reader.pos < end) { @@ -429,21 +397,14 @@ export const MsgCloseBidResponse = { messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); function createBaseBidID(): BidID { - return { - $type: 'akash.market.v1beta3.BidID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta3.BidID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const BidID = { - $type: 'akash.market.v1beta3.BidID' as const, + $type: "akash.market.v1beta3.BidID" as const, encode(message: BidID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -455,15 +416,14 @@ export const BidID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidID(); while (reader.pos < end) { @@ -516,19 +476,17 @@ export const BidID = { fromJSON(object: any): BidID { return { $type: BidID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: BidID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -540,7 +498,7 @@ export const BidID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -551,14 +509,11 @@ export const BidID = { }, fromPartial(object: DeepPartial): BidID { const message = createBaseBidID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -566,17 +521,11 @@ export const BidID = { messageTypeRegistry.set(BidID.$type, BidID); function createBaseBid(): Bid { - return { - $type: 'akash.market.v1beta3.Bid', - bidId: undefined, - state: 0, - price: undefined, - createdAt: Long.ZERO, - }; + return { $type: "akash.market.v1beta3.Bid", bidId: undefined, state: 0, price: undefined, createdAt: Long.ZERO }; } export const Bid = { - $type: 'akash.market.v1beta3.Bid' as const, + $type: "akash.market.v1beta3.Bid" as const, encode(message: Bid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { @@ -595,8 +544,7 @@ export const Bid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Bid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBid(); while (reader.pos < end) { @@ -645,9 +593,7 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -673,19 +619,14 @@ export const Bid = { }, fromPartial(object: DeepPartial): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -694,24 +635,21 @@ messageTypeRegistry.set(Bid.$type, Bid); function createBaseBidFilters(): BidFilters { return { - $type: 'akash.market.v1beta3.BidFilters', - owner: '', + $type: "akash.market.v1beta3.BidFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const BidFilters = { - $type: 'akash.market.v1beta3.BidFilters' as const, + $type: "akash.market.v1beta3.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -723,18 +661,17 @@ export const BidFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidFilters(); while (reader.pos < end) { @@ -794,20 +731,18 @@ export const BidFilters = { fromJSON(object: any): BidFilters { return { $type: BidFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -819,10 +754,10 @@ export const BidFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -833,41 +768,25 @@ export const BidFilters = { }, fromPartial(object: DeepPartial): BidFilters { const message = createBaseBidFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/genesis.ts b/ts/src/generated/akash/market/v1beta3/genesis.ts index 68c6d1ed..b30d5318 100644 --- a/ts/src/generated/akash/market/v1beta3/genesis.ts +++ b/ts/src/generated/akash/market/v1beta3/genesis.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Bid } from './bid'; -import { Lease } from './lease'; -import { Order } from './order'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Bid } from "./bid"; +import { Lease } from "./lease"; +import { Order } from "./order"; +import { Params } from "./params"; /** GenesisState defines the basic genesis state used by market module */ export interface GenesisState { - $type: 'akash.market.v1beta3.GenesisState'; + $type: "akash.market.v1beta3.GenesisState"; params: Params | undefined; orders: Order[]; leases: Lease[]; @@ -17,22 +17,13 @@ export interface GenesisState { } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.market.v1beta3.GenesisState', - params: undefined, - orders: [], - leases: [], - bids: [], - }; + return { $type: "akash.market.v1beta3.GenesisState", params: undefined, orders: [], leases: [], bids: [] }; } export const GenesisState = { - $type: 'akash.market.v1beta3.GenesisState' as const, + $type: "akash.market.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -49,8 +40,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -97,15 +87,9 @@ export const GenesisState = { return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: globalThis.Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - bids: globalThis.Array.isArray(object?.bids) - ? object.bids.map((e: any) => Bid.fromJSON(e)) - : [], + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + bids: globalThis.Array.isArray(object?.bids) ? object.bids.map((e: any) => Bid.fromJSON(e)) : [], }; }, @@ -131,10 +115,9 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; message.bids = object.bids?.map((e) => Bid.fromPartial(e)) || []; @@ -144,26 +127,13 @@ export const GenesisState = { messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/lease.ts b/ts/src/generated/akash/market/v1beta3/lease.ts index ac8e963d..719455f8 100644 --- a/ts/src/generated/akash/market/v1beta3/lease.ts +++ b/ts/src/generated/akash/market/v1beta3/lease.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { BidID } from './bid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { BidID } from "./bid"; /** LeaseID stores bid details of lease */ export interface LeaseID { - $type: 'akash.market.v1beta3.LeaseID'; + $type: "akash.market.v1beta3.LeaseID"; owner: string; dseq: Long; gseq: number; @@ -17,7 +17,7 @@ export interface LeaseID { /** Lease stores LeaseID, state of lease and price */ export interface Lease { - $type: 'akash.market.v1beta3.Lease'; + $type: "akash.market.v1beta3.Lease"; leaseId: LeaseID | undefined; state: Lease_State; price: DecCoin | undefined; @@ -41,19 +41,19 @@ export enum Lease_State { export function lease_StateFromJSON(object: any): Lease_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Lease_State.invalid; case 1: - case 'active': + case "active": return Lease_State.active; case 2: - case 'insufficient_funds': + case "insufficient_funds": return Lease_State.insufficient_funds; case 3: - case 'closed': + case "closed": return Lease_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Lease_State.UNRECOGNIZED; } @@ -62,22 +62,22 @@ export function lease_StateFromJSON(object: any): Lease_State { export function lease_StateToJSON(object: Lease_State): string { switch (object) { case Lease_State.invalid: - return 'invalid'; + return "invalid"; case Lease_State.active: - return 'active'; + return "active"; case Lease_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Lease_State.closed: - return 'closed'; + return "closed"; case Lease_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** LeaseFilters defines flags for lease list filter */ export interface LeaseFilters { - $type: 'akash.market.v1beta3.LeaseFilters'; + $type: "akash.market.v1beta3.LeaseFilters"; owner: string; dseq: Long; gseq: number; @@ -88,56 +88,46 @@ export interface LeaseFilters { /** MsgCreateLease is sent to create a lease */ export interface MsgCreateLease { - $type: 'akash.market.v1beta3.MsgCreateLease'; + $type: "akash.market.v1beta3.MsgCreateLease"; bidId: BidID | undefined; } /** MsgCreateLeaseResponse is the response from creating a lease */ export interface MsgCreateLeaseResponse { - $type: 'akash.market.v1beta3.MsgCreateLeaseResponse'; + $type: "akash.market.v1beta3.MsgCreateLeaseResponse"; } /** MsgWithdrawLease defines an SDK message for closing bid */ export interface MsgWithdrawLease { - $type: 'akash.market.v1beta3.MsgWithdrawLease'; + $type: "akash.market.v1beta3.MsgWithdrawLease"; bidId: LeaseID | undefined; } /** MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. */ export interface MsgWithdrawLeaseResponse { - $type: 'akash.market.v1beta3.MsgWithdrawLeaseResponse'; + $type: "akash.market.v1beta3.MsgWithdrawLeaseResponse"; } /** MsgCloseLease defines an SDK message for closing order */ export interface MsgCloseLease { - $type: 'akash.market.v1beta3.MsgCloseLease'; + $type: "akash.market.v1beta3.MsgCloseLease"; leaseId: LeaseID | undefined; } /** MsgCloseLeaseResponse defines the Msg/CloseLease response type. */ export interface MsgCloseLeaseResponse { - $type: 'akash.market.v1beta3.MsgCloseLeaseResponse'; + $type: "akash.market.v1beta3.MsgCloseLeaseResponse"; } function createBaseLeaseID(): LeaseID { - return { - $type: 'akash.market.v1beta3.LeaseID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta3.LeaseID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const LeaseID = { - $type: 'akash.market.v1beta3.LeaseID' as const, + $type: "akash.market.v1beta3.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -149,15 +139,14 @@ export const LeaseID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseID(); while (reader.pos < end) { @@ -210,19 +199,17 @@ export const LeaseID = { fromJSON(object: any): LeaseID { return { $type: LeaseID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -234,7 +221,7 @@ export const LeaseID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -245,14 +232,11 @@ export const LeaseID = { }, fromPartial(object: DeepPartial): LeaseID { const message = createBaseLeaseID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -261,7 +245,7 @@ messageTypeRegistry.set(LeaseID.$type, LeaseID); function createBaseLease(): Lease { return { - $type: 'akash.market.v1beta3.Lease', + $type: "akash.market.v1beta3.Lease", leaseId: undefined, state: 0, price: undefined, @@ -271,7 +255,7 @@ function createBaseLease(): Lease { } export const Lease = { - $type: 'akash.market.v1beta3.Lease' as const, + $type: "akash.market.v1beta3.Lease" as const, encode(message: Lease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { @@ -293,8 +277,7 @@ export const Lease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Lease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLease(); while (reader.pos < end) { @@ -347,17 +330,11 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO, }; }, @@ -386,23 +363,19 @@ export const Lease = { }, fromPartial(object: DeepPartial): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; + message.closedOn = (object.closedOn !== undefined && object.closedOn !== null) + ? Long.fromValue(object.closedOn) + : Long.ZERO; return message; }, }; @@ -411,24 +384,21 @@ messageTypeRegistry.set(Lease.$type, Lease); function createBaseLeaseFilters(): LeaseFilters { return { - $type: 'akash.market.v1beta3.LeaseFilters', - owner: '', + $type: "akash.market.v1beta3.LeaseFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const LeaseFilters = { - $type: 'akash.market.v1beta3.LeaseFilters' as const, + $type: "akash.market.v1beta3.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -440,18 +410,17 @@ export const LeaseFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseFilters(); while (reader.pos < end) { @@ -511,20 +480,18 @@ export const LeaseFilters = { fromJSON(object: any): LeaseFilters { return { $type: LeaseFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -536,10 +503,10 @@ export const LeaseFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -550,15 +517,12 @@ export const LeaseFilters = { }, fromPartial(object: DeepPartial): LeaseFilters { const message = createBaseLeaseFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; @@ -566,16 +530,13 @@ export const LeaseFilters = { messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); function createBaseMsgCreateLease(): MsgCreateLease { - return { $type: 'akash.market.v1beta3.MsgCreateLease', bidId: undefined }; + return { $type: "akash.market.v1beta3.MsgCreateLease", bidId: undefined }; } export const MsgCreateLease = { - $type: 'akash.market.v1beta3.MsgCreateLease' as const, + $type: "akash.market.v1beta3.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -583,8 +544,7 @@ export const MsgCreateLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLease(); while (reader.pos < end) { @@ -607,10 +567,7 @@ export const MsgCreateLease = { }, fromJSON(object: any): MsgCreateLease { - return { - $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCreateLease.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { @@ -626,10 +583,7 @@ export const MsgCreateLease = { }, fromPartial(object: DeepPartial): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -637,25 +591,18 @@ export const MsgCreateLease = { messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { - return { $type: 'akash.market.v1beta3.MsgCreateLeaseResponse' }; + return { $type: "akash.market.v1beta3.MsgCreateLeaseResponse" }; } export const MsgCreateLeaseResponse = { - $type: 'akash.market.v1beta3.MsgCreateLeaseResponse' as const, + $type: "akash.market.v1beta3.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); while (reader.pos < end) { @@ -691,16 +638,13 @@ export const MsgCreateLeaseResponse = { messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); function createBaseMsgWithdrawLease(): MsgWithdrawLease { - return { $type: 'akash.market.v1beta3.MsgWithdrawLease', bidId: undefined }; + return { $type: "akash.market.v1beta3.MsgWithdrawLease", bidId: undefined }; } export const MsgWithdrawLease = { - $type: 'akash.market.v1beta3.MsgWithdrawLease' as const, + $type: "akash.market.v1beta3.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -708,8 +652,7 @@ export const MsgWithdrawLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLease(); while (reader.pos < end) { @@ -732,10 +675,7 @@ export const MsgWithdrawLease = { }, fromJSON(object: any): MsgWithdrawLease { - return { - $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgWithdrawLease.$type, bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { @@ -751,10 +691,9 @@ export const MsgWithdrawLease = { }, fromPartial(object: DeepPartial): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) + ? LeaseID.fromPartial(object.bidId) + : undefined; return message; }, }; @@ -762,25 +701,18 @@ export const MsgWithdrawLease = { messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { - return { $type: 'akash.market.v1beta3.MsgWithdrawLeaseResponse' }; + return { $type: "akash.market.v1beta3.MsgWithdrawLeaseResponse" }; } export const MsgWithdrawLeaseResponse = { - $type: 'akash.market.v1beta3.MsgWithdrawLeaseResponse' as const, + $type: "akash.market.v1beta3.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgWithdrawLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); while (reader.pos < end) { @@ -804,35 +736,25 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgWithdrawLeaseResponse { + create(base?: DeepPartial): MsgWithdrawLeaseResponse { return MsgWithdrawLeaseResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgWithdrawLeaseResponse { + fromPartial(_: DeepPartial): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; }, }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse, -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { - return { $type: 'akash.market.v1beta3.MsgCloseLease', leaseId: undefined }; + return { $type: "akash.market.v1beta3.MsgCloseLease", leaseId: undefined }; } export const MsgCloseLease = { - $type: 'akash.market.v1beta3.MsgCloseLease' as const, + $type: "akash.market.v1beta3.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -840,8 +762,7 @@ export const MsgCloseLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLease(); while (reader.pos < end) { @@ -866,9 +787,7 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, }; }, @@ -885,10 +804,9 @@ export const MsgCloseLease = { }, fromPartial(object: DeepPartial): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; return message; }, }; @@ -896,25 +814,18 @@ export const MsgCloseLease = { messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { - return { $type: 'akash.market.v1beta3.MsgCloseLeaseResponse' }; + return { $type: "akash.market.v1beta3.MsgCloseLeaseResponse" }; } export const MsgCloseLeaseResponse = { - $type: 'akash.market.v1beta3.MsgCloseLeaseResponse' as const, + $type: "akash.market.v1beta3.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); while (reader.pos < end) { @@ -949,26 +860,13 @@ export const MsgCloseLeaseResponse = { messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/order.ts b/ts/src/generated/akash/market/v1beta3/order.ts index f6d164cd..f379ada1 100644 --- a/ts/src/generated/akash/market/v1beta3/order.ts +++ b/ts/src/generated/akash/market/v1beta3/order.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupSpec } from '../../deployment/v1beta3/groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupSpec } from "../../deployment/v1beta3/groupspec"; /** OrderID stores owner and all other seq numbers */ export interface OrderID { - $type: 'akash.market.v1beta3.OrderID'; + $type: "akash.market.v1beta3.OrderID"; owner: string; dseq: Long; gseq: number; @@ -15,7 +15,7 @@ export interface OrderID { /** Order stores orderID, state of order and other details */ export interface Order { - $type: 'akash.market.v1beta3.Order'; + $type: "akash.market.v1beta3.Order"; orderId: OrderID | undefined; state: Order_State; spec: GroupSpec | undefined; @@ -38,19 +38,19 @@ export enum Order_State { export function order_StateFromJSON(object: any): Order_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Order_State.invalid; case 1: - case 'open': + case "open": return Order_State.open; case 2: - case 'active': + case "active": return Order_State.active; case 3: - case 'closed': + case "closed": return Order_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Order_State.UNRECOGNIZED; } @@ -59,22 +59,22 @@ export function order_StateFromJSON(object: any): Order_State { export function order_StateToJSON(object: Order_State): string { switch (object) { case Order_State.invalid: - return 'invalid'; + return "invalid"; case Order_State.open: - return 'open'; + return "open"; case Order_State.active: - return 'active'; + return "active"; case Order_State.closed: - return 'closed'; + return "closed"; case Order_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** OrderFilters defines flags for order list filter */ export interface OrderFilters { - $type: 'akash.market.v1beta3.OrderFilters'; + $type: "akash.market.v1beta3.OrderFilters"; owner: string; dseq: Long; gseq: number; @@ -83,23 +83,14 @@ export interface OrderFilters { } function createBaseOrderID(): OrderID { - return { - $type: 'akash.market.v1beta3.OrderID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - }; + return { $type: "akash.market.v1beta3.OrderID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0 }; } export const OrderID = { - $type: 'akash.market.v1beta3.OrderID' as const, + $type: "akash.market.v1beta3.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -115,8 +106,7 @@ export const OrderID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderID(); while (reader.pos < end) { @@ -162,7 +152,7 @@ export const OrderID = { fromJSON(object: any): OrderID { return { $type: OrderID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, @@ -171,7 +161,7 @@ export const OrderID = { toJSON(message: OrderID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -191,11 +181,8 @@ export const OrderID = { }, fromPartial(object: DeepPartial): OrderID { const message = createBaseOrderID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; @@ -205,17 +192,11 @@ export const OrderID = { messageTypeRegistry.set(OrderID.$type, OrderID); function createBaseOrder(): Order { - return { - $type: 'akash.market.v1beta3.Order', - orderId: undefined, - state: 0, - spec: undefined, - createdAt: Long.ZERO, - }; + return { $type: "akash.market.v1beta3.Order", orderId: undefined, state: 0, spec: undefined, createdAt: Long.ZERO }; } export const Order = { - $type: 'akash.market.v1beta3.Order' as const, + $type: "akash.market.v1beta3.Order" as const, encode(message: Order, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.orderId !== undefined) { @@ -234,8 +215,7 @@ export const Order = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Order { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrder(); while (reader.pos < end) { @@ -281,14 +261,10 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -314,19 +290,14 @@ export const Order = { }, fromPartial(object: DeepPartial): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = (object.orderId !== undefined && object.orderId !== null) + ? OrderID.fromPartial(object.orderId) + : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = (object.spec !== undefined && object.spec !== null) ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -334,24 +305,14 @@ export const Order = { messageTypeRegistry.set(Order.$type, Order); function createBaseOrderFilters(): OrderFilters { - return { - $type: 'akash.market.v1beta3.OrderFilters', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - state: '', - }; + return { $type: "akash.market.v1beta3.OrderFilters", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, state: "" }; } export const OrderFilters = { - $type: 'akash.market.v1beta3.OrderFilters' as const, + $type: "akash.market.v1beta3.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -363,15 +324,14 @@ export const OrderFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderFilters(); while (reader.pos < end) { @@ -424,17 +384,17 @@ export const OrderFilters = { fromJSON(object: any): OrderFilters { return { $type: OrderFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -446,7 +406,7 @@ export const OrderFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -457,40 +417,24 @@ export const OrderFilters = { }, fromPartial(object: DeepPartial): OrderFilters { const message = createBaseOrderFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.state = object.state ?? ''; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/params.ts b/ts/src/generated/akash/market/v1beta3/params.ts index 2c96eb44..733fd599 100644 --- a/ts/src/generated/akash/market/v1beta3/params.ts +++ b/ts/src/generated/akash/market/v1beta3/params.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params is the params for the x/market module */ export interface Params { - $type: 'akash.market.v1beta3.Params'; + $type: "akash.market.v1beta3.Params"; bidMinDeposit: Coin | undefined; orderMaxBids: number; } function createBaseParams(): Params { - return { - $type: 'akash.market.v1beta3.Params', - bidMinDeposit: undefined, - orderMaxBids: 0, - }; + return { $type: "akash.market.v1beta3.Params", bidMinDeposit: undefined, orderMaxBids: 0 }; } export const Params = { - $type: 'akash.market.v1beta3.Params' as const, + $type: "akash.market.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const Params = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -69,12 +61,8 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? globalThis.Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? globalThis.Number(object.orderMaxBids) : 0, }; }, @@ -94,10 +82,9 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = (object.bidMinDeposit !== undefined && object.bidMinDeposit !== null) + ? Coin.fromPartial(object.bidMinDeposit) + : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; }, @@ -105,26 +92,13 @@ export const Params = { messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/query.ts b/ts/src/generated/akash/market/v1beta3/query.ts index 54a198f0..734a6bbd 100644 --- a/ts/src/generated/akash/market/v1beta3/query.ts +++ b/ts/src/generated/akash/market/v1beta3/query.ts @@ -1,111 +1,101 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from '../../escrow/v1beta3/types'; -import { Bid, BidFilters, BidID } from './bid'; -import { Lease, LeaseFilters, LeaseID } from './lease'; -import { Order, OrderFilters, OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "../../escrow/v1beta3/types"; +import { Bid, BidFilters, BidID } from "./bid"; +import { Lease, LeaseFilters, LeaseID } from "./lease"; +import { Order, OrderFilters, OrderID } from "./order"; /** QueryOrdersRequest is request type for the Query/Orders RPC method */ export interface QueryOrdersRequest { - $type: 'akash.market.v1beta3.QueryOrdersRequest'; + $type: "akash.market.v1beta3.QueryOrdersRequest"; filters: OrderFilters | undefined; pagination: PageRequest | undefined; } /** QueryOrdersResponse is response type for the Query/Orders RPC method */ export interface QueryOrdersResponse { - $type: 'akash.market.v1beta3.QueryOrdersResponse'; + $type: "akash.market.v1beta3.QueryOrdersResponse"; orders: Order[]; pagination: PageResponse | undefined; } /** QueryOrderRequest is request type for the Query/Order RPC method */ export interface QueryOrderRequest { - $type: 'akash.market.v1beta3.QueryOrderRequest'; + $type: "akash.market.v1beta3.QueryOrderRequest"; id: OrderID | undefined; } /** QueryOrderResponse is response type for the Query/Order RPC method */ export interface QueryOrderResponse { - $type: 'akash.market.v1beta3.QueryOrderResponse'; + $type: "akash.market.v1beta3.QueryOrderResponse"; order: Order | undefined; } /** QueryBidsRequest is request type for the Query/Bids RPC method */ export interface QueryBidsRequest { - $type: 'akash.market.v1beta3.QueryBidsRequest'; + $type: "akash.market.v1beta3.QueryBidsRequest"; filters: BidFilters | undefined; pagination: PageRequest | undefined; } /** QueryBidsResponse is response type for the Query/Bids RPC method */ export interface QueryBidsResponse { - $type: 'akash.market.v1beta3.QueryBidsResponse'; + $type: "akash.market.v1beta3.QueryBidsResponse"; bids: QueryBidResponse[]; pagination: PageResponse | undefined; } /** QueryBidRequest is request type for the Query/Bid RPC method */ export interface QueryBidRequest { - $type: 'akash.market.v1beta3.QueryBidRequest'; + $type: "akash.market.v1beta3.QueryBidRequest"; id: BidID | undefined; } /** QueryBidResponse is response type for the Query/Bid RPC method */ export interface QueryBidResponse { - $type: 'akash.market.v1beta3.QueryBidResponse'; + $type: "akash.market.v1beta3.QueryBidResponse"; bid: Bid | undefined; escrowAccount: Account | undefined; } /** QueryLeasesRequest is request type for the Query/Leases RPC method */ export interface QueryLeasesRequest { - $type: 'akash.market.v1beta3.QueryLeasesRequest'; + $type: "akash.market.v1beta3.QueryLeasesRequest"; filters: LeaseFilters | undefined; pagination: PageRequest | undefined; } /** QueryLeasesResponse is response type for the Query/Leases RPC method */ export interface QueryLeasesResponse { - $type: 'akash.market.v1beta3.QueryLeasesResponse'; + $type: "akash.market.v1beta3.QueryLeasesResponse"; leases: QueryLeaseResponse[]; pagination: PageResponse | undefined; } /** QueryLeaseRequest is request type for the Query/Lease RPC method */ export interface QueryLeaseRequest { - $type: 'akash.market.v1beta3.QueryLeaseRequest'; + $type: "akash.market.v1beta3.QueryLeaseRequest"; id: LeaseID | undefined; } /** QueryLeaseResponse is response type for the Query/Lease RPC method */ export interface QueryLeaseResponse { - $type: 'akash.market.v1beta3.QueryLeaseResponse'; + $type: "akash.market.v1beta3.QueryLeaseResponse"; lease: Lease | undefined; escrowPayment: FractionalPayment | undefined; } function createBaseQueryOrdersRequest(): QueryOrdersRequest { - return { - $type: 'akash.market.v1beta3.QueryOrdersRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryOrdersRequest", filters: undefined, pagination: undefined }; } export const QueryOrdersRequest = { - $type: 'akash.market.v1beta3.QueryOrdersRequest' as const, + $type: "akash.market.v1beta3.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -116,8 +106,7 @@ export const QueryOrdersRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersRequest(); while (reader.pos < end) { @@ -149,12 +138,8 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -174,14 +159,12 @@ export const QueryOrdersRequest = { }, fromPartial(object: DeepPartial): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? OrderFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -189,35 +172,24 @@ export const QueryOrdersRequest = { messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); function createBaseQueryOrdersResponse(): QueryOrdersResponse { - return { - $type: 'akash.market.v1beta3.QueryOrdersResponse', - orders: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryOrdersResponse", orders: [], pagination: undefined }; } export const QueryOrdersResponse = { - $type: 'akash.market.v1beta3.QueryOrdersResponse' as const, + $type: "akash.market.v1beta3.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersResponse(); while (reader.pos < end) { @@ -249,12 +221,8 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -275,10 +243,9 @@ export const QueryOrdersResponse = { fromPartial(object: DeepPartial): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -286,16 +253,13 @@ export const QueryOrdersResponse = { messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); function createBaseQueryOrderRequest(): QueryOrderRequest { - return { $type: 'akash.market.v1beta3.QueryOrderRequest', id: undefined }; + return { $type: "akash.market.v1beta3.QueryOrderRequest", id: undefined }; } export const QueryOrderRequest = { - $type: 'akash.market.v1beta3.QueryOrderRequest' as const, + $type: "akash.market.v1beta3.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -303,8 +267,7 @@ export const QueryOrderRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderRequest(); while (reader.pos < end) { @@ -327,10 +290,7 @@ export const QueryOrderRequest = { }, fromJSON(object: any): QueryOrderRequest { - return { - $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, - }; + return { $type: QueryOrderRequest.$type, id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { @@ -346,10 +306,7 @@ export const QueryOrderRequest = { }, fromPartial(object: DeepPartial): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? OrderID.fromPartial(object.id) : undefined; return message; }, }; @@ -357,16 +314,13 @@ export const QueryOrderRequest = { messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); function createBaseQueryOrderResponse(): QueryOrderResponse { - return { $type: 'akash.market.v1beta3.QueryOrderResponse', order: undefined }; + return { $type: "akash.market.v1beta3.QueryOrderResponse", order: undefined }; } export const QueryOrderResponse = { - $type: 'akash.market.v1beta3.QueryOrderResponse' as const, + $type: "akash.market.v1beta3.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -374,8 +328,7 @@ export const QueryOrderResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderResponse(); while (reader.pos < end) { @@ -398,10 +351,7 @@ export const QueryOrderResponse = { }, fromJSON(object: any): QueryOrderResponse { - return { - $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, - }; + return { $type: QueryOrderResponse.$type, order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { @@ -417,10 +367,7 @@ export const QueryOrderResponse = { }, fromPartial(object: DeepPartial): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = (object.order !== undefined && object.order !== null) ? Order.fromPartial(object.order) : undefined; return message; }, }; @@ -428,20 +375,13 @@ export const QueryOrderResponse = { messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); function createBaseQueryBidsRequest(): QueryBidsRequest { - return { - $type: 'akash.market.v1beta3.QueryBidsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryBidsRequest", filters: undefined, pagination: undefined }; } export const QueryBidsRequest = { - $type: 'akash.market.v1beta3.QueryBidsRequest' as const, + $type: "akash.market.v1beta3.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -452,8 +392,7 @@ export const QueryBidsRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsRequest(); while (reader.pos < end) { @@ -485,12 +424,8 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -510,14 +445,12 @@ export const QueryBidsRequest = { }, fromPartial(object: DeepPartial): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? BidFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -525,35 +458,24 @@ export const QueryBidsRequest = { messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); function createBaseQueryBidsResponse(): QueryBidsResponse { - return { - $type: 'akash.market.v1beta3.QueryBidsResponse', - bids: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryBidsResponse", bids: [], pagination: undefined }; } export const QueryBidsResponse = { - $type: 'akash.market.v1beta3.QueryBidsResponse' as const, + $type: "akash.market.v1beta3.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsResponse(); while (reader.pos < end) { @@ -585,12 +507,8 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: globalThis.Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: globalThis.Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -610,12 +528,10 @@ export const QueryBidsResponse = { }, fromPartial(object: DeepPartial): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -623,16 +539,13 @@ export const QueryBidsResponse = { messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); function createBaseQueryBidRequest(): QueryBidRequest { - return { $type: 'akash.market.v1beta3.QueryBidRequest', id: undefined }; + return { $type: "akash.market.v1beta3.QueryBidRequest", id: undefined }; } export const QueryBidRequest = { - $type: 'akash.market.v1beta3.QueryBidRequest' as const, + $type: "akash.market.v1beta3.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -640,8 +553,7 @@ export const QueryBidRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidRequest(); while (reader.pos < end) { @@ -664,10 +576,7 @@ export const QueryBidRequest = { }, fromJSON(object: any): QueryBidRequest { - return { - $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, - }; + return { $type: QueryBidRequest.$type, id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { @@ -683,10 +592,7 @@ export const QueryBidRequest = { }, fromPartial(object: DeepPartial): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? BidID.fromPartial(object.id) : undefined; return message; }, }; @@ -694,20 +600,13 @@ export const QueryBidRequest = { messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); function createBaseQueryBidResponse(): QueryBidResponse { - return { - $type: 'akash.market.v1beta3.QueryBidResponse', - bid: undefined, - escrowAccount: undefined, - }; + return { $type: "akash.market.v1beta3.QueryBidResponse", bid: undefined, escrowAccount: undefined }; } export const QueryBidResponse = { - $type: 'akash.market.v1beta3.QueryBidResponse' as const, + $type: "akash.market.v1beta3.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -718,8 +617,7 @@ export const QueryBidResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidResponse(); while (reader.pos < end) { @@ -752,9 +650,7 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -774,14 +670,10 @@ export const QueryBidResponse = { }, fromPartial(object: DeepPartial): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = (object.bid !== undefined && object.bid !== null) ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -789,20 +681,13 @@ export const QueryBidResponse = { messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); function createBaseQueryLeasesRequest(): QueryLeasesRequest { - return { - $type: 'akash.market.v1beta3.QueryLeasesRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryLeasesRequest", filters: undefined, pagination: undefined }; } export const QueryLeasesRequest = { - $type: 'akash.market.v1beta3.QueryLeasesRequest' as const, + $type: "akash.market.v1beta3.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -813,8 +698,7 @@ export const QueryLeasesRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesRequest(); while (reader.pos < end) { @@ -846,12 +730,8 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -871,14 +751,12 @@ export const QueryLeasesRequest = { }, fromPartial(object: DeepPartial): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? LeaseFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -886,35 +764,24 @@ export const QueryLeasesRequest = { messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); function createBaseQueryLeasesResponse(): QueryLeasesResponse { - return { - $type: 'akash.market.v1beta3.QueryLeasesResponse', - leases: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta3.QueryLeasesResponse", leases: [], pagination: undefined }; } export const QueryLeasesResponse = { - $type: 'akash.market.v1beta3.QueryLeasesResponse' as const, + $type: "akash.market.v1beta3.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesResponse(); while (reader.pos < end) { @@ -925,9 +792,7 @@ export const QueryLeasesResponse = { break; } - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()), - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -951,9 +816,7 @@ export const QueryLeasesResponse = { leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -973,12 +836,10 @@ export const QueryLeasesResponse = { }, fromPartial(object: DeepPartial): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -986,16 +847,13 @@ export const QueryLeasesResponse = { messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); function createBaseQueryLeaseRequest(): QueryLeaseRequest { - return { $type: 'akash.market.v1beta3.QueryLeaseRequest', id: undefined }; + return { $type: "akash.market.v1beta3.QueryLeaseRequest", id: undefined }; } export const QueryLeaseRequest = { - $type: 'akash.market.v1beta3.QueryLeaseRequest' as const, + $type: "akash.market.v1beta3.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -1003,8 +861,7 @@ export const QueryLeaseRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseRequest(); while (reader.pos < end) { @@ -1027,10 +884,7 @@ export const QueryLeaseRequest = { }, fromJSON(object: any): QueryLeaseRequest { - return { - $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, - }; + return { $type: QueryLeaseRequest.$type, id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { @@ -1046,10 +900,7 @@ export const QueryLeaseRequest = { }, fromPartial(object: DeepPartial): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? LeaseID.fromPartial(object.id) : undefined; return message; }, }; @@ -1057,35 +908,24 @@ export const QueryLeaseRequest = { messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); function createBaseQueryLeaseResponse(): QueryLeaseResponse { - return { - $type: 'akash.market.v1beta3.QueryLeaseResponse', - lease: undefined, - escrowPayment: undefined, - }; + return { $type: "akash.market.v1beta3.QueryLeaseResponse", lease: undefined, escrowPayment: undefined }; } export const QueryLeaseResponse = { - $type: 'akash.market.v1beta3.QueryLeaseResponse' as const, + $type: "akash.market.v1beta3.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork(), - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseResponse(); while (reader.pos < end) { @@ -1103,10 +943,7 @@ export const QueryLeaseResponse = { break; } - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32(), - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1121,9 +958,7 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined, }; }, @@ -1143,14 +978,10 @@ export const QueryLeaseResponse = { }, fromPartial(object: DeepPartial): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; - message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + message.lease = (object.lease !== undefined && object.lease !== null) ? Lease.fromPartial(object.lease) : undefined; + message.escrowPayment = (object.escrowPayment !== undefined && object.escrowPayment !== null) + ? FractionalPayment.fromPartial(object.escrowPayment) + : undefined; return message; }, }; @@ -1173,7 +1004,7 @@ export interface Query { Lease(request: QueryLeaseRequest): Promise; } -export const QueryServiceName = 'akash.market.v1beta3.Query'; +export const QueryServiceName = "akash.market.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -1189,81 +1020,52 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Orders', data); - return promise.then((data) => - QueryOrdersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Orders", data); + return promise.then((data) => QueryOrdersResponse.decode(_m0.Reader.create(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Order', data); - return promise.then((data) => - QueryOrderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Order", data); + return promise.then((data) => QueryOrderResponse.decode(_m0.Reader.create(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bids', data); - return promise.then((data) => - QueryBidsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bids", data); + return promise.then((data) => QueryBidsResponse.decode(_m0.Reader.create(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bid', data); - return promise.then((data) => - QueryBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bid", data); + return promise.then((data) => QueryBidResponse.decode(_m0.Reader.create(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Leases', data); - return promise.then((data) => - QueryLeasesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Leases", data); + return promise.then((data) => QueryLeasesResponse.decode(_m0.Reader.create(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Lease', data); - return promise.then((data) => - QueryLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Lease", data); + return promise.then((data) => QueryLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta3/service.ts b/ts/src/generated/akash/market/v1beta3/service.ts index fbdc207c..e649d7aa 100644 --- a/ts/src/generated/akash/market/v1beta3/service.ts +++ b/ts/src/generated/akash/market/v1beta3/service.ts @@ -1,11 +1,6 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; -import { - MsgCloseBid, - MsgCloseBidResponse, - MsgCreateBid, - MsgCreateBidResponse, -} from './bid'; +import _m0 from "protobufjs/minimal"; +import { MsgCloseBid, MsgCloseBidResponse, MsgCreateBid, MsgCreateBidResponse } from "./bid"; import { MsgCloseLease, MsgCloseLeaseResponse, @@ -13,7 +8,7 @@ import { MsgCreateLeaseResponse, MsgWithdrawLease, MsgWithdrawLeaseResponse, -} from './lease'; +} from "./lease"; /** Msg defines the market Msg service */ export interface Msg { @@ -29,7 +24,7 @@ export interface Msg { CloseLease(request: MsgCloseLease): Promise; } -export const MsgServiceName = 'akash.market.v1beta3.Msg'; +export const MsgServiceName = "akash.market.v1beta3.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -44,49 +39,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateBid', data); - return promise.then((data) => - MsgCreateBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateBid", data); + return promise.then((data) => MsgCreateBidResponse.decode(_m0.Reader.create(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseBid', data); - return promise.then((data) => - MsgCloseBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseBid", data); + return promise.then((data) => MsgCloseBidResponse.decode(_m0.Reader.create(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'WithdrawLease', data); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "WithdrawLease", data); + return promise.then((data) => MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateLease', data); - return promise.then((data) => - MsgCreateLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateLease", data); + return promise.then((data) => MsgCreateLeaseResponse.decode(_m0.Reader.create(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseLease', data); - return promise.then((data) => - MsgCloseLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseLease", data); + return promise.then((data) => MsgCloseLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/akash/market/v1beta4/bid.ts b/ts/src/generated/akash/market/v1beta4/bid.ts index 145780d3..a9fcf0ff 100644 --- a/ts/src/generated/akash/market/v1beta4/bid.ts +++ b/ts/src/generated/akash/market/v1beta4/bid.ts @@ -1,24 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin, DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Resources } from '../../base/v1beta3/resources'; -import { OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin, DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Resources } from "../../base/v1beta3/resources"; +import { OrderID } from "./order"; /** * ResourceOffer describes resources that provider is offering * for deployment */ export interface ResourceOffer { - $type: 'akash.market.v1beta4.ResourceOffer'; + $type: "akash.market.v1beta4.ResourceOffer"; resources: Resources | undefined; count: number; } /** MsgCreateBid defines an SDK message for creating Bid */ export interface MsgCreateBid { - $type: 'akash.market.v1beta4.MsgCreateBid'; + $type: "akash.market.v1beta4.MsgCreateBid"; order: OrderID | undefined; provider: string; price: DecCoin | undefined; @@ -28,18 +28,18 @@ export interface MsgCreateBid { /** MsgCreateBidResponse defines the Msg/CreateBid response type. */ export interface MsgCreateBidResponse { - $type: 'akash.market.v1beta4.MsgCreateBidResponse'; + $type: "akash.market.v1beta4.MsgCreateBidResponse"; } /** MsgCloseBid defines an SDK message for closing bid */ export interface MsgCloseBid { - $type: 'akash.market.v1beta4.MsgCloseBid'; + $type: "akash.market.v1beta4.MsgCloseBid"; bidId: BidID | undefined; } /** MsgCloseBidResponse defines the Msg/CloseBid response type. */ export interface MsgCloseBidResponse { - $type: 'akash.market.v1beta4.MsgCloseBidResponse'; + $type: "akash.market.v1beta4.MsgCloseBidResponse"; } /** @@ -47,7 +47,7 @@ export interface MsgCloseBidResponse { * A successful bid becomes a Lease(ID). */ export interface BidID { - $type: 'akash.market.v1beta4.BidID'; + $type: "akash.market.v1beta4.BidID"; owner: string; dseq: Long; gseq: number; @@ -57,7 +57,7 @@ export interface BidID { /** Bid stores BidID, state of bid and price */ export interface Bid { - $type: 'akash.market.v1beta4.Bid'; + $type: "akash.market.v1beta4.Bid"; bidId: BidID | undefined; state: Bid_State; price: DecCoin | undefined; @@ -83,22 +83,22 @@ export enum Bid_State { export function bid_StateFromJSON(object: any): Bid_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Bid_State.invalid; case 1: - case 'open': + case "open": return Bid_State.open; case 2: - case 'active': + case "active": return Bid_State.active; case 3: - case 'lost': + case "lost": return Bid_State.lost; case 4: - case 'closed': + case "closed": return Bid_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Bid_State.UNRECOGNIZED; } @@ -107,24 +107,24 @@ export function bid_StateFromJSON(object: any): Bid_State { export function bid_StateToJSON(object: Bid_State): string { switch (object) { case Bid_State.invalid: - return 'invalid'; + return "invalid"; case Bid_State.open: - return 'open'; + return "open"; case Bid_State.active: - return 'active'; + return "active"; case Bid_State.lost: - return 'lost'; + return "lost"; case Bid_State.closed: - return 'closed'; + return "closed"; case Bid_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** BidFilters defines flags for bid list filter */ export interface BidFilters { - $type: 'akash.market.v1beta4.BidFilters'; + $type: "akash.market.v1beta4.BidFilters"; owner: string; dseq: Long; gseq: number; @@ -134,20 +134,13 @@ export interface BidFilters { } function createBaseResourceOffer(): ResourceOffer { - return { - $type: 'akash.market.v1beta4.ResourceOffer', - resources: undefined, - count: 0, - }; + return { $type: "akash.market.v1beta4.ResourceOffer", resources: undefined, count: 0 }; } export const ResourceOffer = { - $type: 'akash.market.v1beta4.ResourceOffer' as const, + $type: "akash.market.v1beta4.ResourceOffer" as const, - encode( - message: ResourceOffer, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourceOffer, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.resources !== undefined) { Resources.encode(message.resources, writer.uint32(10).fork()).ldelim(); } @@ -158,8 +151,7 @@ export const ResourceOffer = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourceOffer { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourceOffer(); while (reader.pos < end) { @@ -191,9 +183,7 @@ export const ResourceOffer = { fromJSON(object: any): ResourceOffer { return { $type: ResourceOffer.$type, - resources: isSet(object.resources) - ? Resources.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? Resources.fromJSON(object.resources) : undefined, count: isSet(object.count) ? globalThis.Number(object.count) : 0, }; }, @@ -214,10 +204,9 @@ export const ResourceOffer = { }, fromPartial(object: DeepPartial): ResourceOffer { const message = createBaseResourceOffer(); - message.resources = - object.resources !== undefined && object.resources !== null - ? Resources.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? Resources.fromPartial(object.resources) + : undefined; message.count = object.count ?? 0; return message; }, @@ -227,9 +216,9 @@ messageTypeRegistry.set(ResourceOffer.$type, ResourceOffer); function createBaseMsgCreateBid(): MsgCreateBid { return { - $type: 'akash.market.v1beta4.MsgCreateBid', + $type: "akash.market.v1beta4.MsgCreateBid", order: undefined, - provider: '', + provider: "", price: undefined, deposit: undefined, resourcesOffer: [], @@ -237,16 +226,13 @@ function createBaseMsgCreateBid(): MsgCreateBid { } export const MsgCreateBid = { - $type: 'akash.market.v1beta4.MsgCreateBid' as const, + $type: "akash.market.v1beta4.MsgCreateBid" as const, - encode( - message: MsgCreateBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { OrderID.encode(message.order, writer.uint32(10).fork()).ldelim(); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(18).string(message.provider); } if (message.price !== undefined) { @@ -262,8 +248,7 @@ export const MsgCreateBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBid(); while (reader.pos < end) { @@ -302,9 +287,7 @@ export const MsgCreateBid = { break; } - message.resourcesOffer.push( - ResourceOffer.decode(reader, reader.uint32()), - ); + message.resourcesOffer.push(ResourceOffer.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -319,13 +302,9 @@ export const MsgCreateBid = { return { $type: MsgCreateBid.$type, order: isSet(object.order) ? OrderID.fromJSON(object.order) : undefined, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - deposit: isSet(object.deposit) - ? Coin.fromJSON(object.deposit) - : undefined, + deposit: isSet(object.deposit) ? Coin.fromJSON(object.deposit) : undefined, resourcesOffer: globalThis.Array.isArray(object?.resourcesOffer) ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) : [], @@ -337,7 +316,7 @@ export const MsgCreateBid = { if (message.order !== undefined) { obj.order = OrderID.toJSON(message.order); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } if (message.price !== undefined) { @@ -347,9 +326,7 @@ export const MsgCreateBid = { obj.deposit = Coin.toJSON(message.deposit); } if (message.resourcesOffer?.length) { - obj.resourcesOffer = message.resourcesOffer.map((e) => - ResourceOffer.toJSON(e), - ); + obj.resourcesOffer = message.resourcesOffer.map((e) => ResourceOffer.toJSON(e)); } return obj; }, @@ -359,21 +336,17 @@ export const MsgCreateBid = { }, fromPartial(object: DeepPartial): MsgCreateBid { const message = createBaseMsgCreateBid(); - message.order = - object.order !== undefined && object.order !== null - ? OrderID.fromPartial(object.order) - : undefined; - message.provider = object.provider ?? ''; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.deposit = - object.deposit !== undefined && object.deposit !== null - ? Coin.fromPartial(object.deposit) - : undefined; - message.resourcesOffer = - object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; + message.order = (object.order !== undefined && object.order !== null) + ? OrderID.fromPartial(object.order) + : undefined; + message.provider = object.provider ?? ""; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.deposit = (object.deposit !== undefined && object.deposit !== null) + ? Coin.fromPartial(object.deposit) + : undefined; + message.resourcesOffer = object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; return message; }, }; @@ -381,25 +354,18 @@ export const MsgCreateBid = { messageTypeRegistry.set(MsgCreateBid.$type, MsgCreateBid); function createBaseMsgCreateBidResponse(): MsgCreateBidResponse { - return { $type: 'akash.market.v1beta4.MsgCreateBidResponse' }; + return { $type: "akash.market.v1beta4.MsgCreateBidResponse" }; } export const MsgCreateBidResponse = { - $type: 'akash.market.v1beta4.MsgCreateBidResponse' as const, + $type: "akash.market.v1beta4.MsgCreateBidResponse" as const, - encode( - _: MsgCreateBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateBidResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateBidResponse(); while (reader.pos < end) { @@ -435,16 +401,13 @@ export const MsgCreateBidResponse = { messageTypeRegistry.set(MsgCreateBidResponse.$type, MsgCreateBidResponse); function createBaseMsgCloseBid(): MsgCloseBid { - return { $type: 'akash.market.v1beta4.MsgCloseBid', bidId: undefined }; + return { $type: "akash.market.v1beta4.MsgCloseBid", bidId: undefined }; } export const MsgCloseBid = { - $type: 'akash.market.v1beta4.MsgCloseBid' as const, + $type: "akash.market.v1beta4.MsgCloseBid" as const, - encode( - message: MsgCloseBid, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseBid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -452,8 +415,7 @@ export const MsgCloseBid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBid(); while (reader.pos < end) { @@ -476,10 +438,7 @@ export const MsgCloseBid = { }, fromJSON(object: any): MsgCloseBid { - return { - $type: MsgCloseBid.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCloseBid.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCloseBid): unknown { @@ -495,10 +454,7 @@ export const MsgCloseBid = { }, fromPartial(object: DeepPartial): MsgCloseBid { const message = createBaseMsgCloseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -506,22 +462,18 @@ export const MsgCloseBid = { messageTypeRegistry.set(MsgCloseBid.$type, MsgCloseBid); function createBaseMsgCloseBidResponse(): MsgCloseBidResponse { - return { $type: 'akash.market.v1beta4.MsgCloseBidResponse' }; + return { $type: "akash.market.v1beta4.MsgCloseBidResponse" }; } export const MsgCloseBidResponse = { - $type: 'akash.market.v1beta4.MsgCloseBidResponse' as const, + $type: "akash.market.v1beta4.MsgCloseBidResponse" as const, - encode( - _: MsgCloseBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseBidResponse(); while (reader.pos < end) { @@ -557,21 +509,14 @@ export const MsgCloseBidResponse = { messageTypeRegistry.set(MsgCloseBidResponse.$type, MsgCloseBidResponse); function createBaseBidID(): BidID { - return { - $type: 'akash.market.v1beta4.BidID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta4.BidID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const BidID = { - $type: 'akash.market.v1beta4.BidID' as const, + $type: "akash.market.v1beta4.BidID" as const, encode(message: BidID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.owner !== '') { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -583,15 +528,14 @@ export const BidID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidID(); while (reader.pos < end) { @@ -644,19 +588,17 @@ export const BidID = { fromJSON(object: any): BidID { return { $type: BidID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: BidID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -668,7 +610,7 @@ export const BidID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -679,14 +621,11 @@ export const BidID = { }, fromPartial(object: DeepPartial): BidID { const message = createBaseBidID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -695,7 +634,7 @@ messageTypeRegistry.set(BidID.$type, BidID); function createBaseBid(): Bid { return { - $type: 'akash.market.v1beta4.Bid', + $type: "akash.market.v1beta4.Bid", bidId: undefined, state: 0, price: undefined, @@ -705,7 +644,7 @@ function createBaseBid(): Bid { } export const Bid = { - $type: 'akash.market.v1beta4.Bid' as const, + $type: "akash.market.v1beta4.Bid" as const, encode(message: Bid, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { @@ -727,8 +666,7 @@ export const Bid = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Bid { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBid(); while (reader.pos < end) { @@ -767,9 +705,7 @@ export const Bid = { break; } - message.resourcesOffer.push( - ResourceOffer.decode(reader, reader.uint32()), - ); + message.resourcesOffer.push(ResourceOffer.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -786,9 +722,7 @@ export const Bid = { bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, state: isSet(object.state) ? bid_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, resourcesOffer: globalThis.Array.isArray(object?.resourcesOffer) ? object.resourcesOffer.map((e: any) => ResourceOffer.fromJSON(e)) : [], @@ -810,9 +744,7 @@ export const Bid = { obj.createdAt = (message.createdAt || Long.ZERO).toString(); } if (message.resourcesOffer?.length) { - obj.resourcesOffer = message.resourcesOffer.map((e) => - ResourceOffer.toJSON(e), - ); + obj.resourcesOffer = message.resourcesOffer.map((e) => ResourceOffer.toJSON(e)); } return obj; }, @@ -822,21 +754,15 @@ export const Bid = { }, fromPartial(object: DeepPartial): Bid { const message = createBaseBid(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.resourcesOffer = - object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; + message.resourcesOffer = object.resourcesOffer?.map((e) => ResourceOffer.fromPartial(e)) || []; return message; }, }; @@ -845,24 +771,21 @@ messageTypeRegistry.set(Bid.$type, Bid); function createBaseBidFilters(): BidFilters { return { - $type: 'akash.market.v1beta4.BidFilters', - owner: '', + $type: "akash.market.v1beta4.BidFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const BidFilters = { - $type: 'akash.market.v1beta4.BidFilters' as const, + $type: "akash.market.v1beta4.BidFilters" as const, - encode( - message: BidFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: BidFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -874,18 +797,17 @@ export const BidFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): BidFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidFilters(); while (reader.pos < end) { @@ -945,20 +867,18 @@ export const BidFilters = { fromJSON(object: any): BidFilters { return { $type: BidFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: BidFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -970,10 +890,10 @@ export const BidFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -984,41 +904,25 @@ export const BidFilters = { }, fromPartial(object: DeepPartial): BidFilters { const message = createBaseBidFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(BidFilters.$type, BidFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/genesis.ts b/ts/src/generated/akash/market/v1beta4/genesis.ts index a66ccdfb..19a58408 100644 --- a/ts/src/generated/akash/market/v1beta4/genesis.ts +++ b/ts/src/generated/akash/market/v1beta4/genesis.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Bid } from './bid'; -import { Lease } from './lease'; -import { Order } from './order'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Bid } from "./bid"; +import { Lease } from "./lease"; +import { Order } from "./order"; +import { Params } from "./params"; /** GenesisState defines the basic genesis state used by market module */ export interface GenesisState { - $type: 'akash.market.v1beta4.GenesisState'; + $type: "akash.market.v1beta4.GenesisState"; params: Params | undefined; orders: Order[]; leases: Lease[]; @@ -17,22 +17,13 @@ export interface GenesisState { } function createBaseGenesisState(): GenesisState { - return { - $type: 'akash.market.v1beta4.GenesisState', - params: undefined, - orders: [], - leases: [], - bids: [], - }; + return { $type: "akash.market.v1beta4.GenesisState", params: undefined, orders: [], leases: [], bids: [] }; } export const GenesisState = { - $type: 'akash.market.v1beta4.GenesisState' as const, + $type: "akash.market.v1beta4.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -49,8 +40,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -97,15 +87,9 @@ export const GenesisState = { return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - leases: globalThis.Array.isArray(object?.leases) - ? object.leases.map((e: any) => Lease.fromJSON(e)) - : [], - bids: globalThis.Array.isArray(object?.bids) - ? object.bids.map((e: any) => Bid.fromJSON(e)) - : [], + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => Lease.fromJSON(e)) : [], + bids: globalThis.Array.isArray(object?.bids) ? object.bids.map((e: any) => Bid.fromJSON(e)) : [], }; }, @@ -131,10 +115,9 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; message.leases = object.leases?.map((e) => Lease.fromPartial(e)) || []; message.bids = object.bids?.map((e) => Bid.fromPartial(e)) || []; @@ -144,26 +127,13 @@ export const GenesisState = { messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/lease.ts b/ts/src/generated/akash/market/v1beta4/lease.ts index 92d99c63..d989b586 100644 --- a/ts/src/generated/akash/market/v1beta4/lease.ts +++ b/ts/src/generated/akash/market/v1beta4/lease.ts @@ -1,13 +1,13 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { DecCoin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { BidID } from './bid'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { DecCoin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { BidID } from "./bid"; /** LeaseID stores bid details of lease */ export interface LeaseID { - $type: 'akash.market.v1beta4.LeaseID'; + $type: "akash.market.v1beta4.LeaseID"; owner: string; dseq: Long; gseq: number; @@ -17,7 +17,7 @@ export interface LeaseID { /** Lease stores LeaseID, state of lease and price */ export interface Lease { - $type: 'akash.market.v1beta4.Lease'; + $type: "akash.market.v1beta4.Lease"; leaseId: LeaseID | undefined; state: Lease_State; price: DecCoin | undefined; @@ -41,19 +41,19 @@ export enum Lease_State { export function lease_StateFromJSON(object: any): Lease_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Lease_State.invalid; case 1: - case 'active': + case "active": return Lease_State.active; case 2: - case 'insufficient_funds': + case "insufficient_funds": return Lease_State.insufficient_funds; case 3: - case 'closed': + case "closed": return Lease_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Lease_State.UNRECOGNIZED; } @@ -62,22 +62,22 @@ export function lease_StateFromJSON(object: any): Lease_State { export function lease_StateToJSON(object: Lease_State): string { switch (object) { case Lease_State.invalid: - return 'invalid'; + return "invalid"; case Lease_State.active: - return 'active'; + return "active"; case Lease_State.insufficient_funds: - return 'insufficient_funds'; + return "insufficient_funds"; case Lease_State.closed: - return 'closed'; + return "closed"; case Lease_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** LeaseFilters defines flags for lease list filter */ export interface LeaseFilters { - $type: 'akash.market.v1beta4.LeaseFilters'; + $type: "akash.market.v1beta4.LeaseFilters"; owner: string; dseq: Long; gseq: number; @@ -88,56 +88,46 @@ export interface LeaseFilters { /** MsgCreateLease is sent to create a lease */ export interface MsgCreateLease { - $type: 'akash.market.v1beta4.MsgCreateLease'; + $type: "akash.market.v1beta4.MsgCreateLease"; bidId: BidID | undefined; } /** MsgCreateLeaseResponse is the response from creating a lease */ export interface MsgCreateLeaseResponse { - $type: 'akash.market.v1beta4.MsgCreateLeaseResponse'; + $type: "akash.market.v1beta4.MsgCreateLeaseResponse"; } /** MsgWithdrawLease defines an SDK message for closing bid */ export interface MsgWithdrawLease { - $type: 'akash.market.v1beta4.MsgWithdrawLease'; + $type: "akash.market.v1beta4.MsgWithdrawLease"; bidId: LeaseID | undefined; } /** MsgWithdrawLeaseResponse defines the Msg/WithdrawLease response type. */ export interface MsgWithdrawLeaseResponse { - $type: 'akash.market.v1beta4.MsgWithdrawLeaseResponse'; + $type: "akash.market.v1beta4.MsgWithdrawLeaseResponse"; } /** MsgCloseLease defines an SDK message for closing order */ export interface MsgCloseLease { - $type: 'akash.market.v1beta4.MsgCloseLease'; + $type: "akash.market.v1beta4.MsgCloseLease"; leaseId: LeaseID | undefined; } /** MsgCloseLeaseResponse defines the Msg/CloseLease response type. */ export interface MsgCloseLeaseResponse { - $type: 'akash.market.v1beta4.MsgCloseLeaseResponse'; + $type: "akash.market.v1beta4.MsgCloseLeaseResponse"; } function createBaseLeaseID(): LeaseID { - return { - $type: 'akash.market.v1beta4.LeaseID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - provider: '', - }; + return { $type: "akash.market.v1beta4.LeaseID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, provider: "" }; } export const LeaseID = { - $type: 'akash.market.v1beta4.LeaseID' as const, + $type: "akash.market.v1beta4.LeaseID" as const, - encode( - message: LeaseID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -149,15 +139,14 @@ export const LeaseID = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseID(); while (reader.pos < end) { @@ -210,19 +199,17 @@ export const LeaseID = { fromJSON(object: any): LeaseID { return { $type: LeaseID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", }; }, toJSON(message: LeaseID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -234,7 +221,7 @@ export const LeaseID = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } return obj; @@ -245,14 +232,11 @@ export const LeaseID = { }, fromPartial(object: DeepPartial): LeaseID { const message = createBaseLeaseID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; + message.provider = object.provider ?? ""; return message; }, }; @@ -261,7 +245,7 @@ messageTypeRegistry.set(LeaseID.$type, LeaseID); function createBaseLease(): Lease { return { - $type: 'akash.market.v1beta4.Lease', + $type: "akash.market.v1beta4.Lease", leaseId: undefined, state: 0, price: undefined, @@ -271,7 +255,7 @@ function createBaseLease(): Lease { } export const Lease = { - $type: 'akash.market.v1beta4.Lease' as const, + $type: "akash.market.v1beta4.Lease" as const, encode(message: Lease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { @@ -293,8 +277,7 @@ export const Lease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Lease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLease(); while (reader.pos < end) { @@ -347,17 +330,11 @@ export const Lease = { fromJSON(object: any): Lease { return { $type: Lease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, state: isSet(object.state) ? lease_StateFromJSON(object.state) : 0, price: isSet(object.price) ? DecCoin.fromJSON(object.price) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, - closedOn: isSet(object.closedOn) - ? Long.fromValue(object.closedOn) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, + closedOn: isSet(object.closedOn) ? Long.fromValue(object.closedOn) : Long.ZERO, }; }, @@ -386,23 +363,19 @@ export const Lease = { }, fromPartial(object: DeepPartial): Lease { const message = createBaseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.state = object.state ?? 0; - message.price = - object.price !== undefined && object.price !== null - ? DecCoin.fromPartial(object.price) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; - message.closedOn = - object.closedOn !== undefined && object.closedOn !== null - ? Long.fromValue(object.closedOn) - : Long.ZERO; + message.price = (object.price !== undefined && object.price !== null) + ? DecCoin.fromPartial(object.price) + : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; + message.closedOn = (object.closedOn !== undefined && object.closedOn !== null) + ? Long.fromValue(object.closedOn) + : Long.ZERO; return message; }, }; @@ -411,24 +384,21 @@ messageTypeRegistry.set(Lease.$type, Lease); function createBaseLeaseFilters(): LeaseFilters { return { - $type: 'akash.market.v1beta4.LeaseFilters', - owner: '', + $type: "akash.market.v1beta4.LeaseFilters", + owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, - provider: '', - state: '', + provider: "", + state: "", }; } export const LeaseFilters = { - $type: 'akash.market.v1beta4.LeaseFilters' as const, + $type: "akash.market.v1beta4.LeaseFilters" as const, - encode( - message: LeaseFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: LeaseFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -440,18 +410,17 @@ export const LeaseFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { writer.uint32(42).string(message.provider); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(50).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseFilters(); while (reader.pos < end) { @@ -511,20 +480,18 @@ export const LeaseFilters = { fromJSON(object: any): LeaseFilters { return { $type: LeaseFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - provider: isSet(object.provider) - ? globalThis.String(object.provider) - : '', - state: isSet(object.state) ? globalThis.String(object.state) : '', + provider: isSet(object.provider) ? globalThis.String(object.provider) : "", + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: LeaseFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -536,10 +503,10 @@ export const LeaseFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.provider !== '') { + if (message.provider !== "") { obj.provider = message.provider; } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -550,15 +517,12 @@ export const LeaseFilters = { }, fromPartial(object: DeepPartial): LeaseFilters { const message = createBaseLeaseFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.provider = object.provider ?? ''; - message.state = object.state ?? ''; + message.provider = object.provider ?? ""; + message.state = object.state ?? ""; return message; }, }; @@ -566,16 +530,13 @@ export const LeaseFilters = { messageTypeRegistry.set(LeaseFilters.$type, LeaseFilters); function createBaseMsgCreateLease(): MsgCreateLease { - return { $type: 'akash.market.v1beta4.MsgCreateLease', bidId: undefined }; + return { $type: "akash.market.v1beta4.MsgCreateLease", bidId: undefined }; } export const MsgCreateLease = { - $type: 'akash.market.v1beta4.MsgCreateLease' as const, + $type: "akash.market.v1beta4.MsgCreateLease" as const, - encode( - message: MsgCreateLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCreateLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { BidID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -583,8 +544,7 @@ export const MsgCreateLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLease(); while (reader.pos < end) { @@ -607,10 +567,7 @@ export const MsgCreateLease = { }, fromJSON(object: any): MsgCreateLease { - return { - $type: MsgCreateLease.$type, - bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgCreateLease.$type, bidId: isSet(object.bidId) ? BidID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgCreateLease): unknown { @@ -626,10 +583,7 @@ export const MsgCreateLease = { }, fromPartial(object: DeepPartial): MsgCreateLease { const message = createBaseMsgCreateLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? BidID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) ? BidID.fromPartial(object.bidId) : undefined; return message; }, }; @@ -637,25 +591,18 @@ export const MsgCreateLease = { messageTypeRegistry.set(MsgCreateLease.$type, MsgCreateLease); function createBaseMsgCreateLeaseResponse(): MsgCreateLeaseResponse { - return { $type: 'akash.market.v1beta4.MsgCreateLeaseResponse' }; + return { $type: "akash.market.v1beta4.MsgCreateLeaseResponse" }; } export const MsgCreateLeaseResponse = { - $type: 'akash.market.v1beta4.MsgCreateLeaseResponse' as const, + $type: "akash.market.v1beta4.MsgCreateLeaseResponse" as const, - encode( - _: MsgCreateLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateLeaseResponse(); while (reader.pos < end) { @@ -691,16 +638,13 @@ export const MsgCreateLeaseResponse = { messageTypeRegistry.set(MsgCreateLeaseResponse.$type, MsgCreateLeaseResponse); function createBaseMsgWithdrawLease(): MsgWithdrawLease { - return { $type: 'akash.market.v1beta4.MsgWithdrawLease', bidId: undefined }; + return { $type: "akash.market.v1beta4.MsgWithdrawLease", bidId: undefined }; } export const MsgWithdrawLease = { - $type: 'akash.market.v1beta4.MsgWithdrawLease' as const, + $type: "akash.market.v1beta4.MsgWithdrawLease" as const, - encode( - message: MsgWithdrawLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgWithdrawLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidId !== undefined) { LeaseID.encode(message.bidId, writer.uint32(10).fork()).ldelim(); } @@ -708,8 +652,7 @@ export const MsgWithdrawLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLease(); while (reader.pos < end) { @@ -732,10 +675,7 @@ export const MsgWithdrawLease = { }, fromJSON(object: any): MsgWithdrawLease { - return { - $type: MsgWithdrawLease.$type, - bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined, - }; + return { $type: MsgWithdrawLease.$type, bidId: isSet(object.bidId) ? LeaseID.fromJSON(object.bidId) : undefined }; }, toJSON(message: MsgWithdrawLease): unknown { @@ -751,10 +691,9 @@ export const MsgWithdrawLease = { }, fromPartial(object: DeepPartial): MsgWithdrawLease { const message = createBaseMsgWithdrawLease(); - message.bidId = - object.bidId !== undefined && object.bidId !== null - ? LeaseID.fromPartial(object.bidId) - : undefined; + message.bidId = (object.bidId !== undefined && object.bidId !== null) + ? LeaseID.fromPartial(object.bidId) + : undefined; return message; }, }; @@ -762,25 +701,18 @@ export const MsgWithdrawLease = { messageTypeRegistry.set(MsgWithdrawLease.$type, MsgWithdrawLease); function createBaseMsgWithdrawLeaseResponse(): MsgWithdrawLeaseResponse { - return { $type: 'akash.market.v1beta4.MsgWithdrawLeaseResponse' }; + return { $type: "akash.market.v1beta4.MsgWithdrawLeaseResponse" }; } export const MsgWithdrawLeaseResponse = { - $type: 'akash.market.v1beta4.MsgWithdrawLeaseResponse' as const, + $type: "akash.market.v1beta4.MsgWithdrawLeaseResponse" as const, - encode( - _: MsgWithdrawLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgWithdrawLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgWithdrawLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgWithdrawLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgWithdrawLeaseResponse(); while (reader.pos < end) { @@ -804,35 +736,25 @@ export const MsgWithdrawLeaseResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgWithdrawLeaseResponse { + create(base?: DeepPartial): MsgWithdrawLeaseResponse { return MsgWithdrawLeaseResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgWithdrawLeaseResponse { + fromPartial(_: DeepPartial): MsgWithdrawLeaseResponse { const message = createBaseMsgWithdrawLeaseResponse(); return message; }, }; -messageTypeRegistry.set( - MsgWithdrawLeaseResponse.$type, - MsgWithdrawLeaseResponse, -); +messageTypeRegistry.set(MsgWithdrawLeaseResponse.$type, MsgWithdrawLeaseResponse); function createBaseMsgCloseLease(): MsgCloseLease { - return { $type: 'akash.market.v1beta4.MsgCloseLease', leaseId: undefined }; + return { $type: "akash.market.v1beta4.MsgCloseLease", leaseId: undefined }; } export const MsgCloseLease = { - $type: 'akash.market.v1beta4.MsgCloseLease' as const, + $type: "akash.market.v1beta4.MsgCloseLease" as const, - encode( - message: MsgCloseLease, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MsgCloseLease, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -840,8 +762,7 @@ export const MsgCloseLease = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLease { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLease(); while (reader.pos < end) { @@ -866,9 +787,7 @@ export const MsgCloseLease = { fromJSON(object: any): MsgCloseLease { return { $type: MsgCloseLease.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, }; }, @@ -885,10 +804,9 @@ export const MsgCloseLease = { }, fromPartial(object: DeepPartial): MsgCloseLease { const message = createBaseMsgCloseLease(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; return message; }, }; @@ -896,25 +814,18 @@ export const MsgCloseLease = { messageTypeRegistry.set(MsgCloseLease.$type, MsgCloseLease); function createBaseMsgCloseLeaseResponse(): MsgCloseLeaseResponse { - return { $type: 'akash.market.v1beta4.MsgCloseLeaseResponse' }; + return { $type: "akash.market.v1beta4.MsgCloseLeaseResponse" }; } export const MsgCloseLeaseResponse = { - $type: 'akash.market.v1beta4.MsgCloseLeaseResponse' as const, + $type: "akash.market.v1beta4.MsgCloseLeaseResponse" as const, - encode( - _: MsgCloseLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCloseLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCloseLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCloseLeaseResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCloseLeaseResponse(); while (reader.pos < end) { @@ -949,26 +860,13 @@ export const MsgCloseLeaseResponse = { messageTypeRegistry.set(MsgCloseLeaseResponse.$type, MsgCloseLeaseResponse); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/order.ts b/ts/src/generated/akash/market/v1beta4/order.ts index bb963da6..8f35c8c1 100644 --- a/ts/src/generated/akash/market/v1beta4/order.ts +++ b/ts/src/generated/akash/market/v1beta4/order.ts @@ -1,12 +1,12 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { GroupSpec } from '../../deployment/v1beta3/groupspec'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { GroupSpec } from "../../deployment/v1beta3/groupspec"; /** OrderID stores owner and all other seq numbers */ export interface OrderID { - $type: 'akash.market.v1beta4.OrderID'; + $type: "akash.market.v1beta4.OrderID"; owner: string; dseq: Long; gseq: number; @@ -15,7 +15,7 @@ export interface OrderID { /** Order stores orderID, state of order and other details */ export interface Order { - $type: 'akash.market.v1beta4.Order'; + $type: "akash.market.v1beta4.Order"; orderId: OrderID | undefined; state: Order_State; spec: GroupSpec | undefined; @@ -38,19 +38,19 @@ export enum Order_State { export function order_StateFromJSON(object: any): Order_State { switch (object) { case 0: - case 'invalid': + case "invalid": return Order_State.invalid; case 1: - case 'open': + case "open": return Order_State.open; case 2: - case 'active': + case "active": return Order_State.active; case 3: - case 'closed': + case "closed": return Order_State.closed; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return Order_State.UNRECOGNIZED; } @@ -59,22 +59,22 @@ export function order_StateFromJSON(object: any): Order_State { export function order_StateToJSON(object: Order_State): string { switch (object) { case Order_State.invalid: - return 'invalid'; + return "invalid"; case Order_State.open: - return 'open'; + return "open"; case Order_State.active: - return 'active'; + return "active"; case Order_State.closed: - return 'closed'; + return "closed"; case Order_State.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** OrderFilters defines flags for order list filter */ export interface OrderFilters { - $type: 'akash.market.v1beta4.OrderFilters'; + $type: "akash.market.v1beta4.OrderFilters"; owner: string; dseq: Long; gseq: number; @@ -83,23 +83,14 @@ export interface OrderFilters { } function createBaseOrderID(): OrderID { - return { - $type: 'akash.market.v1beta4.OrderID', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - }; + return { $type: "akash.market.v1beta4.OrderID", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0 }; } export const OrderID = { - $type: 'akash.market.v1beta4.OrderID' as const, + $type: "akash.market.v1beta4.OrderID" as const, - encode( - message: OrderID, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -115,8 +106,7 @@ export const OrderID = { }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderID { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderID(); while (reader.pos < end) { @@ -162,7 +152,7 @@ export const OrderID = { fromJSON(object: any): OrderID { return { $type: OrderID.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, @@ -171,7 +161,7 @@ export const OrderID = { toJSON(message: OrderID): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -191,11 +181,8 @@ export const OrderID = { }, fromPartial(object: DeepPartial): OrderID { const message = createBaseOrderID(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; return message; @@ -205,17 +192,11 @@ export const OrderID = { messageTypeRegistry.set(OrderID.$type, OrderID); function createBaseOrder(): Order { - return { - $type: 'akash.market.v1beta4.Order', - orderId: undefined, - state: 0, - spec: undefined, - createdAt: Long.ZERO, - }; + return { $type: "akash.market.v1beta4.Order", orderId: undefined, state: 0, spec: undefined, createdAt: Long.ZERO }; } export const Order = { - $type: 'akash.market.v1beta4.Order' as const, + $type: "akash.market.v1beta4.Order" as const, encode(message: Order, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.orderId !== undefined) { @@ -234,8 +215,7 @@ export const Order = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Order { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrder(); while (reader.pos < end) { @@ -281,14 +261,10 @@ export const Order = { fromJSON(object: any): Order { return { $type: Order.$type, - orderId: isSet(object.orderId) - ? OrderID.fromJSON(object.orderId) - : undefined, + orderId: isSet(object.orderId) ? OrderID.fromJSON(object.orderId) : undefined, state: isSet(object.state) ? order_StateFromJSON(object.state) : 0, spec: isSet(object.spec) ? GroupSpec.fromJSON(object.spec) : undefined, - createdAt: isSet(object.createdAt) - ? Long.fromValue(object.createdAt) - : Long.ZERO, + createdAt: isSet(object.createdAt) ? Long.fromValue(object.createdAt) : Long.ZERO, }; }, @@ -314,19 +290,14 @@ export const Order = { }, fromPartial(object: DeepPartial): Order { const message = createBaseOrder(); - message.orderId = - object.orderId !== undefined && object.orderId !== null - ? OrderID.fromPartial(object.orderId) - : undefined; + message.orderId = (object.orderId !== undefined && object.orderId !== null) + ? OrderID.fromPartial(object.orderId) + : undefined; message.state = object.state ?? 0; - message.spec = - object.spec !== undefined && object.spec !== null - ? GroupSpec.fromPartial(object.spec) - : undefined; - message.createdAt = - object.createdAt !== undefined && object.createdAt !== null - ? Long.fromValue(object.createdAt) - : Long.ZERO; + message.spec = (object.spec !== undefined && object.spec !== null) ? GroupSpec.fromPartial(object.spec) : undefined; + message.createdAt = (object.createdAt !== undefined && object.createdAt !== null) + ? Long.fromValue(object.createdAt) + : Long.ZERO; return message; }, }; @@ -334,24 +305,14 @@ export const Order = { messageTypeRegistry.set(Order.$type, Order); function createBaseOrderFilters(): OrderFilters { - return { - $type: 'akash.market.v1beta4.OrderFilters', - owner: '', - dseq: Long.UZERO, - gseq: 0, - oseq: 0, - state: '', - }; + return { $type: "akash.market.v1beta4.OrderFilters", owner: "", dseq: Long.UZERO, gseq: 0, oseq: 0, state: "" }; } export const OrderFilters = { - $type: 'akash.market.v1beta4.OrderFilters' as const, + $type: "akash.market.v1beta4.OrderFilters" as const, - encode( - message: OrderFilters, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: OrderFilters, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } if (!message.dseq.equals(Long.UZERO)) { @@ -363,15 +324,14 @@ export const OrderFilters = { if (message.oseq !== 0) { writer.uint32(32).uint32(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { writer.uint32(42).string(message.state); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): OrderFilters { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOrderFilters(); while (reader.pos < end) { @@ -424,17 +384,17 @@ export const OrderFilters = { fromJSON(object: any): OrderFilters { return { $type: OrderFilters.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", dseq: isSet(object.dseq) ? Long.fromValue(object.dseq) : Long.UZERO, gseq: isSet(object.gseq) ? globalThis.Number(object.gseq) : 0, oseq: isSet(object.oseq) ? globalThis.Number(object.oseq) : 0, - state: isSet(object.state) ? globalThis.String(object.state) : '', + state: isSet(object.state) ? globalThis.String(object.state) : "", }; }, toJSON(message: OrderFilters): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } if (!message.dseq.equals(Long.UZERO)) { @@ -446,7 +406,7 @@ export const OrderFilters = { if (message.oseq !== 0) { obj.oseq = Math.round(message.oseq); } - if (message.state !== '') { + if (message.state !== "") { obj.state = message.state; } return obj; @@ -457,40 +417,24 @@ export const OrderFilters = { }, fromPartial(object: DeepPartial): OrderFilters { const message = createBaseOrderFilters(); - message.owner = object.owner ?? ''; - message.dseq = - object.dseq !== undefined && object.dseq !== null - ? Long.fromValue(object.dseq) - : Long.UZERO; + message.owner = object.owner ?? ""; + message.dseq = (object.dseq !== undefined && object.dseq !== null) ? Long.fromValue(object.dseq) : Long.UZERO; message.gseq = object.gseq ?? 0; message.oseq = object.oseq ?? 0; - message.state = object.state ?? ''; + message.state = object.state ?? ""; return message; }, }; messageTypeRegistry.set(OrderFilters.$type, OrderFilters); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/params.ts b/ts/src/generated/akash/market/v1beta4/params.ts index c231550d..44fc1cb5 100644 --- a/ts/src/generated/akash/market/v1beta4/params.ts +++ b/ts/src/generated/akash/market/v1beta4/params.ts @@ -1,31 +1,24 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Coin } from '../../../cosmos/base/v1beta1/coin'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Coin } from "../../../cosmos/base/v1beta1/coin"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params is the params for the x/market module */ export interface Params { - $type: 'akash.market.v1beta4.Params'; + $type: "akash.market.v1beta4.Params"; bidMinDeposit: Coin | undefined; orderMaxBids: number; } function createBaseParams(): Params { - return { - $type: 'akash.market.v1beta4.Params', - bidMinDeposit: undefined, - orderMaxBids: 0, - }; + return { $type: "akash.market.v1beta4.Params", bidMinDeposit: undefined, orderMaxBids: 0 }; } export const Params = { - $type: 'akash.market.v1beta4.Params' as const, + $type: "akash.market.v1beta4.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bidMinDeposit !== undefined) { Coin.encode(message.bidMinDeposit, writer.uint32(10).fork()).ldelim(); } @@ -36,8 +29,7 @@ export const Params = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -69,12 +61,8 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - bidMinDeposit: isSet(object.bidMinDeposit) - ? Coin.fromJSON(object.bidMinDeposit) - : undefined, - orderMaxBids: isSet(object.orderMaxBids) - ? globalThis.Number(object.orderMaxBids) - : 0, + bidMinDeposit: isSet(object.bidMinDeposit) ? Coin.fromJSON(object.bidMinDeposit) : undefined, + orderMaxBids: isSet(object.orderMaxBids) ? globalThis.Number(object.orderMaxBids) : 0, }; }, @@ -94,10 +82,9 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.bidMinDeposit = - object.bidMinDeposit !== undefined && object.bidMinDeposit !== null - ? Coin.fromPartial(object.bidMinDeposit) - : undefined; + message.bidMinDeposit = (object.bidMinDeposit !== undefined && object.bidMinDeposit !== null) + ? Coin.fromPartial(object.bidMinDeposit) + : undefined; message.orderMaxBids = object.orderMaxBids ?? 0; return message; }, @@ -105,26 +92,13 @@ export const Params = { messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/query.ts b/ts/src/generated/akash/market/v1beta4/query.ts index cd050e2c..c729af7a 100644 --- a/ts/src/generated/akash/market/v1beta4/query.ts +++ b/ts/src/generated/akash/market/v1beta4/query.ts @@ -1,111 +1,101 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Account, FractionalPayment } from '../../escrow/v1beta3/types'; -import { Bid, BidFilters, BidID } from './bid'; -import { Lease, LeaseFilters, LeaseID } from './lease'; -import { Order, OrderFilters, OrderID } from './order'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Account, FractionalPayment } from "../../escrow/v1beta3/types"; +import { Bid, BidFilters, BidID } from "./bid"; +import { Lease, LeaseFilters, LeaseID } from "./lease"; +import { Order, OrderFilters, OrderID } from "./order"; /** QueryOrdersRequest is request type for the Query/Orders RPC method */ export interface QueryOrdersRequest { - $type: 'akash.market.v1beta4.QueryOrdersRequest'; + $type: "akash.market.v1beta4.QueryOrdersRequest"; filters: OrderFilters | undefined; pagination: PageRequest | undefined; } /** QueryOrdersResponse is response type for the Query/Orders RPC method */ export interface QueryOrdersResponse { - $type: 'akash.market.v1beta4.QueryOrdersResponse'; + $type: "akash.market.v1beta4.QueryOrdersResponse"; orders: Order[]; pagination: PageResponse | undefined; } /** QueryOrderRequest is request type for the Query/Order RPC method */ export interface QueryOrderRequest { - $type: 'akash.market.v1beta4.QueryOrderRequest'; + $type: "akash.market.v1beta4.QueryOrderRequest"; id: OrderID | undefined; } /** QueryOrderResponse is response type for the Query/Order RPC method */ export interface QueryOrderResponse { - $type: 'akash.market.v1beta4.QueryOrderResponse'; + $type: "akash.market.v1beta4.QueryOrderResponse"; order: Order | undefined; } /** QueryBidsRequest is request type for the Query/Bids RPC method */ export interface QueryBidsRequest { - $type: 'akash.market.v1beta4.QueryBidsRequest'; + $type: "akash.market.v1beta4.QueryBidsRequest"; filters: BidFilters | undefined; pagination: PageRequest | undefined; } /** QueryBidsResponse is response type for the Query/Bids RPC method */ export interface QueryBidsResponse { - $type: 'akash.market.v1beta4.QueryBidsResponse'; + $type: "akash.market.v1beta4.QueryBidsResponse"; bids: QueryBidResponse[]; pagination: PageResponse | undefined; } /** QueryBidRequest is request type for the Query/Bid RPC method */ export interface QueryBidRequest { - $type: 'akash.market.v1beta4.QueryBidRequest'; + $type: "akash.market.v1beta4.QueryBidRequest"; id: BidID | undefined; } /** QueryBidResponse is response type for the Query/Bid RPC method */ export interface QueryBidResponse { - $type: 'akash.market.v1beta4.QueryBidResponse'; + $type: "akash.market.v1beta4.QueryBidResponse"; bid: Bid | undefined; escrowAccount: Account | undefined; } /** QueryLeasesRequest is request type for the Query/Leases RPC method */ export interface QueryLeasesRequest { - $type: 'akash.market.v1beta4.QueryLeasesRequest'; + $type: "akash.market.v1beta4.QueryLeasesRequest"; filters: LeaseFilters | undefined; pagination: PageRequest | undefined; } /** QueryLeasesResponse is response type for the Query/Leases RPC method */ export interface QueryLeasesResponse { - $type: 'akash.market.v1beta4.QueryLeasesResponse'; + $type: "akash.market.v1beta4.QueryLeasesResponse"; leases: QueryLeaseResponse[]; pagination: PageResponse | undefined; } /** QueryLeaseRequest is request type for the Query/Lease RPC method */ export interface QueryLeaseRequest { - $type: 'akash.market.v1beta4.QueryLeaseRequest'; + $type: "akash.market.v1beta4.QueryLeaseRequest"; id: LeaseID | undefined; } /** QueryLeaseResponse is response type for the Query/Lease RPC method */ export interface QueryLeaseResponse { - $type: 'akash.market.v1beta4.QueryLeaseResponse'; + $type: "akash.market.v1beta4.QueryLeaseResponse"; lease: Lease | undefined; escrowPayment: FractionalPayment | undefined; } function createBaseQueryOrdersRequest(): QueryOrdersRequest { - return { - $type: 'akash.market.v1beta4.QueryOrdersRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryOrdersRequest", filters: undefined, pagination: undefined }; } export const QueryOrdersRequest = { - $type: 'akash.market.v1beta4.QueryOrdersRequest' as const, + $type: "akash.market.v1beta4.QueryOrdersRequest" as const, - encode( - message: QueryOrdersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { OrderFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -116,8 +106,7 @@ export const QueryOrdersRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersRequest(); while (reader.pos < end) { @@ -149,12 +138,8 @@ export const QueryOrdersRequest = { fromJSON(object: any): QueryOrdersRequest { return { $type: QueryOrdersRequest.$type, - filters: isSet(object.filters) - ? OrderFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? OrderFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -174,14 +159,12 @@ export const QueryOrdersRequest = { }, fromPartial(object: DeepPartial): QueryOrdersRequest { const message = createBaseQueryOrdersRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? OrderFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? OrderFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -189,35 +172,24 @@ export const QueryOrdersRequest = { messageTypeRegistry.set(QueryOrdersRequest.$type, QueryOrdersRequest); function createBaseQueryOrdersResponse(): QueryOrdersResponse { - return { - $type: 'akash.market.v1beta4.QueryOrdersResponse', - orders: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryOrdersResponse", orders: [], pagination: undefined }; } export const QueryOrdersResponse = { - $type: 'akash.market.v1beta4.QueryOrdersResponse' as const, + $type: "akash.market.v1beta4.QueryOrdersResponse" as const, - encode( - message: QueryOrdersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrdersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.orders) { Order.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrdersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrdersResponse(); while (reader.pos < end) { @@ -249,12 +221,8 @@ export const QueryOrdersResponse = { fromJSON(object: any): QueryOrdersResponse { return { $type: QueryOrdersResponse.$type, - orders: globalThis.Array.isArray(object?.orders) - ? object.orders.map((e: any) => Order.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + orders: globalThis.Array.isArray(object?.orders) ? object.orders.map((e: any) => Order.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -275,10 +243,9 @@ export const QueryOrdersResponse = { fromPartial(object: DeepPartial): QueryOrdersResponse { const message = createBaseQueryOrdersResponse(); message.orders = object.orders?.map((e) => Order.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -286,16 +253,13 @@ export const QueryOrdersResponse = { messageTypeRegistry.set(QueryOrdersResponse.$type, QueryOrdersResponse); function createBaseQueryOrderRequest(): QueryOrderRequest { - return { $type: 'akash.market.v1beta4.QueryOrderRequest', id: undefined }; + return { $type: "akash.market.v1beta4.QueryOrderRequest", id: undefined }; } export const QueryOrderRequest = { - $type: 'akash.market.v1beta4.QueryOrderRequest' as const, + $type: "akash.market.v1beta4.QueryOrderRequest" as const, - encode( - message: QueryOrderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { OrderID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -303,8 +267,7 @@ export const QueryOrderRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderRequest(); while (reader.pos < end) { @@ -327,10 +290,7 @@ export const QueryOrderRequest = { }, fromJSON(object: any): QueryOrderRequest { - return { - $type: QueryOrderRequest.$type, - id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined, - }; + return { $type: QueryOrderRequest.$type, id: isSet(object.id) ? OrderID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryOrderRequest): unknown { @@ -346,10 +306,7 @@ export const QueryOrderRequest = { }, fromPartial(object: DeepPartial): QueryOrderRequest { const message = createBaseQueryOrderRequest(); - message.id = - object.id !== undefined && object.id !== null - ? OrderID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? OrderID.fromPartial(object.id) : undefined; return message; }, }; @@ -357,16 +314,13 @@ export const QueryOrderRequest = { messageTypeRegistry.set(QueryOrderRequest.$type, QueryOrderRequest); function createBaseQueryOrderResponse(): QueryOrderResponse { - return { $type: 'akash.market.v1beta4.QueryOrderResponse', order: undefined }; + return { $type: "akash.market.v1beta4.QueryOrderResponse", order: undefined }; } export const QueryOrderResponse = { - $type: 'akash.market.v1beta4.QueryOrderResponse' as const, + $type: "akash.market.v1beta4.QueryOrderResponse" as const, - encode( - message: QueryOrderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryOrderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.order !== undefined) { Order.encode(message.order, writer.uint32(10).fork()).ldelim(); } @@ -374,8 +328,7 @@ export const QueryOrderResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryOrderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryOrderResponse(); while (reader.pos < end) { @@ -398,10 +351,7 @@ export const QueryOrderResponse = { }, fromJSON(object: any): QueryOrderResponse { - return { - $type: QueryOrderResponse.$type, - order: isSet(object.order) ? Order.fromJSON(object.order) : undefined, - }; + return { $type: QueryOrderResponse.$type, order: isSet(object.order) ? Order.fromJSON(object.order) : undefined }; }, toJSON(message: QueryOrderResponse): unknown { @@ -417,10 +367,7 @@ export const QueryOrderResponse = { }, fromPartial(object: DeepPartial): QueryOrderResponse { const message = createBaseQueryOrderResponse(); - message.order = - object.order !== undefined && object.order !== null - ? Order.fromPartial(object.order) - : undefined; + message.order = (object.order !== undefined && object.order !== null) ? Order.fromPartial(object.order) : undefined; return message; }, }; @@ -428,20 +375,13 @@ export const QueryOrderResponse = { messageTypeRegistry.set(QueryOrderResponse.$type, QueryOrderResponse); function createBaseQueryBidsRequest(): QueryBidsRequest { - return { - $type: 'akash.market.v1beta4.QueryBidsRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryBidsRequest", filters: undefined, pagination: undefined }; } export const QueryBidsRequest = { - $type: 'akash.market.v1beta4.QueryBidsRequest' as const, + $type: "akash.market.v1beta4.QueryBidsRequest" as const, - encode( - message: QueryBidsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { BidFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -452,8 +392,7 @@ export const QueryBidsRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsRequest(); while (reader.pos < end) { @@ -485,12 +424,8 @@ export const QueryBidsRequest = { fromJSON(object: any): QueryBidsRequest { return { $type: QueryBidsRequest.$type, - filters: isSet(object.filters) - ? BidFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? BidFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -510,14 +445,12 @@ export const QueryBidsRequest = { }, fromPartial(object: DeepPartial): QueryBidsRequest { const message = createBaseQueryBidsRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? BidFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? BidFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -525,35 +458,24 @@ export const QueryBidsRequest = { messageTypeRegistry.set(QueryBidsRequest.$type, QueryBidsRequest); function createBaseQueryBidsResponse(): QueryBidsResponse { - return { - $type: 'akash.market.v1beta4.QueryBidsResponse', - bids: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryBidsResponse", bids: [], pagination: undefined }; } export const QueryBidsResponse = { - $type: 'akash.market.v1beta4.QueryBidsResponse' as const, + $type: "akash.market.v1beta4.QueryBidsResponse" as const, - encode( - message: QueryBidsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.bids) { QueryBidResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidsResponse(); while (reader.pos < end) { @@ -585,12 +507,8 @@ export const QueryBidsResponse = { fromJSON(object: any): QueryBidsResponse { return { $type: QueryBidsResponse.$type, - bids: globalThis.Array.isArray(object?.bids) - ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) - : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + bids: globalThis.Array.isArray(object?.bids) ? object.bids.map((e: any) => QueryBidResponse.fromJSON(e)) : [], + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -610,12 +528,10 @@ export const QueryBidsResponse = { }, fromPartial(object: DeepPartial): QueryBidsResponse { const message = createBaseQueryBidsResponse(); - message.bids = - object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.bids = object.bids?.map((e) => QueryBidResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -623,16 +539,13 @@ export const QueryBidsResponse = { messageTypeRegistry.set(QueryBidsResponse.$type, QueryBidsResponse); function createBaseQueryBidRequest(): QueryBidRequest { - return { $type: 'akash.market.v1beta4.QueryBidRequest', id: undefined }; + return { $type: "akash.market.v1beta4.QueryBidRequest", id: undefined }; } export const QueryBidRequest = { - $type: 'akash.market.v1beta4.QueryBidRequest' as const, + $type: "akash.market.v1beta4.QueryBidRequest" as const, - encode( - message: QueryBidRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { BidID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -640,8 +553,7 @@ export const QueryBidRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidRequest(); while (reader.pos < end) { @@ -664,10 +576,7 @@ export const QueryBidRequest = { }, fromJSON(object: any): QueryBidRequest { - return { - $type: QueryBidRequest.$type, - id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined, - }; + return { $type: QueryBidRequest.$type, id: isSet(object.id) ? BidID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryBidRequest): unknown { @@ -683,10 +592,7 @@ export const QueryBidRequest = { }, fromPartial(object: DeepPartial): QueryBidRequest { const message = createBaseQueryBidRequest(); - message.id = - object.id !== undefined && object.id !== null - ? BidID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? BidID.fromPartial(object.id) : undefined; return message; }, }; @@ -694,20 +600,13 @@ export const QueryBidRequest = { messageTypeRegistry.set(QueryBidRequest.$type, QueryBidRequest); function createBaseQueryBidResponse(): QueryBidResponse { - return { - $type: 'akash.market.v1beta4.QueryBidResponse', - bid: undefined, - escrowAccount: undefined, - }; + return { $type: "akash.market.v1beta4.QueryBidResponse", bid: undefined, escrowAccount: undefined }; } export const QueryBidResponse = { - $type: 'akash.market.v1beta4.QueryBidResponse' as const, + $type: "akash.market.v1beta4.QueryBidResponse" as const, - encode( - message: QueryBidResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryBidResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.bid !== undefined) { Bid.encode(message.bid, writer.uint32(10).fork()).ldelim(); } @@ -718,8 +617,7 @@ export const QueryBidResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryBidResponse(); while (reader.pos < end) { @@ -752,9 +650,7 @@ export const QueryBidResponse = { return { $type: QueryBidResponse.$type, bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined, - escrowAccount: isSet(object.escrowAccount) - ? Account.fromJSON(object.escrowAccount) - : undefined, + escrowAccount: isSet(object.escrowAccount) ? Account.fromJSON(object.escrowAccount) : undefined, }; }, @@ -774,14 +670,10 @@ export const QueryBidResponse = { }, fromPartial(object: DeepPartial): QueryBidResponse { const message = createBaseQueryBidResponse(); - message.bid = - object.bid !== undefined && object.bid !== null - ? Bid.fromPartial(object.bid) - : undefined; - message.escrowAccount = - object.escrowAccount !== undefined && object.escrowAccount !== null - ? Account.fromPartial(object.escrowAccount) - : undefined; + message.bid = (object.bid !== undefined && object.bid !== null) ? Bid.fromPartial(object.bid) : undefined; + message.escrowAccount = (object.escrowAccount !== undefined && object.escrowAccount !== null) + ? Account.fromPartial(object.escrowAccount) + : undefined; return message; }, }; @@ -789,20 +681,13 @@ export const QueryBidResponse = { messageTypeRegistry.set(QueryBidResponse.$type, QueryBidResponse); function createBaseQueryLeasesRequest(): QueryLeasesRequest { - return { - $type: 'akash.market.v1beta4.QueryLeasesRequest', - filters: undefined, - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryLeasesRequest", filters: undefined, pagination: undefined }; } export const QueryLeasesRequest = { - $type: 'akash.market.v1beta4.QueryLeasesRequest' as const, + $type: "akash.market.v1beta4.QueryLeasesRequest" as const, - encode( - message: QueryLeasesRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.filters !== undefined) { LeaseFilters.encode(message.filters, writer.uint32(10).fork()).ldelim(); } @@ -813,8 +698,7 @@ export const QueryLeasesRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesRequest(); while (reader.pos < end) { @@ -846,12 +730,8 @@ export const QueryLeasesRequest = { fromJSON(object: any): QueryLeasesRequest { return { $type: QueryLeasesRequest.$type, - filters: isSet(object.filters) - ? LeaseFilters.fromJSON(object.filters) - : undefined, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + filters: isSet(object.filters) ? LeaseFilters.fromJSON(object.filters) : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -871,14 +751,12 @@ export const QueryLeasesRequest = { }, fromPartial(object: DeepPartial): QueryLeasesRequest { const message = createBaseQueryLeasesRequest(); - message.filters = - object.filters !== undefined && object.filters !== null - ? LeaseFilters.fromPartial(object.filters) - : undefined; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.filters = (object.filters !== undefined && object.filters !== null) + ? LeaseFilters.fromPartial(object.filters) + : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -886,35 +764,24 @@ export const QueryLeasesRequest = { messageTypeRegistry.set(QueryLeasesRequest.$type, QueryLeasesRequest); function createBaseQueryLeasesResponse(): QueryLeasesResponse { - return { - $type: 'akash.market.v1beta4.QueryLeasesResponse', - leases: [], - pagination: undefined, - }; + return { $type: "akash.market.v1beta4.QueryLeasesResponse", leases: [], pagination: undefined }; } export const QueryLeasesResponse = { - $type: 'akash.market.v1beta4.QueryLeasesResponse' as const, + $type: "akash.market.v1beta4.QueryLeasesResponse" as const, - encode( - message: QueryLeasesResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeasesResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.leases) { QueryLeaseResponse.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeasesResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeasesResponse(); while (reader.pos < end) { @@ -925,9 +792,7 @@ export const QueryLeasesResponse = { break; } - message.leases.push( - QueryLeaseResponse.decode(reader, reader.uint32()), - ); + message.leases.push(QueryLeaseResponse.decode(reader, reader.uint32())); continue; case 2: if (tag !== 18) { @@ -951,9 +816,7 @@ export const QueryLeasesResponse = { leases: globalThis.Array.isArray(object?.leases) ? object.leases.map((e: any) => QueryLeaseResponse.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -973,12 +836,10 @@ export const QueryLeasesResponse = { }, fromPartial(object: DeepPartial): QueryLeasesResponse { const message = createBaseQueryLeasesResponse(); - message.leases = - object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.leases = object.leases?.map((e) => QueryLeaseResponse.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -986,16 +847,13 @@ export const QueryLeasesResponse = { messageTypeRegistry.set(QueryLeasesResponse.$type, QueryLeasesResponse); function createBaseQueryLeaseRequest(): QueryLeaseRequest { - return { $type: 'akash.market.v1beta4.QueryLeaseRequest', id: undefined }; + return { $type: "akash.market.v1beta4.QueryLeaseRequest", id: undefined }; } export const QueryLeaseRequest = { - $type: 'akash.market.v1beta4.QueryLeaseRequest' as const, + $type: "akash.market.v1beta4.QueryLeaseRequest" as const, - encode( - message: QueryLeaseRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.id !== undefined) { LeaseID.encode(message.id, writer.uint32(10).fork()).ldelim(); } @@ -1003,8 +861,7 @@ export const QueryLeaseRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseRequest(); while (reader.pos < end) { @@ -1027,10 +884,7 @@ export const QueryLeaseRequest = { }, fromJSON(object: any): QueryLeaseRequest { - return { - $type: QueryLeaseRequest.$type, - id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined, - }; + return { $type: QueryLeaseRequest.$type, id: isSet(object.id) ? LeaseID.fromJSON(object.id) : undefined }; }, toJSON(message: QueryLeaseRequest): unknown { @@ -1046,10 +900,7 @@ export const QueryLeaseRequest = { }, fromPartial(object: DeepPartial): QueryLeaseRequest { const message = createBaseQueryLeaseRequest(); - message.id = - object.id !== undefined && object.id !== null - ? LeaseID.fromPartial(object.id) - : undefined; + message.id = (object.id !== undefined && object.id !== null) ? LeaseID.fromPartial(object.id) : undefined; return message; }, }; @@ -1057,35 +908,24 @@ export const QueryLeaseRequest = { messageTypeRegistry.set(QueryLeaseRequest.$type, QueryLeaseRequest); function createBaseQueryLeaseResponse(): QueryLeaseResponse { - return { - $type: 'akash.market.v1beta4.QueryLeaseResponse', - lease: undefined, - escrowPayment: undefined, - }; + return { $type: "akash.market.v1beta4.QueryLeaseResponse", lease: undefined, escrowPayment: undefined }; } export const QueryLeaseResponse = { - $type: 'akash.market.v1beta4.QueryLeaseResponse' as const, + $type: "akash.market.v1beta4.QueryLeaseResponse" as const, - encode( - message: QueryLeaseResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryLeaseResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.lease !== undefined) { Lease.encode(message.lease, writer.uint32(10).fork()).ldelim(); } if (message.escrowPayment !== undefined) { - FractionalPayment.encode( - message.escrowPayment, - writer.uint32(18).fork(), - ).ldelim(); + FractionalPayment.encode(message.escrowPayment, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QueryLeaseResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryLeaseResponse(); while (reader.pos < end) { @@ -1103,10 +943,7 @@ export const QueryLeaseResponse = { break; } - message.escrowPayment = FractionalPayment.decode( - reader, - reader.uint32(), - ); + message.escrowPayment = FractionalPayment.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1121,9 +958,7 @@ export const QueryLeaseResponse = { return { $type: QueryLeaseResponse.$type, lease: isSet(object.lease) ? Lease.fromJSON(object.lease) : undefined, - escrowPayment: isSet(object.escrowPayment) - ? FractionalPayment.fromJSON(object.escrowPayment) - : undefined, + escrowPayment: isSet(object.escrowPayment) ? FractionalPayment.fromJSON(object.escrowPayment) : undefined, }; }, @@ -1143,14 +978,10 @@ export const QueryLeaseResponse = { }, fromPartial(object: DeepPartial): QueryLeaseResponse { const message = createBaseQueryLeaseResponse(); - message.lease = - object.lease !== undefined && object.lease !== null - ? Lease.fromPartial(object.lease) - : undefined; - message.escrowPayment = - object.escrowPayment !== undefined && object.escrowPayment !== null - ? FractionalPayment.fromPartial(object.escrowPayment) - : undefined; + message.lease = (object.lease !== undefined && object.lease !== null) ? Lease.fromPartial(object.lease) : undefined; + message.escrowPayment = (object.escrowPayment !== undefined && object.escrowPayment !== null) + ? FractionalPayment.fromPartial(object.escrowPayment) + : undefined; return message; }, }; @@ -1173,7 +1004,7 @@ export interface Query { Lease(request: QueryLeaseRequest): Promise; } -export const QueryServiceName = 'akash.market.v1beta4.Query'; +export const QueryServiceName = "akash.market.v1beta4.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -1189,81 +1020,52 @@ export class QueryClientImpl implements Query { } Orders(request: QueryOrdersRequest): Promise { const data = QueryOrdersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Orders', data); - return promise.then((data) => - QueryOrdersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Orders", data); + return promise.then((data) => QueryOrdersResponse.decode(_m0.Reader.create(data))); } Order(request: QueryOrderRequest): Promise { const data = QueryOrderRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Order', data); - return promise.then((data) => - QueryOrderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Order", data); + return promise.then((data) => QueryOrderResponse.decode(_m0.Reader.create(data))); } Bids(request: QueryBidsRequest): Promise { const data = QueryBidsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bids', data); - return promise.then((data) => - QueryBidsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bids", data); + return promise.then((data) => QueryBidsResponse.decode(_m0.Reader.create(data))); } Bid(request: QueryBidRequest): Promise { const data = QueryBidRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Bid', data); - return promise.then((data) => - QueryBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Bid", data); + return promise.then((data) => QueryBidResponse.decode(_m0.Reader.create(data))); } Leases(request: QueryLeasesRequest): Promise { const data = QueryLeasesRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Leases', data); - return promise.then((data) => - QueryLeasesResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Leases", data); + return promise.then((data) => QueryLeasesResponse.decode(_m0.Reader.create(data))); } Lease(request: QueryLeaseRequest): Promise { const data = QueryLeaseRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Lease', data); - return promise.then((data) => - QueryLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Lease", data); + return promise.then((data) => QueryLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/market/v1beta4/service.ts b/ts/src/generated/akash/market/v1beta4/service.ts index 7e06a92a..dc5eec8c 100644 --- a/ts/src/generated/akash/market/v1beta4/service.ts +++ b/ts/src/generated/akash/market/v1beta4/service.ts @@ -1,11 +1,6 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; -import { - MsgCloseBid, - MsgCloseBidResponse, - MsgCreateBid, - MsgCreateBidResponse, -} from './bid'; +import _m0 from "protobufjs/minimal"; +import { MsgCloseBid, MsgCloseBidResponse, MsgCreateBid, MsgCreateBidResponse } from "./bid"; import { MsgCloseLease, MsgCloseLeaseResponse, @@ -13,7 +8,7 @@ import { MsgCreateLeaseResponse, MsgWithdrawLease, MsgWithdrawLeaseResponse, -} from './lease'; +} from "./lease"; /** Msg defines the market Msg service */ export interface Msg { @@ -29,7 +24,7 @@ export interface Msg { CloseLease(request: MsgCloseLease): Promise; } -export const MsgServiceName = 'akash.market.v1beta4.Msg'; +export const MsgServiceName = "akash.market.v1beta4.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -44,49 +39,35 @@ export class MsgClientImpl implements Msg { } CreateBid(request: MsgCreateBid): Promise { const data = MsgCreateBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateBid', data); - return promise.then((data) => - MsgCreateBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateBid", data); + return promise.then((data) => MsgCreateBidResponse.decode(_m0.Reader.create(data))); } CloseBid(request: MsgCloseBid): Promise { const data = MsgCloseBid.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseBid', data); - return promise.then((data) => - MsgCloseBidResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseBid", data); + return promise.then((data) => MsgCloseBidResponse.decode(_m0.Reader.create(data))); } WithdrawLease(request: MsgWithdrawLease): Promise { const data = MsgWithdrawLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'WithdrawLease', data); - return promise.then((data) => - MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "WithdrawLease", data); + return promise.then((data) => MsgWithdrawLeaseResponse.decode(_m0.Reader.create(data))); } CreateLease(request: MsgCreateLease): Promise { const data = MsgCreateLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateLease', data); - return promise.then((data) => - MsgCreateLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateLease", data); + return promise.then((data) => MsgCreateLeaseResponse.decode(_m0.Reader.create(data))); } CloseLease(request: MsgCloseLease): Promise { const data = MsgCloseLease.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CloseLease', data); - return promise.then((data) => - MsgCloseLeaseResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CloseLease", data); + return promise.then((data) => MsgCloseLeaseResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/akash/provider/lease/v1/service.ts b/ts/src/generated/akash/provider/lease/v1/service.ts index f7ed9853..02862cde 100644 --- a/ts/src/generated/akash/provider/lease/v1/service.ts +++ b/ts/src/generated/akash/provider/lease/v1/service.ts @@ -1,15 +1,15 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { messageTypeRegistry } from '../../../../typeRegistry'; -import { Group } from '../../../manifest/v2beta2/group'; -import { LeaseID } from '../../../market/v1beta4/lease'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { messageTypeRegistry } from "../../../../typeRegistry"; +import { Group } from "../../../manifest/v2beta2/group"; +import { LeaseID } from "../../../market/v1beta4/lease"; /** LeaseServiceStatus */ export interface LeaseServiceStatus { - $type: 'akash.provider.lease.v1.LeaseServiceStatus'; + $type: "akash.provider.lease.v1.LeaseServiceStatus"; available: number; total: number; uris: string[]; @@ -22,7 +22,7 @@ export interface LeaseServiceStatus { /** LeaseIPStatus */ export interface LeaseIPStatus { - $type: 'akash.provider.lease.v1.LeaseIPStatus'; + $type: "akash.provider.lease.v1.LeaseIPStatus"; port: number; externalPort: number; protocol: string; @@ -31,7 +31,7 @@ export interface LeaseIPStatus { /** ForwarderPortStatus */ export interface ForwarderPortStatus { - $type: 'akash.provider.lease.v1.ForwarderPortStatus'; + $type: "akash.provider.lease.v1.ForwarderPortStatus"; host: string; port: number; externalPort: number; @@ -41,7 +41,7 @@ export interface ForwarderPortStatus { /** ServiceStatus */ export interface ServiceStatus { - $type: 'akash.provider.lease.v1.ServiceStatus'; + $type: "akash.provider.lease.v1.ServiceStatus"; name: string; status: LeaseServiceStatus | undefined; ports: ForwarderPortStatus[]; @@ -50,58 +50,59 @@ export interface ServiceStatus { /** SendManifestRequest is request type for the SendManifest Providers RPC method */ export interface SendManifestRequest { - $type: 'akash.provider.lease.v1.SendManifestRequest'; + $type: "akash.provider.lease.v1.SendManifestRequest"; leaseId: LeaseID | undefined; manifest: Group[]; } /** SendManifestResponse is response type for the SendManifest Providers RPC method */ export interface SendManifestResponse { - $type: 'akash.provider.lease.v1.SendManifestResponse'; + $type: "akash.provider.lease.v1.SendManifestResponse"; } /** ServiceLogsRequest */ export interface ServiceLogsRequest { - $type: 'akash.provider.lease.v1.ServiceLogsRequest'; + $type: "akash.provider.lease.v1.ServiceLogsRequest"; leaseId: LeaseID | undefined; services: string[]; + lines: number; } /** ServiceLogs */ export interface ServiceLogs { - $type: 'akash.provider.lease.v1.ServiceLogs'; + $type: "akash.provider.lease.v1.ServiceLogs"; name: string; logs: Uint8Array; } /** ServiceLogsResponse */ export interface ServiceLogsResponse { - $type: 'akash.provider.lease.v1.ServiceLogsResponse'; + $type: "akash.provider.lease.v1.ServiceLogsResponse"; services: ServiceLogs[]; } /** ShellRequest */ export interface ShellRequest { - $type: 'akash.provider.lease.v1.ShellRequest'; + $type: "akash.provider.lease.v1.ShellRequest"; leaseId: LeaseID | undefined; } /** ServiceStatusRequest */ export interface ServiceStatusRequest { - $type: 'akash.provider.lease.v1.ServiceStatusRequest'; + $type: "akash.provider.lease.v1.ServiceStatusRequest"; leaseId: LeaseID | undefined; services: string[]; } /** ServiceStatusResponse */ export interface ServiceStatusResponse { - $type: 'akash.provider.lease.v1.ServiceStatusResponse'; + $type: "akash.provider.lease.v1.ServiceStatusResponse"; services: ServiceStatus[]; } function createBaseLeaseServiceStatus(): LeaseServiceStatus { return { - $type: 'akash.provider.lease.v1.LeaseServiceStatus', + $type: "akash.provider.lease.v1.LeaseServiceStatus", available: 0, total: 0, uris: [], @@ -114,12 +115,9 @@ function createBaseLeaseServiceStatus(): LeaseServiceStatus { } export const LeaseServiceStatus = { - $type: 'akash.provider.lease.v1.LeaseServiceStatus' as const, + $type: "akash.provider.lease.v1.LeaseServiceStatus" as const, - encode( - message: LeaseServiceStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: LeaseServiceStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.available !== 0) { writer.uint32(8).int32(message.available); } @@ -148,8 +146,7 @@ export const LeaseServiceStatus = { }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseServiceStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseServiceStatus(); while (reader.pos < end) { @@ -223,26 +220,14 @@ export const LeaseServiceStatus = { fromJSON(object: any): LeaseServiceStatus { return { $type: LeaseServiceStatus.$type, - available: isSet(object.available) - ? globalThis.Number(object.available) - : 0, + available: isSet(object.available) ? globalThis.Number(object.available) : 0, total: isSet(object.total) ? globalThis.Number(object.total) : 0, - uris: globalThis.Array.isArray(object?.uris) - ? object.uris.map((e: any) => globalThis.String(e)) - : [], - observedGeneration: isSet(object.observedGeneration) - ? Long.fromValue(object.observedGeneration) - : Long.ZERO, + uris: globalThis.Array.isArray(object?.uris) ? object.uris.map((e: any) => globalThis.String(e)) : [], + observedGeneration: isSet(object.observedGeneration) ? Long.fromValue(object.observedGeneration) : Long.ZERO, replicas: isSet(object.replicas) ? globalThis.Number(object.replicas) : 0, - updatedReplicas: isSet(object.updatedReplicas) - ? globalThis.Number(object.updatedReplicas) - : 0, - readyReplicas: isSet(object.readyReplicas) - ? globalThis.Number(object.readyReplicas) - : 0, - availableReplicas: isSet(object.availableReplicas) - ? globalThis.Number(object.availableReplicas) - : 0, + updatedReplicas: isSet(object.updatedReplicas) ? globalThis.Number(object.updatedReplicas) : 0, + readyReplicas: isSet(object.readyReplicas) ? globalThis.Number(object.readyReplicas) : 0, + availableReplicas: isSet(object.availableReplicas) ? globalThis.Number(object.availableReplicas) : 0, }; }, @@ -258,9 +243,7 @@ export const LeaseServiceStatus = { obj.uris = message.uris; } if (!message.observedGeneration.equals(Long.ZERO)) { - obj.observedGeneration = ( - message.observedGeneration || Long.ZERO - ).toString(); + obj.observedGeneration = (message.observedGeneration || Long.ZERO).toString(); } if (message.replicas !== 0) { obj.replicas = Math.round(message.replicas); @@ -285,11 +268,9 @@ export const LeaseServiceStatus = { message.available = object.available ?? 0; message.total = object.total ?? 0; message.uris = object.uris?.map((e) => e) || []; - message.observedGeneration = - object.observedGeneration !== undefined && - object.observedGeneration !== null - ? Long.fromValue(object.observedGeneration) - : Long.ZERO; + message.observedGeneration = (object.observedGeneration !== undefined && object.observedGeneration !== null) + ? Long.fromValue(object.observedGeneration) + : Long.ZERO; message.replicas = object.replicas ?? 0; message.updatedReplicas = object.updatedReplicas ?? 0; message.readyReplicas = object.readyReplicas ?? 0; @@ -301,40 +282,30 @@ export const LeaseServiceStatus = { messageTypeRegistry.set(LeaseServiceStatus.$type, LeaseServiceStatus); function createBaseLeaseIPStatus(): LeaseIPStatus { - return { - $type: 'akash.provider.lease.v1.LeaseIPStatus', - port: 0, - externalPort: 0, - protocol: '', - ip: '', - }; + return { $type: "akash.provider.lease.v1.LeaseIPStatus", port: 0, externalPort: 0, protocol: "", ip: "" }; } export const LeaseIPStatus = { - $type: 'akash.provider.lease.v1.LeaseIPStatus' as const, + $type: "akash.provider.lease.v1.LeaseIPStatus" as const, - encode( - message: LeaseIPStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: LeaseIPStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.port !== 0) { writer.uint32(8).uint32(message.port); } if (message.externalPort !== 0) { writer.uint32(16).uint32(message.externalPort); } - if (message.protocol !== '') { + if (message.protocol !== "") { writer.uint32(26).string(message.protocol); } - if (message.ip !== '') { + if (message.ip !== "") { writer.uint32(34).string(message.ip); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): LeaseIPStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeaseIPStatus(); while (reader.pos < end) { @@ -381,13 +352,9 @@ export const LeaseIPStatus = { return { $type: LeaseIPStatus.$type, port: isSet(object.port) ? globalThis.Number(object.port) : 0, - externalPort: isSet(object.externalPort) - ? globalThis.Number(object.externalPort) - : 0, - protocol: isSet(object.protocol) - ? globalThis.String(object.protocol) - : '', - ip: isSet(object.ip) ? globalThis.String(object.ip) : '', + externalPort: isSet(object.externalPort) ? globalThis.Number(object.externalPort) : 0, + protocol: isSet(object.protocol) ? globalThis.String(object.protocol) : "", + ip: isSet(object.ip) ? globalThis.String(object.ip) : "", }; }, @@ -399,10 +366,10 @@ export const LeaseIPStatus = { if (message.externalPort !== 0) { obj.externalPort = Math.round(message.externalPort); } - if (message.protocol !== '') { + if (message.protocol !== "") { obj.protocol = message.protocol; } - if (message.ip !== '') { + if (message.ip !== "") { obj.ip = message.ip; } return obj; @@ -415,8 +382,8 @@ export const LeaseIPStatus = { const message = createBaseLeaseIPStatus(); message.port = object.port ?? 0; message.externalPort = object.externalPort ?? 0; - message.protocol = object.protocol ?? ''; - message.ip = object.ip ?? ''; + message.protocol = object.protocol ?? ""; + message.ip = object.ip ?? ""; return message; }, }; @@ -425,23 +392,20 @@ messageTypeRegistry.set(LeaseIPStatus.$type, LeaseIPStatus); function createBaseForwarderPortStatus(): ForwarderPortStatus { return { - $type: 'akash.provider.lease.v1.ForwarderPortStatus', - host: '', + $type: "akash.provider.lease.v1.ForwarderPortStatus", + host: "", port: 0, externalPort: 0, - proto: '', - name: '', + proto: "", + name: "", }; } export const ForwarderPortStatus = { - $type: 'akash.provider.lease.v1.ForwarderPortStatus' as const, + $type: "akash.provider.lease.v1.ForwarderPortStatus" as const, - encode( - message: ForwarderPortStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.host !== '') { + encode(message: ForwarderPortStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.host !== "") { writer.uint32(10).string(message.host); } if (message.port !== 0) { @@ -450,18 +414,17 @@ export const ForwarderPortStatus = { if (message.externalPort !== 0) { writer.uint32(24).uint32(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { writer.uint32(34).string(message.proto); } - if (message.name !== '') { + if (message.name !== "") { writer.uint32(42).string(message.name); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ForwarderPortStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseForwarderPortStatus(); while (reader.pos < end) { @@ -514,19 +477,17 @@ export const ForwarderPortStatus = { fromJSON(object: any): ForwarderPortStatus { return { $type: ForwarderPortStatus.$type, - host: isSet(object.host) ? globalThis.String(object.host) : '', + host: isSet(object.host) ? globalThis.String(object.host) : "", port: isSet(object.port) ? globalThis.Number(object.port) : 0, - externalPort: isSet(object.externalPort) - ? globalThis.Number(object.externalPort) - : 0, - proto: isSet(object.proto) ? globalThis.String(object.proto) : '', - name: isSet(object.name) ? globalThis.String(object.name) : '', + externalPort: isSet(object.externalPort) ? globalThis.Number(object.externalPort) : 0, + proto: isSet(object.proto) ? globalThis.String(object.proto) : "", + name: isSet(object.name) ? globalThis.String(object.name) : "", }; }, toJSON(message: ForwarderPortStatus): unknown { const obj: any = {}; - if (message.host !== '') { + if (message.host !== "") { obj.host = message.host; } if (message.port !== 0) { @@ -535,10 +496,10 @@ export const ForwarderPortStatus = { if (message.externalPort !== 0) { obj.externalPort = Math.round(message.externalPort); } - if (message.proto !== '') { + if (message.proto !== "") { obj.proto = message.proto; } - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } return obj; @@ -549,11 +510,11 @@ export const ForwarderPortStatus = { }, fromPartial(object: DeepPartial): ForwarderPortStatus { const message = createBaseForwarderPortStatus(); - message.host = object.host ?? ''; + message.host = object.host ?? ""; message.port = object.port ?? 0; message.externalPort = object.externalPort ?? 0; - message.proto = object.proto ?? ''; - message.name = object.name ?? ''; + message.proto = object.proto ?? ""; + message.name = object.name ?? ""; return message; }, }; @@ -561,30 +522,18 @@ export const ForwarderPortStatus = { messageTypeRegistry.set(ForwarderPortStatus.$type, ForwarderPortStatus); function createBaseServiceStatus(): ServiceStatus { - return { - $type: 'akash.provider.lease.v1.ServiceStatus', - name: '', - status: undefined, - ports: [], - ips: [], - }; + return { $type: "akash.provider.lease.v1.ServiceStatus", name: "", status: undefined, ports: [], ips: [] }; } export const ServiceStatus = { - $type: 'akash.provider.lease.v1.ServiceStatus' as const, + $type: "akash.provider.lease.v1.ServiceStatus" as const, - encode( - message: ServiceStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: ServiceStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.status !== undefined) { - LeaseServiceStatus.encode( - message.status, - writer.uint32(18).fork(), - ).ldelim(); + LeaseServiceStatus.encode(message.status, writer.uint32(18).fork()).ldelim(); } for (const v of message.ports) { ForwarderPortStatus.encode(v!, writer.uint32(26).fork()).ldelim(); @@ -596,8 +545,7 @@ export const ServiceStatus = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceStatus(); while (reader.pos < end) { @@ -622,9 +570,7 @@ export const ServiceStatus = { break; } - message.ports.push( - ForwarderPortStatus.decode(reader, reader.uint32()), - ); + message.ports.push(ForwarderPortStatus.decode(reader, reader.uint32())); continue; case 4: if (tag !== 34) { @@ -645,22 +591,18 @@ export const ServiceStatus = { fromJSON(object: any): ServiceStatus { return { $type: ServiceStatus.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - status: isSet(object.status) - ? LeaseServiceStatus.fromJSON(object.status) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + status: isSet(object.status) ? LeaseServiceStatus.fromJSON(object.status) : undefined, ports: globalThis.Array.isArray(object?.ports) ? object.ports.map((e: any) => ForwarderPortStatus.fromJSON(e)) : [], - ips: globalThis.Array.isArray(object?.ips) - ? object.ips.map((e: any) => LeaseIPStatus.fromJSON(e)) - : [], + ips: globalThis.Array.isArray(object?.ips) ? object.ips.map((e: any) => LeaseIPStatus.fromJSON(e)) : [], }; }, toJSON(message: ServiceStatus): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.status !== undefined) { @@ -680,13 +622,11 @@ export const ServiceStatus = { }, fromPartial(object: DeepPartial): ServiceStatus { const message = createBaseServiceStatus(); - message.name = object.name ?? ''; - message.status = - object.status !== undefined && object.status !== null - ? LeaseServiceStatus.fromPartial(object.status) - : undefined; - message.ports = - object.ports?.map((e) => ForwarderPortStatus.fromPartial(e)) || []; + message.name = object.name ?? ""; + message.status = (object.status !== undefined && object.status !== null) + ? LeaseServiceStatus.fromPartial(object.status) + : undefined; + message.ports = object.ports?.map((e) => ForwarderPortStatus.fromPartial(e)) || []; message.ips = object.ips?.map((e) => LeaseIPStatus.fromPartial(e)) || []; return message; }, @@ -695,20 +635,13 @@ export const ServiceStatus = { messageTypeRegistry.set(ServiceStatus.$type, ServiceStatus); function createBaseSendManifestRequest(): SendManifestRequest { - return { - $type: 'akash.provider.lease.v1.SendManifestRequest', - leaseId: undefined, - manifest: [], - }; + return { $type: "akash.provider.lease.v1.SendManifestRequest", leaseId: undefined, manifest: [] }; } export const SendManifestRequest = { - $type: 'akash.provider.lease.v1.SendManifestRequest' as const, + $type: "akash.provider.lease.v1.SendManifestRequest" as const, - encode( - message: SendManifestRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SendManifestRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -719,8 +652,7 @@ export const SendManifestRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SendManifestRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSendManifestRequest(); while (reader.pos < end) { @@ -752,12 +684,8 @@ export const SendManifestRequest = { fromJSON(object: any): SendManifestRequest { return { $type: SendManifestRequest.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, - manifest: globalThis.Array.isArray(object?.manifest) - ? object.manifest.map((e: any) => Group.fromJSON(e)) - : [], + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, + manifest: globalThis.Array.isArray(object?.manifest) ? object.manifest.map((e: any) => Group.fromJSON(e)) : [], }; }, @@ -777,10 +705,9 @@ export const SendManifestRequest = { }, fromPartial(object: DeepPartial): SendManifestRequest { const message = createBaseSendManifestRequest(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.manifest = object.manifest?.map((e) => Group.fromPartial(e)) || []; return message; }, @@ -789,25 +716,18 @@ export const SendManifestRequest = { messageTypeRegistry.set(SendManifestRequest.$type, SendManifestRequest); function createBaseSendManifestResponse(): SendManifestResponse { - return { $type: 'akash.provider.lease.v1.SendManifestResponse' }; + return { $type: "akash.provider.lease.v1.SendManifestResponse" }; } export const SendManifestResponse = { - $type: 'akash.provider.lease.v1.SendManifestResponse' as const, + $type: "akash.provider.lease.v1.SendManifestResponse" as const, - encode( - _: SendManifestResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: SendManifestResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SendManifestResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SendManifestResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSendManifestResponse(); while (reader.pos < end) { @@ -843,32 +763,27 @@ export const SendManifestResponse = { messageTypeRegistry.set(SendManifestResponse.$type, SendManifestResponse); function createBaseServiceLogsRequest(): ServiceLogsRequest { - return { - $type: 'akash.provider.lease.v1.ServiceLogsRequest', - leaseId: undefined, - services: [], - }; + return { $type: "akash.provider.lease.v1.ServiceLogsRequest", leaseId: undefined, services: [], lines: 0 }; } export const ServiceLogsRequest = { - $type: 'akash.provider.lease.v1.ServiceLogsRequest' as const, + $type: "akash.provider.lease.v1.ServiceLogsRequest" as const, - encode( - message: ServiceLogsRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceLogsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } for (const v of message.services) { writer.uint32(18).string(v!); } + if (message.lines !== 0) { + writer.uint32(24).uint32(message.lines); + } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceLogsRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceLogsRequest(); while (reader.pos < end) { @@ -888,6 +803,13 @@ export const ServiceLogsRequest = { message.services.push(reader.string()); continue; + case 3: + if (tag !== 24) { + break; + } + + message.lines = reader.uint32(); + continue; } if ((tag & 7) === 4 || tag === 0) { break; @@ -900,12 +822,9 @@ export const ServiceLogsRequest = { fromJSON(object: any): ServiceLogsRequest { return { $type: ServiceLogsRequest.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, - services: globalThis.Array.isArray(object?.services) - ? object.services.map((e: any) => globalThis.String(e)) - : [], + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, + services: globalThis.Array.isArray(object?.services) ? object.services.map((e: any) => globalThis.String(e)) : [], + lines: isSet(object.lines) ? globalThis.Number(object.lines) : 0, }; }, @@ -917,6 +836,9 @@ export const ServiceLogsRequest = { if (message.services?.length) { obj.services = message.services; } + if (message.lines !== 0) { + obj.lines = Math.round(message.lines); + } return obj; }, @@ -925,11 +847,11 @@ export const ServiceLogsRequest = { }, fromPartial(object: DeepPartial): ServiceLogsRequest { const message = createBaseServiceLogsRequest(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.services = object.services?.map((e) => e) || []; + message.lines = object.lines ?? 0; return message; }, }; @@ -937,21 +859,14 @@ export const ServiceLogsRequest = { messageTypeRegistry.set(ServiceLogsRequest.$type, ServiceLogsRequest); function createBaseServiceLogs(): ServiceLogs { - return { - $type: 'akash.provider.lease.v1.ServiceLogs', - name: '', - logs: new Uint8Array(0), - }; + return { $type: "akash.provider.lease.v1.ServiceLogs", name: "", logs: new Uint8Array(0) }; } export const ServiceLogs = { - $type: 'akash.provider.lease.v1.ServiceLogs' as const, + $type: "akash.provider.lease.v1.ServiceLogs" as const, - encode( - message: ServiceLogs, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== '') { + encode(message: ServiceLogs, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== "") { writer.uint32(10).string(message.name); } if (message.logs.length !== 0) { @@ -961,8 +876,7 @@ export const ServiceLogs = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceLogs { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceLogs(); while (reader.pos < end) { @@ -994,16 +908,14 @@ export const ServiceLogs = { fromJSON(object: any): ServiceLogs { return { $type: ServiceLogs.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - logs: isSet(object.logs) - ? bytesFromBase64(object.logs) - : new Uint8Array(0), + name: isSet(object.name) ? globalThis.String(object.name) : "", + logs: isSet(object.logs) ? bytesFromBase64(object.logs) : new Uint8Array(0), }; }, toJSON(message: ServiceLogs): unknown { const obj: any = {}; - if (message.name !== '') { + if (message.name !== "") { obj.name = message.name; } if (message.logs.length !== 0) { @@ -1017,7 +929,7 @@ export const ServiceLogs = { }, fromPartial(object: DeepPartial): ServiceLogs { const message = createBaseServiceLogs(); - message.name = object.name ?? ''; + message.name = object.name ?? ""; message.logs = object.logs ?? new Uint8Array(0); return message; }, @@ -1026,16 +938,13 @@ export const ServiceLogs = { messageTypeRegistry.set(ServiceLogs.$type, ServiceLogs); function createBaseServiceLogsResponse(): ServiceLogsResponse { - return { $type: 'akash.provider.lease.v1.ServiceLogsResponse', services: [] }; + return { $type: "akash.provider.lease.v1.ServiceLogsResponse", services: [] }; } export const ServiceLogsResponse = { - $type: 'akash.provider.lease.v1.ServiceLogsResponse' as const, + $type: "akash.provider.lease.v1.ServiceLogsResponse" as const, - encode( - message: ServiceLogsResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceLogsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.services) { ServiceLogs.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -1043,8 +952,7 @@ export const ServiceLogsResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceLogsResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceLogsResponse(); while (reader.pos < end) { @@ -1088,8 +996,7 @@ export const ServiceLogsResponse = { }, fromPartial(object: DeepPartial): ServiceLogsResponse { const message = createBaseServiceLogsResponse(); - message.services = - object.services?.map((e) => ServiceLogs.fromPartial(e)) || []; + message.services = object.services?.map((e) => ServiceLogs.fromPartial(e)) || []; return message; }, }; @@ -1097,16 +1004,13 @@ export const ServiceLogsResponse = { messageTypeRegistry.set(ServiceLogsResponse.$type, ServiceLogsResponse); function createBaseShellRequest(): ShellRequest { - return { $type: 'akash.provider.lease.v1.ShellRequest', leaseId: undefined }; + return { $type: "akash.provider.lease.v1.ShellRequest", leaseId: undefined }; } export const ShellRequest = { - $type: 'akash.provider.lease.v1.ShellRequest' as const, + $type: "akash.provider.lease.v1.ShellRequest" as const, - encode( - message: ShellRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ShellRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -1114,8 +1018,7 @@ export const ShellRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ShellRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseShellRequest(); while (reader.pos < end) { @@ -1138,12 +1041,7 @@ export const ShellRequest = { }, fromJSON(object: any): ShellRequest { - return { - $type: ShellRequest.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, - }; + return { $type: ShellRequest.$type, leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined }; }, toJSON(message: ShellRequest): unknown { @@ -1159,10 +1057,9 @@ export const ShellRequest = { }, fromPartial(object: DeepPartial): ShellRequest { const message = createBaseShellRequest(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; return message; }, }; @@ -1170,20 +1067,13 @@ export const ShellRequest = { messageTypeRegistry.set(ShellRequest.$type, ShellRequest); function createBaseServiceStatusRequest(): ServiceStatusRequest { - return { - $type: 'akash.provider.lease.v1.ServiceStatusRequest', - leaseId: undefined, - services: [], - }; + return { $type: "akash.provider.lease.v1.ServiceStatusRequest", leaseId: undefined, services: [] }; } export const ServiceStatusRequest = { - $type: 'akash.provider.lease.v1.ServiceStatusRequest' as const, + $type: "akash.provider.lease.v1.ServiceStatusRequest" as const, - encode( - message: ServiceStatusRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceStatusRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leaseId !== undefined) { LeaseID.encode(message.leaseId, writer.uint32(10).fork()).ldelim(); } @@ -1193,12 +1083,8 @@ export const ServiceStatusRequest = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceStatusRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceStatusRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceStatusRequest(); while (reader.pos < end) { @@ -1230,12 +1116,8 @@ export const ServiceStatusRequest = { fromJSON(object: any): ServiceStatusRequest { return { $type: ServiceStatusRequest.$type, - leaseId: isSet(object.leaseId) - ? LeaseID.fromJSON(object.leaseId) - : undefined, - services: globalThis.Array.isArray(object?.services) - ? object.services.map((e: any) => globalThis.String(e)) - : [], + leaseId: isSet(object.leaseId) ? LeaseID.fromJSON(object.leaseId) : undefined, + services: globalThis.Array.isArray(object?.services) ? object.services.map((e: any) => globalThis.String(e)) : [], }; }, @@ -1255,10 +1137,9 @@ export const ServiceStatusRequest = { }, fromPartial(object: DeepPartial): ServiceStatusRequest { const message = createBaseServiceStatusRequest(); - message.leaseId = - object.leaseId !== undefined && object.leaseId !== null - ? LeaseID.fromPartial(object.leaseId) - : undefined; + message.leaseId = (object.leaseId !== undefined && object.leaseId !== null) + ? LeaseID.fromPartial(object.leaseId) + : undefined; message.services = object.services?.map((e) => e) || []; return message; }, @@ -1267,31 +1148,21 @@ export const ServiceStatusRequest = { messageTypeRegistry.set(ServiceStatusRequest.$type, ServiceStatusRequest); function createBaseServiceStatusResponse(): ServiceStatusResponse { - return { - $type: 'akash.provider.lease.v1.ServiceStatusResponse', - services: [], - }; + return { $type: "akash.provider.lease.v1.ServiceStatusResponse", services: [] }; } export const ServiceStatusResponse = { - $type: 'akash.provider.lease.v1.ServiceStatusResponse' as const, + $type: "akash.provider.lease.v1.ServiceStatusResponse" as const, - encode( - message: ServiceStatusResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceStatusResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.services) { ServiceStatus.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceStatusResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceStatusResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceStatusResponse(); while (reader.pos < end) { @@ -1333,12 +1204,9 @@ export const ServiceStatusResponse = { create(base?: DeepPartial): ServiceStatusResponse { return ServiceStatusResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ServiceStatusResponse { + fromPartial(object: DeepPartial): ServiceStatusResponse { const message = createBaseServiceStatusResponse(); - message.services = - object.services?.map((e) => ServiceStatus.fromPartial(e)) || []; + message.services = object.services?.map((e) => ServiceStatus.fromPartial(e)) || []; return message; }, }; @@ -1360,9 +1228,7 @@ export interface LeaseRPC { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - StreamServiceStatus( - request: ServiceStatusRequest, - ): Observable; + StreamServiceStatus(request: ServiceStatusRequest): Observable; /** * ServiceLogs * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE @@ -1374,12 +1240,10 @@ export interface LeaseRPC { * buf:lint:ignore RPC_REQUEST_RESPONSE_UNIQUE * buf:lint:ignore RPC_RESPONSE_STANDARD_NAME */ - StreamServiceLogs( - request: ServiceLogsRequest, - ): Observable; + StreamServiceLogs(request: ServiceLogsRequest): Observable; } -export const LeaseRPCServiceName = 'akash.provider.lease.v1.LeaseRPC'; +export const LeaseRPCServiceName = "akash.provider.lease.v1.LeaseRPC"; export class LeaseRPCClientImpl implements LeaseRPC { private readonly rpc: Rpc; private readonly service: string; @@ -1394,83 +1258,45 @@ export class LeaseRPCClientImpl implements LeaseRPC { } SendManifest(request: SendManifestRequest): Promise { const data = SendManifestRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'SendManifest', data); - return promise.then((data) => - SendManifestResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "SendManifest", data); + return promise.then((data) => SendManifestResponse.decode(_m0.Reader.create(data))); } ServiceStatus(request: ServiceStatusRequest): Promise { const data = ServiceStatusRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'ServiceStatus', data); - return promise.then((data) => - ServiceStatusResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ServiceStatus", data); + return promise.then((data) => ServiceStatusResponse.decode(_m0.Reader.create(data))); } - StreamServiceStatus( - request: ServiceStatusRequest, - ): Observable { + StreamServiceStatus(request: ServiceStatusRequest): Observable { const data = ServiceStatusRequest.encode(request).finish(); - const result = this.rpc.serverStreamingRequest( - this.service, - 'StreamServiceStatus', - data, - ); - return result.pipe( - map((data) => ServiceStatusResponse.decode(_m0.Reader.create(data))), - ); + const result = this.rpc.serverStreamingRequest(this.service, "StreamServiceStatus", data); + return result.pipe(map((data) => ServiceStatusResponse.decode(_m0.Reader.create(data)))); } ServiceLogs(request: ServiceLogsRequest): Promise { const data = ServiceLogsRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'ServiceLogs', data); - return promise.then((data) => - ServiceLogsResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "ServiceLogs", data); + return promise.then((data) => ServiceLogsResponse.decode(_m0.Reader.create(data))); } - StreamServiceLogs( - request: ServiceLogsRequest, - ): Observable { + StreamServiceLogs(request: ServiceLogsRequest): Observable { const data = ServiceLogsRequest.encode(request).finish(); - const result = this.rpc.serverStreamingRequest( - this.service, - 'StreamServiceLogs', - data, - ); - return result.pipe( - map((data) => ServiceLogsResponse.decode(_m0.Reader.create(data))), - ); + const result = this.rpc.serverStreamingRequest(this.service, "StreamServiceLogs", data); + return result.pipe(map((data) => ServiceLogsResponse.decode(_m0.Reader.create(data)))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; - clientStreamingRequest( - service: string, - method: string, - data: Observable, - ): Promise; - serverStreamingRequest( - service: string, - method: string, - data: Uint8Array, - ): Observable; - bidirectionalStreamingRequest( - service: string, - method: string, - data: Observable, - ): Observable; + request(service: string, method: string, data: Uint8Array): Promise; + clientStreamingRequest(service: string, method: string, data: Observable): Promise; + serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; + bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; } function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -1483,36 +1309,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1/service.ts b/ts/src/generated/akash/provider/v1/service.ts index f3b45162..758e9c4e 100644 --- a/ts/src/generated/akash/provider/v1/service.ts +++ b/ts/src/generated/akash/provider/v1/service.ts @@ -1,9 +1,9 @@ /* eslint-disable */ -import _m0 from 'protobufjs/minimal'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; -import { Empty } from '../../../google/protobuf/empty'; -import { Status } from './status'; +import _m0 from "protobufjs/minimal"; +import { Observable } from "rxjs"; +import { map } from "rxjs/operators"; +import { Empty } from "../../../google/protobuf/empty"; +import { Status } from "./status"; /** ProviderRPC defines the RPC server for provider */ export interface ProviderRPC { @@ -21,7 +21,7 @@ export interface ProviderRPC { StreamStatus(request: Empty): Observable; } -export const ProviderRPCServiceName = 'akash.provider.v1.ProviderRPC'; +export const ProviderRPCServiceName = "akash.provider.v1.ProviderRPC"; export class ProviderRPCClientImpl implements ProviderRPC { private readonly rpc: Rpc; private readonly service: string; @@ -33,40 +33,20 @@ export class ProviderRPCClientImpl implements ProviderRPC { } GetStatus(request: Empty): Promise { const data = Empty.encode(request).finish(); - const promise = this.rpc.request(this.service, 'GetStatus', data); + const promise = this.rpc.request(this.service, "GetStatus", data); return promise.then((data) => Status.decode(_m0.Reader.create(data))); } StreamStatus(request: Empty): Observable { const data = Empty.encode(request).finish(); - const result = this.rpc.serverStreamingRequest( - this.service, - 'StreamStatus', - data, - ); + const result = this.rpc.serverStreamingRequest(this.service, "StreamStatus", data); return result.pipe(map((data) => Status.decode(_m0.Reader.create(data)))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; - clientStreamingRequest( - service: string, - method: string, - data: Observable, - ): Promise; - serverStreamingRequest( - service: string, - method: string, - data: Uint8Array, - ): Observable; - bidirectionalStreamingRequest( - service: string, - method: string, - data: Observable, - ): Observable; + request(service: string, method: string, data: Uint8Array): Promise; + clientStreamingRequest(service: string, method: string, data: Observable): Promise; + serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; + bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; } diff --git a/ts/src/generated/akash/provider/v1/status.ts b/ts/src/generated/akash/provider/v1/status.ts index 10881f28..5eae4e78 100644 --- a/ts/src/generated/akash/provider/v1/status.ts +++ b/ts/src/generated/akash/provider/v1/status.ts @@ -1,14 +1,14 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { Timestamp } from '../../../google/protobuf/timestamp'; -import { Quantity } from '../../../k8s.io/apimachinery/pkg/api/resource/generated'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Cluster } from '../../inventory/v1/cluster'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { Timestamp } from "../../../google/protobuf/timestamp"; +import { Quantity } from "../../../k8s.io/apimachinery/pkg/api/resource/generated"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Cluster } from "../../inventory/v1/cluster"; /** ResourceMetrics */ export interface ResourcesMetric { - $type: 'akash.provider.v1.ResourcesMetric'; + $type: "akash.provider.v1.ResourcesMetric"; cpu: Quantity | undefined; memory: Quantity | undefined; gpu: Quantity | undefined; @@ -17,60 +17,60 @@ export interface ResourcesMetric { } export interface ResourcesMetric_StorageEntry { - $type: 'akash.provider.v1.ResourcesMetric.StorageEntry'; + $type: "akash.provider.v1.ResourcesMetric.StorageEntry"; key: string; value: Quantity | undefined; } /** Leases */ export interface Leases { - $type: 'akash.provider.v1.Leases'; + $type: "akash.provider.v1.Leases"; active: number; } /** ReservationsMetric */ export interface ReservationsMetric { - $type: 'akash.provider.v1.ReservationsMetric'; + $type: "akash.provider.v1.ReservationsMetric"; count: number; resources: ResourcesMetric | undefined; } /** Reservations */ export interface Reservations { - $type: 'akash.provider.v1.Reservations'; + $type: "akash.provider.v1.Reservations"; pending: ReservationsMetric | undefined; active: ReservationsMetric | undefined; } /** Inventory */ export interface Inventory { - $type: 'akash.provider.v1.Inventory'; + $type: "akash.provider.v1.Inventory"; cluster: Cluster | undefined; reservations: Reservations | undefined; } /** ClusterStatus */ export interface ClusterStatus { - $type: 'akash.provider.v1.ClusterStatus'; + $type: "akash.provider.v1.ClusterStatus"; leases: Leases | undefined; inventory: Inventory | undefined; } /** BidEngineStatus */ export interface BidEngineStatus { - $type: 'akash.provider.v1.BidEngineStatus'; + $type: "akash.provider.v1.BidEngineStatus"; orders: number; } /** ManifestStatus */ export interface ManifestStatus { - $type: 'akash.provider.v1.ManifestStatus'; + $type: "akash.provider.v1.ManifestStatus"; deployments: number; } /** Status */ export interface Status { - $type: 'akash.provider.v1.Status'; + $type: "akash.provider.v1.Status"; errors: string[]; cluster: ClusterStatus | undefined; bidEngine: BidEngineStatus | undefined; @@ -81,7 +81,7 @@ export interface Status { function createBaseResourcesMetric(): ResourcesMetric { return { - $type: 'akash.provider.v1.ResourcesMetric', + $type: "akash.provider.v1.ResourcesMetric", cpu: undefined, memory: undefined, gpu: undefined, @@ -91,12 +91,9 @@ function createBaseResourcesMetric(): ResourcesMetric { } export const ResourcesMetric = { - $type: 'akash.provider.v1.ResourcesMetric' as const, + $type: "akash.provider.v1.ResourcesMetric" as const, - encode( - message: ResourcesMetric, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ResourcesMetric, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cpu !== undefined) { Quantity.encode(message.cpu, writer.uint32(10).fork()).ldelim(); } @@ -107,27 +104,20 @@ export const ResourcesMetric = { Quantity.encode(message.gpu, writer.uint32(26).fork()).ldelim(); } if (message.ephemeralStorage !== undefined) { - Quantity.encode( - message.ephemeralStorage, - writer.uint32(34).fork(), - ).ldelim(); + Quantity.encode(message.ephemeralStorage, writer.uint32(34).fork()).ldelim(); } Object.entries(message.storage).forEach(([key, value]) => { - ResourcesMetric_StorageEntry.encode( - { - $type: 'akash.provider.v1.ResourcesMetric.StorageEntry', - key: key as any, - value, - }, - writer.uint32(42).fork(), - ).ldelim(); + ResourcesMetric_StorageEntry.encode({ + $type: "akash.provider.v1.ResourcesMetric.StorageEntry", + key: key as any, + value, + }, writer.uint32(42).fork()).ldelim(); }); return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ResourcesMetric { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourcesMetric(); while (reader.pos < end) { @@ -166,10 +156,7 @@ export const ResourcesMetric = { break; } - const entry5 = ResourcesMetric_StorageEntry.decode( - reader, - reader.uint32(), - ); + const entry5 = ResourcesMetric_StorageEntry.decode(reader, reader.uint32()); if (entry5.value !== undefined) { message.storage[entry5.key] = entry5.value; } @@ -187,21 +174,14 @@ export const ResourcesMetric = { return { $type: ResourcesMetric.$type, cpu: isSet(object.cpu) ? Quantity.fromJSON(object.cpu) : undefined, - memory: isSet(object.memory) - ? Quantity.fromJSON(object.memory) - : undefined, + memory: isSet(object.memory) ? Quantity.fromJSON(object.memory) : undefined, gpu: isSet(object.gpu) ? Quantity.fromJSON(object.gpu) : undefined, - ephemeralStorage: isSet(object.ephemeralStorage) - ? Quantity.fromJSON(object.ephemeralStorage) - : undefined, + ephemeralStorage: isSet(object.ephemeralStorage) ? Quantity.fromJSON(object.ephemeralStorage) : undefined, storage: isObject(object.storage) - ? Object.entries(object.storage).reduce<{ [key: string]: Quantity }>( - (acc, [key, value]) => { - acc[key] = Quantity.fromJSON(value); - return acc; - }, - {}, - ) + ? Object.entries(object.storage).reduce<{ [key: string]: Quantity }>((acc, [key, value]) => { + acc[key] = Quantity.fromJSON(value); + return acc; + }, {}) : {}, }; }, @@ -237,25 +217,15 @@ export const ResourcesMetric = { }, fromPartial(object: DeepPartial): ResourcesMetric { const message = createBaseResourcesMetric(); - message.cpu = - object.cpu !== undefined && object.cpu !== null - ? Quantity.fromPartial(object.cpu) - : undefined; - message.memory = - object.memory !== undefined && object.memory !== null - ? Quantity.fromPartial(object.memory) - : undefined; - message.gpu = - object.gpu !== undefined && object.gpu !== null - ? Quantity.fromPartial(object.gpu) - : undefined; - message.ephemeralStorage = - object.ephemeralStorage !== undefined && object.ephemeralStorage !== null - ? Quantity.fromPartial(object.ephemeralStorage) - : undefined; - message.storage = Object.entries(object.storage ?? {}).reduce<{ - [key: string]: Quantity; - }>((acc, [key, value]) => { + message.cpu = (object.cpu !== undefined && object.cpu !== null) ? Quantity.fromPartial(object.cpu) : undefined; + message.memory = (object.memory !== undefined && object.memory !== null) + ? Quantity.fromPartial(object.memory) + : undefined; + message.gpu = (object.gpu !== undefined && object.gpu !== null) ? Quantity.fromPartial(object.gpu) : undefined; + message.ephemeralStorage = (object.ephemeralStorage !== undefined && object.ephemeralStorage !== null) + ? Quantity.fromPartial(object.ephemeralStorage) + : undefined; + message.storage = Object.entries(object.storage ?? {}).reduce<{ [key: string]: Quantity }>((acc, [key, value]) => { if (value !== undefined) { acc[key] = Quantity.fromPartial(value); } @@ -268,21 +238,14 @@ export const ResourcesMetric = { messageTypeRegistry.set(ResourcesMetric.$type, ResourcesMetric); function createBaseResourcesMetric_StorageEntry(): ResourcesMetric_StorageEntry { - return { - $type: 'akash.provider.v1.ResourcesMetric.StorageEntry', - key: '', - value: undefined, - }; + return { $type: "akash.provider.v1.ResourcesMetric.StorageEntry", key: "", value: undefined }; } export const ResourcesMetric_StorageEntry = { - $type: 'akash.provider.v1.ResourcesMetric.StorageEntry' as const, + $type: "akash.provider.v1.ResourcesMetric.StorageEntry" as const, - encode( - message: ResourcesMetric_StorageEntry, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.key !== '') { + encode(message: ResourcesMetric_StorageEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.key !== "") { writer.uint32(10).string(message.key); } if (message.value !== undefined) { @@ -291,12 +254,8 @@ export const ResourcesMetric_StorageEntry = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ResourcesMetric_StorageEntry { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ResourcesMetric_StorageEntry { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseResourcesMetric_StorageEntry(); while (reader.pos < end) { @@ -328,14 +287,14 @@ export const ResourcesMetric_StorageEntry = { fromJSON(object: any): ResourcesMetric_StorageEntry { return { $type: ResourcesMetric_StorageEntry.$type, - key: isSet(object.key) ? globalThis.String(object.key) : '', + key: isSet(object.key) ? globalThis.String(object.key) : "", value: isSet(object.value) ? Quantity.fromJSON(object.value) : undefined, }; }, toJSON(message: ResourcesMetric_StorageEntry): unknown { const obj: any = {}; - if (message.key !== '') { + if (message.key !== "") { obj.key = message.key; } if (message.value !== undefined) { @@ -344,40 +303,29 @@ export const ResourcesMetric_StorageEntry = { return obj; }, - create( - base?: DeepPartial, - ): ResourcesMetric_StorageEntry { + create(base?: DeepPartial): ResourcesMetric_StorageEntry { return ResourcesMetric_StorageEntry.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ResourcesMetric_StorageEntry { + fromPartial(object: DeepPartial): ResourcesMetric_StorageEntry { const message = createBaseResourcesMetric_StorageEntry(); - message.key = object.key ?? ''; - message.value = - object.value !== undefined && object.value !== null - ? Quantity.fromPartial(object.value) - : undefined; + message.key = object.key ?? ""; + message.value = (object.value !== undefined && object.value !== null) + ? Quantity.fromPartial(object.value) + : undefined; return message; }, }; -messageTypeRegistry.set( - ResourcesMetric_StorageEntry.$type, - ResourcesMetric_StorageEntry, -); +messageTypeRegistry.set(ResourcesMetric_StorageEntry.$type, ResourcesMetric_StorageEntry); function createBaseLeases(): Leases { - return { $type: 'akash.provider.v1.Leases', active: 0 }; + return { $type: "akash.provider.v1.Leases", active: 0 }; } export const Leases = { - $type: 'akash.provider.v1.Leases' as const, + $type: "akash.provider.v1.Leases" as const, - encode( - message: Leases, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Leases, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.active !== 0) { writer.uint32(8).uint32(message.active); } @@ -385,8 +333,7 @@ export const Leases = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Leases { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseLeases(); while (reader.pos < end) { @@ -409,10 +356,7 @@ export const Leases = { }, fromJSON(object: any): Leases { - return { - $type: Leases.$type, - active: isSet(object.active) ? globalThis.Number(object.active) : 0, - }; + return { $type: Leases.$type, active: isSet(object.active) ? globalThis.Number(object.active) : 0 }; }, toJSON(message: Leases): unknown { @@ -436,35 +380,24 @@ export const Leases = { messageTypeRegistry.set(Leases.$type, Leases); function createBaseReservationsMetric(): ReservationsMetric { - return { - $type: 'akash.provider.v1.ReservationsMetric', - count: 0, - resources: undefined, - }; + return { $type: "akash.provider.v1.ReservationsMetric", count: 0, resources: undefined }; } export const ReservationsMetric = { - $type: 'akash.provider.v1.ReservationsMetric' as const, + $type: "akash.provider.v1.ReservationsMetric" as const, - encode( - message: ReservationsMetric, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ReservationsMetric, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.count !== 0) { writer.uint32(8).uint32(message.count); } if (message.resources !== undefined) { - ResourcesMetric.encode( - message.resources, - writer.uint32(18).fork(), - ).ldelim(); + ResourcesMetric.encode(message.resources, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ReservationsMetric { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseReservationsMetric(); while (reader.pos < end) { @@ -497,9 +430,7 @@ export const ReservationsMetric = { return { $type: ReservationsMetric.$type, count: isSet(object.count) ? globalThis.Number(object.count) : 0, - resources: isSet(object.resources) - ? ResourcesMetric.fromJSON(object.resources) - : undefined, + resources: isSet(object.resources) ? ResourcesMetric.fromJSON(object.resources) : undefined, }; }, @@ -520,10 +451,9 @@ export const ReservationsMetric = { fromPartial(object: DeepPartial): ReservationsMetric { const message = createBaseReservationsMetric(); message.count = object.count ?? 0; - message.resources = - object.resources !== undefined && object.resources !== null - ? ResourcesMetric.fromPartial(object.resources) - : undefined; + message.resources = (object.resources !== undefined && object.resources !== null) + ? ResourcesMetric.fromPartial(object.resources) + : undefined; return message; }, }; @@ -531,38 +461,24 @@ export const ReservationsMetric = { messageTypeRegistry.set(ReservationsMetric.$type, ReservationsMetric); function createBaseReservations(): Reservations { - return { - $type: 'akash.provider.v1.Reservations', - pending: undefined, - active: undefined, - }; + return { $type: "akash.provider.v1.Reservations", pending: undefined, active: undefined }; } export const Reservations = { - $type: 'akash.provider.v1.Reservations' as const, + $type: "akash.provider.v1.Reservations" as const, - encode( - message: Reservations, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Reservations, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pending !== undefined) { - ReservationsMetric.encode( - message.pending, - writer.uint32(10).fork(), - ).ldelim(); + ReservationsMetric.encode(message.pending, writer.uint32(10).fork()).ldelim(); } if (message.active !== undefined) { - ReservationsMetric.encode( - message.active, - writer.uint32(18).fork(), - ).ldelim(); + ReservationsMetric.encode(message.active, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Reservations { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseReservations(); while (reader.pos < end) { @@ -594,12 +510,8 @@ export const Reservations = { fromJSON(object: any): Reservations { return { $type: Reservations.$type, - pending: isSet(object.pending) - ? ReservationsMetric.fromJSON(object.pending) - : undefined, - active: isSet(object.active) - ? ReservationsMetric.fromJSON(object.active) - : undefined, + pending: isSet(object.pending) ? ReservationsMetric.fromJSON(object.pending) : undefined, + active: isSet(object.active) ? ReservationsMetric.fromJSON(object.active) : undefined, }; }, @@ -619,14 +531,12 @@ export const Reservations = { }, fromPartial(object: DeepPartial): Reservations { const message = createBaseReservations(); - message.pending = - object.pending !== undefined && object.pending !== null - ? ReservationsMetric.fromPartial(object.pending) - : undefined; - message.active = - object.active !== undefined && object.active !== null - ? ReservationsMetric.fromPartial(object.active) - : undefined; + message.pending = (object.pending !== undefined && object.pending !== null) + ? ReservationsMetric.fromPartial(object.pending) + : undefined; + message.active = (object.active !== undefined && object.active !== null) + ? ReservationsMetric.fromPartial(object.active) + : undefined; return message; }, }; @@ -634,35 +544,24 @@ export const Reservations = { messageTypeRegistry.set(Reservations.$type, Reservations); function createBaseInventory(): Inventory { - return { - $type: 'akash.provider.v1.Inventory', - cluster: undefined, - reservations: undefined, - }; + return { $type: "akash.provider.v1.Inventory", cluster: undefined, reservations: undefined }; } export const Inventory = { - $type: 'akash.provider.v1.Inventory' as const, + $type: "akash.provider.v1.Inventory" as const, - encode( - message: Inventory, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Inventory, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.cluster !== undefined) { Cluster.encode(message.cluster, writer.uint32(10).fork()).ldelim(); } if (message.reservations !== undefined) { - Reservations.encode( - message.reservations, - writer.uint32(18).fork(), - ).ldelim(); + Reservations.encode(message.reservations, writer.uint32(18).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Inventory { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseInventory(); while (reader.pos < end) { @@ -694,12 +593,8 @@ export const Inventory = { fromJSON(object: any): Inventory { return { $type: Inventory.$type, - cluster: isSet(object.cluster) - ? Cluster.fromJSON(object.cluster) - : undefined, - reservations: isSet(object.reservations) - ? Reservations.fromJSON(object.reservations) - : undefined, + cluster: isSet(object.cluster) ? Cluster.fromJSON(object.cluster) : undefined, + reservations: isSet(object.reservations) ? Reservations.fromJSON(object.reservations) : undefined, }; }, @@ -719,14 +614,12 @@ export const Inventory = { }, fromPartial(object: DeepPartial): Inventory { const message = createBaseInventory(); - message.cluster = - object.cluster !== undefined && object.cluster !== null - ? Cluster.fromPartial(object.cluster) - : undefined; - message.reservations = - object.reservations !== undefined && object.reservations !== null - ? Reservations.fromPartial(object.reservations) - : undefined; + message.cluster = (object.cluster !== undefined && object.cluster !== null) + ? Cluster.fromPartial(object.cluster) + : undefined; + message.reservations = (object.reservations !== undefined && object.reservations !== null) + ? Reservations.fromPartial(object.reservations) + : undefined; return message; }, }; @@ -734,20 +627,13 @@ export const Inventory = { messageTypeRegistry.set(Inventory.$type, Inventory); function createBaseClusterStatus(): ClusterStatus { - return { - $type: 'akash.provider.v1.ClusterStatus', - leases: undefined, - inventory: undefined, - }; + return { $type: "akash.provider.v1.ClusterStatus", leases: undefined, inventory: undefined }; } export const ClusterStatus = { - $type: 'akash.provider.v1.ClusterStatus' as const, + $type: "akash.provider.v1.ClusterStatus" as const, - encode( - message: ClusterStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ClusterStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.leases !== undefined) { Leases.encode(message.leases, writer.uint32(10).fork()).ldelim(); } @@ -758,8 +644,7 @@ export const ClusterStatus = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ClusterStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseClusterStatus(); while (reader.pos < end) { @@ -792,9 +677,7 @@ export const ClusterStatus = { return { $type: ClusterStatus.$type, leases: isSet(object.leases) ? Leases.fromJSON(object.leases) : undefined, - inventory: isSet(object.inventory) - ? Inventory.fromJSON(object.inventory) - : undefined, + inventory: isSet(object.inventory) ? Inventory.fromJSON(object.inventory) : undefined, }; }, @@ -814,14 +697,12 @@ export const ClusterStatus = { }, fromPartial(object: DeepPartial): ClusterStatus { const message = createBaseClusterStatus(); - message.leases = - object.leases !== undefined && object.leases !== null - ? Leases.fromPartial(object.leases) - : undefined; - message.inventory = - object.inventory !== undefined && object.inventory !== null - ? Inventory.fromPartial(object.inventory) - : undefined; + message.leases = (object.leases !== undefined && object.leases !== null) + ? Leases.fromPartial(object.leases) + : undefined; + message.inventory = (object.inventory !== undefined && object.inventory !== null) + ? Inventory.fromPartial(object.inventory) + : undefined; return message; }, }; @@ -829,16 +710,13 @@ export const ClusterStatus = { messageTypeRegistry.set(ClusterStatus.$type, ClusterStatus); function createBaseBidEngineStatus(): BidEngineStatus { - return { $type: 'akash.provider.v1.BidEngineStatus', orders: 0 }; + return { $type: "akash.provider.v1.BidEngineStatus", orders: 0 }; } export const BidEngineStatus = { - $type: 'akash.provider.v1.BidEngineStatus' as const, + $type: "akash.provider.v1.BidEngineStatus" as const, - encode( - message: BidEngineStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: BidEngineStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.orders !== 0) { writer.uint32(8).uint32(message.orders); } @@ -846,8 +724,7 @@ export const BidEngineStatus = { }, decode(input: _m0.Reader | Uint8Array, length?: number): BidEngineStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseBidEngineStatus(); while (reader.pos < end) { @@ -870,10 +747,7 @@ export const BidEngineStatus = { }, fromJSON(object: any): BidEngineStatus { - return { - $type: BidEngineStatus.$type, - orders: isSet(object.orders) ? globalThis.Number(object.orders) : 0, - }; + return { $type: BidEngineStatus.$type, orders: isSet(object.orders) ? globalThis.Number(object.orders) : 0 }; }, toJSON(message: BidEngineStatus): unknown { @@ -897,16 +771,13 @@ export const BidEngineStatus = { messageTypeRegistry.set(BidEngineStatus.$type, BidEngineStatus); function createBaseManifestStatus(): ManifestStatus { - return { $type: 'akash.provider.v1.ManifestStatus', deployments: 0 }; + return { $type: "akash.provider.v1.ManifestStatus", deployments: 0 }; } export const ManifestStatus = { - $type: 'akash.provider.v1.ManifestStatus' as const, + $type: "akash.provider.v1.ManifestStatus" as const, - encode( - message: ManifestStatus, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ManifestStatus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deployments !== 0) { writer.uint32(8).uint32(message.deployments); } @@ -914,8 +785,7 @@ export const ManifestStatus = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ManifestStatus { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseManifestStatus(); while (reader.pos < end) { @@ -940,9 +810,7 @@ export const ManifestStatus = { fromJSON(object: any): ManifestStatus { return { $type: ManifestStatus.$type, - deployments: isSet(object.deployments) - ? globalThis.Number(object.deployments) - : 0, + deployments: isSet(object.deployments) ? globalThis.Number(object.deployments) : 0, }; }, @@ -968,7 +836,7 @@ messageTypeRegistry.set(ManifestStatus.$type, ManifestStatus); function createBaseStatus(): Status { return { - $type: 'akash.provider.v1.Status', + $type: "akash.provider.v1.Status", errors: [], cluster: undefined, bidEngine: undefined, @@ -979,12 +847,9 @@ function createBaseStatus(): Status { } export const Status = { - $type: 'akash.provider.v1.Status' as const, + $type: "akash.provider.v1.Status" as const, - encode( - message: Status, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Status, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.errors) { writer.uint32(10).string(v!); } @@ -992,32 +857,22 @@ export const Status = { ClusterStatus.encode(message.cluster, writer.uint32(18).fork()).ldelim(); } if (message.bidEngine !== undefined) { - BidEngineStatus.encode( - message.bidEngine, - writer.uint32(26).fork(), - ).ldelim(); + BidEngineStatus.encode(message.bidEngine, writer.uint32(26).fork()).ldelim(); } if (message.manifest !== undefined) { - ManifestStatus.encode( - message.manifest, - writer.uint32(34).fork(), - ).ldelim(); + ManifestStatus.encode(message.manifest, writer.uint32(34).fork()).ldelim(); } for (const v of message.publicHostnames) { writer.uint32(42).string(v!); } if (message.timestamp !== undefined) { - Timestamp.encode( - toTimestamp(message.timestamp), - writer.uint32(50).fork(), - ).ldelim(); + Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Status { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseStatus(); while (reader.pos < end) { @@ -1063,9 +918,7 @@ export const Status = { break; } - message.timestamp = fromTimestamp( - Timestamp.decode(reader, reader.uint32()), - ); + message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1079,24 +932,14 @@ export const Status = { fromJSON(object: any): Status { return { $type: Status.$type, - errors: globalThis.Array.isArray(object?.errors) - ? object.errors.map((e: any) => globalThis.String(e)) - : [], - cluster: isSet(object.cluster) - ? ClusterStatus.fromJSON(object.cluster) - : undefined, - bidEngine: isSet(object.bidEngine) - ? BidEngineStatus.fromJSON(object.bidEngine) - : undefined, - manifest: isSet(object.manifest) - ? ManifestStatus.fromJSON(object.manifest) - : undefined, + errors: globalThis.Array.isArray(object?.errors) ? object.errors.map((e: any) => globalThis.String(e)) : [], + cluster: isSet(object.cluster) ? ClusterStatus.fromJSON(object.cluster) : undefined, + bidEngine: isSet(object.bidEngine) ? BidEngineStatus.fromJSON(object.bidEngine) : undefined, + manifest: isSet(object.manifest) ? ManifestStatus.fromJSON(object.manifest) : undefined, publicHostnames: globalThis.Array.isArray(object?.publicHostnames) ? object.publicHostnames.map((e: any) => globalThis.String(e)) : [], - timestamp: isSet(object.timestamp) - ? fromJsonTimestamp(object.timestamp) - : undefined, + timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined, }; }, @@ -1129,18 +972,15 @@ export const Status = { fromPartial(object: DeepPartial): Status { const message = createBaseStatus(); message.errors = object.errors?.map((e) => e) || []; - message.cluster = - object.cluster !== undefined && object.cluster !== null - ? ClusterStatus.fromPartial(object.cluster) - : undefined; - message.bidEngine = - object.bidEngine !== undefined && object.bidEngine !== null - ? BidEngineStatus.fromPartial(object.bidEngine) - : undefined; - message.manifest = - object.manifest !== undefined && object.manifest !== null - ? ManifestStatus.fromPartial(object.manifest) - : undefined; + message.cluster = (object.cluster !== undefined && object.cluster !== null) + ? ClusterStatus.fromPartial(object.cluster) + : undefined; + message.bidEngine = (object.bidEngine !== undefined && object.bidEngine !== null) + ? BidEngineStatus.fromPartial(object.bidEngine) + : undefined; + message.manifest = (object.manifest !== undefined && object.manifest !== null) + ? ManifestStatus.fromPartial(object.manifest) + : undefined; message.publicHostnames = object.publicHostnames?.map((e) => e) || []; message.timestamp = object.timestamp ?? undefined; return message; @@ -1149,31 +989,18 @@ export const Status = { messageTypeRegistry.set(Status.$type, Status); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; function toTimestamp(date: Date): Timestamp { const seconds = numberToLong(Math.trunc(date.getTime() / 1_000)); const nanos = (date.getTime() % 1_000) * 1_000_000; - return { $type: 'google.protobuf.Timestamp', seconds, nanos }; + return { $type: "google.protobuf.Timestamp", seconds, nanos }; } function fromTimestamp(t: Timestamp): Date { @@ -1185,7 +1012,7 @@ function fromTimestamp(t: Timestamp): Date { function fromJsonTimestamp(o: any): Date { if (o instanceof globalThis.Date) { return o; - } else if (typeof o === 'string') { + } else if (typeof o === "string") { return new globalThis.Date(o); } else { return fromTimestamp(Timestamp.fromJSON(o)); @@ -1202,7 +1029,7 @@ if (_m0.util.Long !== Long) { } function isObject(value: any): boolean { - return typeof value === 'object' && value !== null; + return typeof value === "object" && value !== null; } function isSet(value: any): boolean { diff --git a/ts/src/generated/akash/provider/v1beta1/provider.ts b/ts/src/generated/akash/provider/v1beta1/provider.ts index 5df09a72..c663877f 100644 --- a/ts/src/generated/akash/provider/v1beta1/provider.ts +++ b/ts/src/generated/akash/provider/v1beta1/provider.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta1/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta1/attribute"; /** ProviderInfo */ export interface ProviderInfo { - $type: 'akash.provider.v1beta1.ProviderInfo'; + $type: "akash.provider.v1beta1.ProviderInfo"; email: string; website: string; } /** MsgCreateProvider defines an SDK message for creating a provider */ export interface MsgCreateProvider { - $type: 'akash.provider.v1beta1.MsgCreateProvider'; + $type: "akash.provider.v1beta1.MsgCreateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -22,12 +22,12 @@ export interface MsgCreateProvider { /** MsgCreateProviderResponse defines the Msg/CreateProvider response type. */ export interface MsgCreateProviderResponse { - $type: 'akash.provider.v1beta1.MsgCreateProviderResponse'; + $type: "akash.provider.v1beta1.MsgCreateProviderResponse"; } /** MsgUpdateProvider defines an SDK message for updating a provider */ export interface MsgUpdateProvider { - $type: 'akash.provider.v1beta1.MsgUpdateProvider'; + $type: "akash.provider.v1beta1.MsgUpdateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -36,23 +36,23 @@ export interface MsgUpdateProvider { /** MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. */ export interface MsgUpdateProviderResponse { - $type: 'akash.provider.v1beta1.MsgUpdateProviderResponse'; + $type: "akash.provider.v1beta1.MsgUpdateProviderResponse"; } /** MsgDeleteProvider defines an SDK message for deleting a provider */ export interface MsgDeleteProvider { - $type: 'akash.provider.v1beta1.MsgDeleteProvider'; + $type: "akash.provider.v1beta1.MsgDeleteProvider"; owner: string; } /** MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. */ export interface MsgDeleteProviderResponse { - $type: 'akash.provider.v1beta1.MsgDeleteProviderResponse'; + $type: "akash.provider.v1beta1.MsgDeleteProviderResponse"; } /** Provider stores owner and host details */ export interface Provider { - $type: 'akash.provider.v1beta1.Provider'; + $type: "akash.provider.v1beta1.Provider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -60,32 +60,24 @@ export interface Provider { } function createBaseProviderInfo(): ProviderInfo { - return { - $type: 'akash.provider.v1beta1.ProviderInfo', - email: '', - website: '', - }; + return { $type: "akash.provider.v1beta1.ProviderInfo", email: "", website: "" }; } export const ProviderInfo = { - $type: 'akash.provider.v1beta1.ProviderInfo' as const, + $type: "akash.provider.v1beta1.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== '') { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== "") { writer.uint32(10).string(message.email); } - if (message.website !== '') { + if (message.website !== "") { writer.uint32(18).string(message.website); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ProviderInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProviderInfo(); while (reader.pos < end) { @@ -117,17 +109,17 @@ export const ProviderInfo = { fromJSON(object: any): ProviderInfo { return { $type: ProviderInfo.$type, - email: isSet(object.email) ? globalThis.String(object.email) : '', - website: isSet(object.website) ? globalThis.String(object.website) : '', + email: isSet(object.email) ? globalThis.String(object.email) : "", + website: isSet(object.website) ? globalThis.String(object.website) : "", }; }, toJSON(message: ProviderInfo): unknown { const obj: any = {}; - if (message.email !== '') { + if (message.email !== "") { obj.email = message.email; } - if (message.website !== '') { + if (message.website !== "") { obj.website = message.website; } return obj; @@ -138,8 +130,8 @@ export const ProviderInfo = { }, fromPartial(object: DeepPartial): ProviderInfo { const message = createBaseProviderInfo(); - message.email = object.email ?? ''; - message.website = object.website ?? ''; + message.email = object.email ?? ""; + message.website = object.website ?? ""; return message; }, }; @@ -147,26 +139,17 @@ export const ProviderInfo = { messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); function createBaseMsgCreateProvider(): MsgCreateProvider { - return { - $type: 'akash.provider.v1beta1.MsgCreateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta1.MsgCreateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgCreateProvider = { - $type: 'akash.provider.v1beta1.MsgCreateProvider' as const, + $type: "akash.provider.v1beta1.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -179,8 +162,7 @@ export const MsgCreateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProvider(); while (reader.pos < end) { @@ -226,8 +208,8 @@ export const MsgCreateProvider = { fromJSON(object: any): MsgCreateProvider { return { $type: MsgCreateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -237,10 +219,10 @@ export const MsgCreateProvider = { toJSON(message: MsgCreateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -257,14 +239,12 @@ export const MsgCreateProvider = { }, fromPartial(object: DeepPartial): MsgCreateProvider { const message = createBaseMsgCreateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -272,25 +252,18 @@ export const MsgCreateProvider = { messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { - return { $type: 'akash.provider.v1beta1.MsgCreateProviderResponse' }; + return { $type: "akash.provider.v1beta1.MsgCreateProviderResponse" }; } export const MsgCreateProviderResponse = { - $type: 'akash.provider.v1beta1.MsgCreateProviderResponse' as const, + $type: "akash.provider.v1beta1.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); while (reader.pos < end) { @@ -314,45 +287,29 @@ export const MsgCreateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateProviderResponse { + create(base?: DeepPartial): MsgCreateProviderResponse { return MsgCreateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateProviderResponse { + fromPartial(_: DeepPartial): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse, -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { - return { - $type: 'akash.provider.v1beta1.MsgUpdateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta1.MsgUpdateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgUpdateProvider = { - $type: 'akash.provider.v1beta1.MsgUpdateProvider' as const, + $type: "akash.provider.v1beta1.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -365,8 +322,7 @@ export const MsgUpdateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProvider(); while (reader.pos < end) { @@ -412,8 +368,8 @@ export const MsgUpdateProvider = { fromJSON(object: any): MsgUpdateProvider { return { $type: MsgUpdateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -423,10 +379,10 @@ export const MsgUpdateProvider = { toJSON(message: MsgUpdateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -443,14 +399,12 @@ export const MsgUpdateProvider = { }, fromPartial(object: DeepPartial): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -458,25 +412,18 @@ export const MsgUpdateProvider = { messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { - return { $type: 'akash.provider.v1beta1.MsgUpdateProviderResponse' }; + return { $type: "akash.provider.v1beta1.MsgUpdateProviderResponse" }; } export const MsgUpdateProviderResponse = { - $type: 'akash.provider.v1beta1.MsgUpdateProviderResponse' as const, + $type: "akash.provider.v1beta1.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); while (reader.pos < end) { @@ -500,44 +447,33 @@ export const MsgUpdateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateProviderResponse { + create(base?: DeepPartial): MsgUpdateProviderResponse { return MsgUpdateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateProviderResponse { + fromPartial(_: DeepPartial): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse, -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { - return { $type: 'akash.provider.v1beta1.MsgDeleteProvider', owner: '' }; + return { $type: "akash.provider.v1beta1.MsgDeleteProvider", owner: "" }; } export const MsgDeleteProvider = { - $type: 'akash.provider.v1beta1.MsgDeleteProvider' as const, + $type: "akash.provider.v1beta1.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProvider(); while (reader.pos < end) { @@ -560,15 +496,12 @@ export const MsgDeleteProvider = { }, fromJSON(object: any): MsgDeleteProvider { - return { - $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - }; + return { $type: MsgDeleteProvider.$type, owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; }, toJSON(message: MsgDeleteProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -579,7 +512,7 @@ export const MsgDeleteProvider = { }, fromPartial(object: DeepPartial): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; return message; }, }; @@ -587,25 +520,18 @@ export const MsgDeleteProvider = { messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { - return { $type: 'akash.provider.v1beta1.MsgDeleteProviderResponse' }; + return { $type: "akash.provider.v1beta1.MsgDeleteProviderResponse" }; } export const MsgDeleteProviderResponse = { - $type: 'akash.provider.v1beta1.MsgDeleteProviderResponse' as const, + $type: "akash.provider.v1beta1.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); while (reader.pos < end) { @@ -629,45 +555,29 @@ export const MsgDeleteProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderResponse { + create(base?: DeepPartial): MsgDeleteProviderResponse { return MsgDeleteProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse, -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { - return { - $type: 'akash.provider.v1beta1.Provider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta1.Provider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const Provider = { - $type: 'akash.provider.v1beta1.Provider' as const, + $type: "akash.provider.v1beta1.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -680,8 +590,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -727,8 +636,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -738,10 +647,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -758,14 +667,12 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -775,20 +682,14 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider, - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider, - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider, - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } -export const MsgServiceName = 'akash.provider.v1beta1.Msg'; +export const MsgServiceName = "akash.provider.v1beta1.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -799,65 +700,36 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider, - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateProvider', data); - return promise.then((data) => - MsgCreateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateProvider", data); + return promise.then((data) => MsgCreateProviderResponse.decode(_m0.Reader.create(data))); } - UpdateProvider( - request: MsgUpdateProvider, - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateProvider', data); - return promise.then((data) => - MsgUpdateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateProvider", data); + return promise.then((data) => MsgUpdateProviderResponse.decode(_m0.Reader.create(data))); } - DeleteProvider( - request: MsgDeleteProvider, - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DeleteProvider', data); - return promise.then((data) => - MsgDeleteProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProvider", data); + return promise.then((data) => MsgDeleteProviderResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta2/genesis.ts b/ts/src/generated/akash/provider/v1beta2/genesis.ts index 50440b11..4e8eb739 100644 --- a/ts/src/generated/akash/provider/v1beta2/genesis.ts +++ b/ts/src/generated/akash/provider/v1beta2/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './provider'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./provider"; /** GenesisState defines the basic genesis state used by provider module */ export interface GenesisState { - $type: 'akash.provider.v1beta2.GenesisState'; + $type: "akash.provider.v1beta2.GenesisState"; providers: Provider[]; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.provider.v1beta2.GenesisState', providers: [] }; + return { $type: "akash.provider.v1beta2.GenesisState", providers: [] }; } export const GenesisState = { - $type: 'akash.provider.v1beta2.GenesisState' as const, + $type: "akash.provider.v1beta2.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -73,34 +69,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta2/provider.ts b/ts/src/generated/akash/provider/v1beta2/provider.ts index d978be24..8ce93dd5 100644 --- a/ts/src/generated/akash/provider/v1beta2/provider.ts +++ b/ts/src/generated/akash/provider/v1beta2/provider.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta2/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta2/attribute"; /** ProviderInfo */ export interface ProviderInfo { - $type: 'akash.provider.v1beta2.ProviderInfo'; + $type: "akash.provider.v1beta2.ProviderInfo"; email: string; website: string; } /** MsgCreateProvider defines an SDK message for creating a provider */ export interface MsgCreateProvider { - $type: 'akash.provider.v1beta2.MsgCreateProvider'; + $type: "akash.provider.v1beta2.MsgCreateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -22,12 +22,12 @@ export interface MsgCreateProvider { /** MsgCreateProviderResponse defines the Msg/CreateProvider response type. */ export interface MsgCreateProviderResponse { - $type: 'akash.provider.v1beta2.MsgCreateProviderResponse'; + $type: "akash.provider.v1beta2.MsgCreateProviderResponse"; } /** MsgUpdateProvider defines an SDK message for updating a provider */ export interface MsgUpdateProvider { - $type: 'akash.provider.v1beta2.MsgUpdateProvider'; + $type: "akash.provider.v1beta2.MsgUpdateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -36,23 +36,23 @@ export interface MsgUpdateProvider { /** MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. */ export interface MsgUpdateProviderResponse { - $type: 'akash.provider.v1beta2.MsgUpdateProviderResponse'; + $type: "akash.provider.v1beta2.MsgUpdateProviderResponse"; } /** MsgDeleteProvider defines an SDK message for deleting a provider */ export interface MsgDeleteProvider { - $type: 'akash.provider.v1beta2.MsgDeleteProvider'; + $type: "akash.provider.v1beta2.MsgDeleteProvider"; owner: string; } /** MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. */ export interface MsgDeleteProviderResponse { - $type: 'akash.provider.v1beta2.MsgDeleteProviderResponse'; + $type: "akash.provider.v1beta2.MsgDeleteProviderResponse"; } /** Provider stores owner and host details */ export interface Provider { - $type: 'akash.provider.v1beta2.Provider'; + $type: "akash.provider.v1beta2.Provider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -60,32 +60,24 @@ export interface Provider { } function createBaseProviderInfo(): ProviderInfo { - return { - $type: 'akash.provider.v1beta2.ProviderInfo', - email: '', - website: '', - }; + return { $type: "akash.provider.v1beta2.ProviderInfo", email: "", website: "" }; } export const ProviderInfo = { - $type: 'akash.provider.v1beta2.ProviderInfo' as const, + $type: "akash.provider.v1beta2.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== '') { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== "") { writer.uint32(10).string(message.email); } - if (message.website !== '') { + if (message.website !== "") { writer.uint32(18).string(message.website); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ProviderInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProviderInfo(); while (reader.pos < end) { @@ -117,17 +109,17 @@ export const ProviderInfo = { fromJSON(object: any): ProviderInfo { return { $type: ProviderInfo.$type, - email: isSet(object.email) ? globalThis.String(object.email) : '', - website: isSet(object.website) ? globalThis.String(object.website) : '', + email: isSet(object.email) ? globalThis.String(object.email) : "", + website: isSet(object.website) ? globalThis.String(object.website) : "", }; }, toJSON(message: ProviderInfo): unknown { const obj: any = {}; - if (message.email !== '') { + if (message.email !== "") { obj.email = message.email; } - if (message.website !== '') { + if (message.website !== "") { obj.website = message.website; } return obj; @@ -138,8 +130,8 @@ export const ProviderInfo = { }, fromPartial(object: DeepPartial): ProviderInfo { const message = createBaseProviderInfo(); - message.email = object.email ?? ''; - message.website = object.website ?? ''; + message.email = object.email ?? ""; + message.website = object.website ?? ""; return message; }, }; @@ -147,26 +139,17 @@ export const ProviderInfo = { messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); function createBaseMsgCreateProvider(): MsgCreateProvider { - return { - $type: 'akash.provider.v1beta2.MsgCreateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta2.MsgCreateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgCreateProvider = { - $type: 'akash.provider.v1beta2.MsgCreateProvider' as const, + $type: "akash.provider.v1beta2.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -179,8 +162,7 @@ export const MsgCreateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProvider(); while (reader.pos < end) { @@ -226,8 +208,8 @@ export const MsgCreateProvider = { fromJSON(object: any): MsgCreateProvider { return { $type: MsgCreateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -237,10 +219,10 @@ export const MsgCreateProvider = { toJSON(message: MsgCreateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -257,14 +239,12 @@ export const MsgCreateProvider = { }, fromPartial(object: DeepPartial): MsgCreateProvider { const message = createBaseMsgCreateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -272,25 +252,18 @@ export const MsgCreateProvider = { messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { - return { $type: 'akash.provider.v1beta2.MsgCreateProviderResponse' }; + return { $type: "akash.provider.v1beta2.MsgCreateProviderResponse" }; } export const MsgCreateProviderResponse = { - $type: 'akash.provider.v1beta2.MsgCreateProviderResponse' as const, + $type: "akash.provider.v1beta2.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); while (reader.pos < end) { @@ -314,45 +287,29 @@ export const MsgCreateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateProviderResponse { + create(base?: DeepPartial): MsgCreateProviderResponse { return MsgCreateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateProviderResponse { + fromPartial(_: DeepPartial): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse, -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { - return { - $type: 'akash.provider.v1beta2.MsgUpdateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta2.MsgUpdateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgUpdateProvider = { - $type: 'akash.provider.v1beta2.MsgUpdateProvider' as const, + $type: "akash.provider.v1beta2.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -365,8 +322,7 @@ export const MsgUpdateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProvider(); while (reader.pos < end) { @@ -412,8 +368,8 @@ export const MsgUpdateProvider = { fromJSON(object: any): MsgUpdateProvider { return { $type: MsgUpdateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -423,10 +379,10 @@ export const MsgUpdateProvider = { toJSON(message: MsgUpdateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -443,14 +399,12 @@ export const MsgUpdateProvider = { }, fromPartial(object: DeepPartial): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -458,25 +412,18 @@ export const MsgUpdateProvider = { messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { - return { $type: 'akash.provider.v1beta2.MsgUpdateProviderResponse' }; + return { $type: "akash.provider.v1beta2.MsgUpdateProviderResponse" }; } export const MsgUpdateProviderResponse = { - $type: 'akash.provider.v1beta2.MsgUpdateProviderResponse' as const, + $type: "akash.provider.v1beta2.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); while (reader.pos < end) { @@ -500,44 +447,33 @@ export const MsgUpdateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateProviderResponse { + create(base?: DeepPartial): MsgUpdateProviderResponse { return MsgUpdateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateProviderResponse { + fromPartial(_: DeepPartial): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse, -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { - return { $type: 'akash.provider.v1beta2.MsgDeleteProvider', owner: '' }; + return { $type: "akash.provider.v1beta2.MsgDeleteProvider", owner: "" }; } export const MsgDeleteProvider = { - $type: 'akash.provider.v1beta2.MsgDeleteProvider' as const, + $type: "akash.provider.v1beta2.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProvider(); while (reader.pos < end) { @@ -560,15 +496,12 @@ export const MsgDeleteProvider = { }, fromJSON(object: any): MsgDeleteProvider { - return { - $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - }; + return { $type: MsgDeleteProvider.$type, owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; }, toJSON(message: MsgDeleteProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -579,7 +512,7 @@ export const MsgDeleteProvider = { }, fromPartial(object: DeepPartial): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; return message; }, }; @@ -587,25 +520,18 @@ export const MsgDeleteProvider = { messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { - return { $type: 'akash.provider.v1beta2.MsgDeleteProviderResponse' }; + return { $type: "akash.provider.v1beta2.MsgDeleteProviderResponse" }; } export const MsgDeleteProviderResponse = { - $type: 'akash.provider.v1beta2.MsgDeleteProviderResponse' as const, + $type: "akash.provider.v1beta2.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); while (reader.pos < end) { @@ -629,45 +555,29 @@ export const MsgDeleteProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderResponse { + create(base?: DeepPartial): MsgDeleteProviderResponse { return MsgDeleteProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse, -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { - return { - $type: 'akash.provider.v1beta2.Provider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta2.Provider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const Provider = { - $type: 'akash.provider.v1beta2.Provider' as const, + $type: "akash.provider.v1beta2.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -680,8 +590,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -727,8 +636,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -738,10 +647,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -758,14 +667,12 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -775,20 +682,14 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider, - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider, - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider, - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } -export const MsgServiceName = 'akash.provider.v1beta2.Msg'; +export const MsgServiceName = "akash.provider.v1beta2.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -799,65 +700,36 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider, - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateProvider', data); - return promise.then((data) => - MsgCreateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateProvider", data); + return promise.then((data) => MsgCreateProviderResponse.decode(_m0.Reader.create(data))); } - UpdateProvider( - request: MsgUpdateProvider, - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateProvider', data); - return promise.then((data) => - MsgUpdateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateProvider", data); + return promise.then((data) => MsgUpdateProviderResponse.decode(_m0.Reader.create(data))); } - DeleteProvider( - request: MsgDeleteProvider, - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DeleteProvider', data); - return promise.then((data) => - MsgDeleteProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProvider", data); + return promise.then((data) => MsgDeleteProviderResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta2/query.ts b/ts/src/generated/akash/provider/v1beta2/query.ts index 9bf3281d..f6e922a8 100644 --- a/ts/src/generated/akash/provider/v1beta2/query.ts +++ b/ts/src/generated/akash/provider/v1beta2/query.ts @@ -1,64 +1,51 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './provider'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./provider"; /** QueryProvidersRequest is request type for the Query/Providers RPC method */ export interface QueryProvidersRequest { - $type: 'akash.provider.v1beta2.QueryProvidersRequest'; + $type: "akash.provider.v1beta2.QueryProvidersRequest"; pagination: PageRequest | undefined; } /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryProvidersResponse { - $type: 'akash.provider.v1beta2.QueryProvidersResponse'; + $type: "akash.provider.v1beta2.QueryProvidersResponse"; providers: Provider[]; pagination: PageResponse | undefined; } /** QueryProviderRequest is request type for the Query/Provider RPC method */ export interface QueryProviderRequest { - $type: 'akash.provider.v1beta2.QueryProviderRequest'; + $type: "akash.provider.v1beta2.QueryProviderRequest"; owner: string; } /** QueryProviderResponse is response type for the Query/Provider RPC method */ export interface QueryProviderResponse { - $type: 'akash.provider.v1beta2.QueryProviderResponse'; + $type: "akash.provider.v1beta2.QueryProviderResponse"; provider: Provider | undefined; } function createBaseQueryProvidersRequest(): QueryProvidersRequest { - return { - $type: 'akash.provider.v1beta2.QueryProvidersRequest', - pagination: undefined, - }; + return { $type: "akash.provider.v1beta2.QueryProvidersRequest", pagination: undefined }; } export const QueryProvidersRequest = { - $type: 'akash.provider.v1beta2.QueryProvidersRequest' as const, + $type: "akash.provider.v1beta2.QueryProvidersRequest" as const, - encode( - message: QueryProvidersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersRequest(); while (reader.pos < end) { @@ -83,9 +70,7 @@ export const QueryProvidersRequest = { fromJSON(object: any): QueryProvidersRequest { return { $type: QueryProvidersRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -100,14 +85,11 @@ export const QueryProvidersRequest = { create(base?: DeepPartial): QueryProvidersRequest { return QueryProvidersRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersRequest { + fromPartial(object: DeepPartial): QueryProvidersRequest { const message = createBaseQueryProvidersRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -115,38 +97,24 @@ export const QueryProvidersRequest = { messageTypeRegistry.set(QueryProvidersRequest.$type, QueryProvidersRequest); function createBaseQueryProvidersResponse(): QueryProvidersResponse { - return { - $type: 'akash.provider.v1beta2.QueryProvidersResponse', - providers: [], - pagination: undefined, - }; + return { $type: "akash.provider.v1beta2.QueryProvidersResponse", providers: [], pagination: undefined }; } export const QueryProvidersResponse = { - $type: 'akash.provider.v1beta2.QueryProvidersResponse' as const, + $type: "akash.provider.v1beta2.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); while (reader.pos < end) { @@ -181,9 +149,7 @@ export const QueryProvidersResponse = { providers: globalThis.Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -201,16 +167,12 @@ export const QueryProvidersResponse = { create(base?: DeepPartial): QueryProvidersResponse { return QueryProvidersResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersResponse { + fromPartial(object: DeepPartial): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -218,28 +180,21 @@ export const QueryProvidersResponse = { messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); function createBaseQueryProviderRequest(): QueryProviderRequest { - return { $type: 'akash.provider.v1beta2.QueryProviderRequest', owner: '' }; + return { $type: "akash.provider.v1beta2.QueryProviderRequest", owner: "" }; } export const QueryProviderRequest = { - $type: 'akash.provider.v1beta2.QueryProviderRequest' as const, + $type: "akash.provider.v1beta2.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); while (reader.pos < end) { @@ -262,15 +217,12 @@ export const QueryProviderRequest = { }, fromJSON(object: any): QueryProviderRequest { - return { - $type: QueryProviderRequest.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - }; + return { $type: QueryProviderRequest.$type, owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; }, toJSON(message: QueryProviderRequest): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -281,7 +233,7 @@ export const QueryProviderRequest = { }, fromPartial(object: DeepPartial): QueryProviderRequest { const message = createBaseQueryProviderRequest(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; return message; }, }; @@ -289,31 +241,21 @@ export const QueryProviderRequest = { messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryProviderResponse(): QueryProviderResponse { - return { - $type: 'akash.provider.v1beta2.QueryProviderResponse', - provider: undefined, - }; + return { $type: "akash.provider.v1beta2.QueryProviderResponse", provider: undefined }; } export const QueryProviderResponse = { - $type: 'akash.provider.v1beta2.QueryProviderResponse' as const, + $type: "akash.provider.v1beta2.QueryProviderResponse" as const, - encode( - message: QueryProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.provider !== undefined) { Provider.encode(message.provider, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderResponse(); while (reader.pos < end) { @@ -338,9 +280,7 @@ export const QueryProviderResponse = { fromJSON(object: any): QueryProviderResponse { return { $type: QueryProviderResponse.$type, - provider: isSet(object.provider) - ? Provider.fromJSON(object.provider) - : undefined, + provider: isSet(object.provider) ? Provider.fromJSON(object.provider) : undefined, }; }, @@ -355,14 +295,11 @@ export const QueryProviderResponse = { create(base?: DeepPartial): QueryProviderResponse { return QueryProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderResponse { + fromPartial(object: DeepPartial): QueryProviderResponse { const message = createBaseQueryProviderResponse(); - message.provider = - object.provider !== undefined && object.provider !== null - ? Provider.fromPartial(object.provider) - : undefined; + message.provider = (object.provider !== undefined && object.provider !== null) + ? Provider.fromPartial(object.provider) + : undefined; return message; }, }; @@ -377,7 +314,7 @@ export interface Query { Provider(request: QueryProviderRequest): Promise; } -export const QueryServiceName = 'akash.provider.v1beta2.Query'; +export const QueryServiceName = "akash.provider.v1beta2.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -389,49 +326,28 @@ export class QueryClientImpl implements Query { } Providers(request: QueryProvidersRequest): Promise { const data = QueryProvidersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Providers', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Providers", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } Provider(request: QueryProviderRequest): Promise { const data = QueryProviderRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Provider', data); - return promise.then((data) => - QueryProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Provider", data); + return promise.then((data) => QueryProviderResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta3/genesis.ts b/ts/src/generated/akash/provider/v1beta3/genesis.ts index 4323369c..f60156b9 100644 --- a/ts/src/generated/akash/provider/v1beta3/genesis.ts +++ b/ts/src/generated/akash/provider/v1beta3/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './provider'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./provider"; /** GenesisState defines the basic genesis state used by provider module */ export interface GenesisState { - $type: 'akash.provider.v1beta3.GenesisState'; + $type: "akash.provider.v1beta3.GenesisState"; providers: Provider[]; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.provider.v1beta3.GenesisState', providers: [] }; + return { $type: "akash.provider.v1beta3.GenesisState", providers: [] }; } export const GenesisState = { - $type: 'akash.provider.v1beta3.GenesisState' as const, + $type: "akash.provider.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -73,34 +69,20 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta3/provider.ts b/ts/src/generated/akash/provider/v1beta3/provider.ts index 159f1b04..8f694232 100644 --- a/ts/src/generated/akash/provider/v1beta3/provider.ts +++ b/ts/src/generated/akash/provider/v1beta3/provider.ts @@ -1,19 +1,19 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Attribute } from '../../base/v1beta3/attribute'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Attribute } from "../../base/v1beta3/attribute"; /** ProviderInfo */ export interface ProviderInfo { - $type: 'akash.provider.v1beta3.ProviderInfo'; + $type: "akash.provider.v1beta3.ProviderInfo"; email: string; website: string; } /** MsgCreateProvider defines an SDK message for creating a provider */ export interface MsgCreateProvider { - $type: 'akash.provider.v1beta3.MsgCreateProvider'; + $type: "akash.provider.v1beta3.MsgCreateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -22,12 +22,12 @@ export interface MsgCreateProvider { /** MsgCreateProviderResponse defines the Msg/CreateProvider response type. */ export interface MsgCreateProviderResponse { - $type: 'akash.provider.v1beta3.MsgCreateProviderResponse'; + $type: "akash.provider.v1beta3.MsgCreateProviderResponse"; } /** MsgUpdateProvider defines an SDK message for updating a provider */ export interface MsgUpdateProvider { - $type: 'akash.provider.v1beta3.MsgUpdateProvider'; + $type: "akash.provider.v1beta3.MsgUpdateProvider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -36,23 +36,23 @@ export interface MsgUpdateProvider { /** MsgUpdateProviderResponse defines the Msg/UpdateProvider response type. */ export interface MsgUpdateProviderResponse { - $type: 'akash.provider.v1beta3.MsgUpdateProviderResponse'; + $type: "akash.provider.v1beta3.MsgUpdateProviderResponse"; } /** MsgDeleteProvider defines an SDK message for deleting a provider */ export interface MsgDeleteProvider { - $type: 'akash.provider.v1beta3.MsgDeleteProvider'; + $type: "akash.provider.v1beta3.MsgDeleteProvider"; owner: string; } /** MsgDeleteProviderResponse defines the Msg/DeleteProvider response type. */ export interface MsgDeleteProviderResponse { - $type: 'akash.provider.v1beta3.MsgDeleteProviderResponse'; + $type: "akash.provider.v1beta3.MsgDeleteProviderResponse"; } /** Provider stores owner and host details */ export interface Provider { - $type: 'akash.provider.v1beta3.Provider'; + $type: "akash.provider.v1beta3.Provider"; owner: string; hostUri: string; attributes: Attribute[]; @@ -60,32 +60,24 @@ export interface Provider { } function createBaseProviderInfo(): ProviderInfo { - return { - $type: 'akash.provider.v1beta3.ProviderInfo', - email: '', - website: '', - }; + return { $type: "akash.provider.v1beta3.ProviderInfo", email: "", website: "" }; } export const ProviderInfo = { - $type: 'akash.provider.v1beta3.ProviderInfo' as const, + $type: "akash.provider.v1beta3.ProviderInfo" as const, - encode( - message: ProviderInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.email !== '') { + encode(message: ProviderInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.email !== "") { writer.uint32(10).string(message.email); } - if (message.website !== '') { + if (message.website !== "") { writer.uint32(18).string(message.website); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): ProviderInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProviderInfo(); while (reader.pos < end) { @@ -117,17 +109,17 @@ export const ProviderInfo = { fromJSON(object: any): ProviderInfo { return { $type: ProviderInfo.$type, - email: isSet(object.email) ? globalThis.String(object.email) : '', - website: isSet(object.website) ? globalThis.String(object.website) : '', + email: isSet(object.email) ? globalThis.String(object.email) : "", + website: isSet(object.website) ? globalThis.String(object.website) : "", }; }, toJSON(message: ProviderInfo): unknown { const obj: any = {}; - if (message.email !== '') { + if (message.email !== "") { obj.email = message.email; } - if (message.website !== '') { + if (message.website !== "") { obj.website = message.website; } return obj; @@ -138,8 +130,8 @@ export const ProviderInfo = { }, fromPartial(object: DeepPartial): ProviderInfo { const message = createBaseProviderInfo(); - message.email = object.email ?? ''; - message.website = object.website ?? ''; + message.email = object.email ?? ""; + message.website = object.website ?? ""; return message; }, }; @@ -147,26 +139,17 @@ export const ProviderInfo = { messageTypeRegistry.set(ProviderInfo.$type, ProviderInfo); function createBaseMsgCreateProvider(): MsgCreateProvider { - return { - $type: 'akash.provider.v1beta3.MsgCreateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta3.MsgCreateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgCreateProvider = { - $type: 'akash.provider.v1beta3.MsgCreateProvider' as const, + $type: "akash.provider.v1beta3.MsgCreateProvider" as const, - encode( - message: MsgCreateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgCreateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -179,8 +162,7 @@ export const MsgCreateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProvider(); while (reader.pos < end) { @@ -226,8 +208,8 @@ export const MsgCreateProvider = { fromJSON(object: any): MsgCreateProvider { return { $type: MsgCreateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -237,10 +219,10 @@ export const MsgCreateProvider = { toJSON(message: MsgCreateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -257,14 +239,12 @@ export const MsgCreateProvider = { }, fromPartial(object: DeepPartial): MsgCreateProvider { const message = createBaseMsgCreateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -272,25 +252,18 @@ export const MsgCreateProvider = { messageTypeRegistry.set(MsgCreateProvider.$type, MsgCreateProvider); function createBaseMsgCreateProviderResponse(): MsgCreateProviderResponse { - return { $type: 'akash.provider.v1beta3.MsgCreateProviderResponse' }; + return { $type: "akash.provider.v1beta3.MsgCreateProviderResponse" }; } export const MsgCreateProviderResponse = { - $type: 'akash.provider.v1beta3.MsgCreateProviderResponse' as const, + $type: "akash.provider.v1beta3.MsgCreateProviderResponse" as const, - encode( - _: MsgCreateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgCreateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgCreateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgCreateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgCreateProviderResponse(); while (reader.pos < end) { @@ -314,45 +287,29 @@ export const MsgCreateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgCreateProviderResponse { + create(base?: DeepPartial): MsgCreateProviderResponse { return MsgCreateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgCreateProviderResponse { + fromPartial(_: DeepPartial): MsgCreateProviderResponse { const message = createBaseMsgCreateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgCreateProviderResponse.$type, - MsgCreateProviderResponse, -); +messageTypeRegistry.set(MsgCreateProviderResponse.$type, MsgCreateProviderResponse); function createBaseMsgUpdateProvider(): MsgUpdateProvider { - return { - $type: 'akash.provider.v1beta3.MsgUpdateProvider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta3.MsgUpdateProvider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const MsgUpdateProvider = { - $type: 'akash.provider.v1beta3.MsgUpdateProvider' as const, + $type: "akash.provider.v1beta3.MsgUpdateProvider" as const, - encode( - message: MsgUpdateProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgUpdateProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -365,8 +322,7 @@ export const MsgUpdateProvider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProvider(); while (reader.pos < end) { @@ -412,8 +368,8 @@ export const MsgUpdateProvider = { fromJSON(object: any): MsgUpdateProvider { return { $type: MsgUpdateProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -423,10 +379,10 @@ export const MsgUpdateProvider = { toJSON(message: MsgUpdateProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -443,14 +399,12 @@ export const MsgUpdateProvider = { }, fromPartial(object: DeepPartial): MsgUpdateProvider { const message = createBaseMsgUpdateProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -458,25 +412,18 @@ export const MsgUpdateProvider = { messageTypeRegistry.set(MsgUpdateProvider.$type, MsgUpdateProvider); function createBaseMsgUpdateProviderResponse(): MsgUpdateProviderResponse { - return { $type: 'akash.provider.v1beta3.MsgUpdateProviderResponse' }; + return { $type: "akash.provider.v1beta3.MsgUpdateProviderResponse" }; } export const MsgUpdateProviderResponse = { - $type: 'akash.provider.v1beta3.MsgUpdateProviderResponse' as const, + $type: "akash.provider.v1beta3.MsgUpdateProviderResponse" as const, - encode( - _: MsgUpdateProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgUpdateProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgUpdateProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgUpdateProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgUpdateProviderResponse(); while (reader.pos < end) { @@ -500,44 +447,33 @@ export const MsgUpdateProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgUpdateProviderResponse { + create(base?: DeepPartial): MsgUpdateProviderResponse { return MsgUpdateProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgUpdateProviderResponse { + fromPartial(_: DeepPartial): MsgUpdateProviderResponse { const message = createBaseMsgUpdateProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgUpdateProviderResponse.$type, - MsgUpdateProviderResponse, -); +messageTypeRegistry.set(MsgUpdateProviderResponse.$type, MsgUpdateProviderResponse); function createBaseMsgDeleteProvider(): MsgDeleteProvider { - return { $type: 'akash.provider.v1beta3.MsgDeleteProvider', owner: '' }; + return { $type: "akash.provider.v1beta3.MsgDeleteProvider", owner: "" }; } export const MsgDeleteProvider = { - $type: 'akash.provider.v1beta3.MsgDeleteProvider' as const, + $type: "akash.provider.v1beta3.MsgDeleteProvider" as const, - encode( - message: MsgDeleteProvider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: MsgDeleteProvider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProvider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProvider(); while (reader.pos < end) { @@ -560,15 +496,12 @@ export const MsgDeleteProvider = { }, fromJSON(object: any): MsgDeleteProvider { - return { - $type: MsgDeleteProvider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - }; + return { $type: MsgDeleteProvider.$type, owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; }, toJSON(message: MsgDeleteProvider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -579,7 +512,7 @@ export const MsgDeleteProvider = { }, fromPartial(object: DeepPartial): MsgDeleteProvider { const message = createBaseMsgDeleteProvider(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; return message; }, }; @@ -587,25 +520,18 @@ export const MsgDeleteProvider = { messageTypeRegistry.set(MsgDeleteProvider.$type, MsgDeleteProvider); function createBaseMsgDeleteProviderResponse(): MsgDeleteProviderResponse { - return { $type: 'akash.provider.v1beta3.MsgDeleteProviderResponse' }; + return { $type: "akash.provider.v1beta3.MsgDeleteProviderResponse" }; } export const MsgDeleteProviderResponse = { - $type: 'akash.provider.v1beta3.MsgDeleteProviderResponse' as const, + $type: "akash.provider.v1beta3.MsgDeleteProviderResponse" as const, - encode( - _: MsgDeleteProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(_: MsgDeleteProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MsgDeleteProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMsgDeleteProviderResponse(); while (reader.pos < end) { @@ -629,45 +555,29 @@ export const MsgDeleteProviderResponse = { return obj; }, - create( - base?: DeepPartial, - ): MsgDeleteProviderResponse { + create(base?: DeepPartial): MsgDeleteProviderResponse { return MsgDeleteProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - _: DeepPartial, - ): MsgDeleteProviderResponse { + fromPartial(_: DeepPartial): MsgDeleteProviderResponse { const message = createBaseMsgDeleteProviderResponse(); return message; }, }; -messageTypeRegistry.set( - MsgDeleteProviderResponse.$type, - MsgDeleteProviderResponse, -); +messageTypeRegistry.set(MsgDeleteProviderResponse.$type, MsgDeleteProviderResponse); function createBaseProvider(): Provider { - return { - $type: 'akash.provider.v1beta3.Provider', - owner: '', - hostUri: '', - attributes: [], - info: undefined, - }; + return { $type: "akash.provider.v1beta3.Provider", owner: "", hostUri: "", attributes: [], info: undefined }; } export const Provider = { - $type: 'akash.provider.v1beta3.Provider' as const, + $type: "akash.provider.v1beta3.Provider" as const, - encode( - message: Provider, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: Provider, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } - if (message.hostUri !== '') { + if (message.hostUri !== "") { writer.uint32(18).string(message.hostUri); } for (const v of message.attributes) { @@ -680,8 +590,7 @@ export const Provider = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Provider { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseProvider(); while (reader.pos < end) { @@ -727,8 +636,8 @@ export const Provider = { fromJSON(object: any): Provider { return { $type: Provider.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : '', + owner: isSet(object.owner) ? globalThis.String(object.owner) : "", + hostUri: isSet(object.hostUri) ? globalThis.String(object.hostUri) : "", attributes: globalThis.Array.isArray(object?.attributes) ? object.attributes.map((e: any) => Attribute.fromJSON(e)) : [], @@ -738,10 +647,10 @@ export const Provider = { toJSON(message: Provider): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } - if (message.hostUri !== '') { + if (message.hostUri !== "") { obj.hostUri = message.hostUri; } if (message.attributes?.length) { @@ -758,14 +667,12 @@ export const Provider = { }, fromPartial(object: DeepPartial): Provider { const message = createBaseProvider(); - message.owner = object.owner ?? ''; - message.hostUri = object.hostUri ?? ''; - message.attributes = - object.attributes?.map((e) => Attribute.fromPartial(e)) || []; - message.info = - object.info !== undefined && object.info !== null - ? ProviderInfo.fromPartial(object.info) - : undefined; + message.owner = object.owner ?? ""; + message.hostUri = object.hostUri ?? ""; + message.attributes = object.attributes?.map((e) => Attribute.fromPartial(e)) || []; + message.info = (object.info !== undefined && object.info !== null) + ? ProviderInfo.fromPartial(object.info) + : undefined; return message; }, }; @@ -775,20 +682,14 @@ messageTypeRegistry.set(Provider.$type, Provider); /** Msg defines the provider Msg service */ export interface Msg { /** CreateProvider defines a method that creates a provider given the proper inputs */ - CreateProvider( - request: MsgCreateProvider, - ): Promise; + CreateProvider(request: MsgCreateProvider): Promise; /** UpdateProvider defines a method that updates a provider given the proper inputs */ - UpdateProvider( - request: MsgUpdateProvider, - ): Promise; + UpdateProvider(request: MsgUpdateProvider): Promise; /** DeleteProvider defines a method that deletes a provider given the proper inputs */ - DeleteProvider( - request: MsgDeleteProvider, - ): Promise; + DeleteProvider(request: MsgDeleteProvider): Promise; } -export const MsgServiceName = 'akash.provider.v1beta3.Msg'; +export const MsgServiceName = "akash.provider.v1beta3.Msg"; export class MsgClientImpl implements Msg { private readonly rpc: Rpc; private readonly service: string; @@ -799,65 +700,36 @@ export class MsgClientImpl implements Msg { this.UpdateProvider = this.UpdateProvider.bind(this); this.DeleteProvider = this.DeleteProvider.bind(this); } - CreateProvider( - request: MsgCreateProvider, - ): Promise { + CreateProvider(request: MsgCreateProvider): Promise { const data = MsgCreateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'CreateProvider', data); - return promise.then((data) => - MsgCreateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "CreateProvider", data); + return promise.then((data) => MsgCreateProviderResponse.decode(_m0.Reader.create(data))); } - UpdateProvider( - request: MsgUpdateProvider, - ): Promise { + UpdateProvider(request: MsgUpdateProvider): Promise { const data = MsgUpdateProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'UpdateProvider', data); - return promise.then((data) => - MsgUpdateProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "UpdateProvider", data); + return promise.then((data) => MsgUpdateProviderResponse.decode(_m0.Reader.create(data))); } - DeleteProvider( - request: MsgDeleteProvider, - ): Promise { + DeleteProvider(request: MsgDeleteProvider): Promise { const data = MsgDeleteProvider.encode(request).finish(); - const promise = this.rpc.request(this.service, 'DeleteProvider', data); - return promise.then((data) => - MsgDeleteProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "DeleteProvider", data); + return promise.then((data) => MsgDeleteProviderResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/provider/v1beta3/query.ts b/ts/src/generated/akash/provider/v1beta3/query.ts index 7512a118..f996d72a 100644 --- a/ts/src/generated/akash/provider/v1beta3/query.ts +++ b/ts/src/generated/akash/provider/v1beta3/query.ts @@ -1,64 +1,51 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { - PageRequest, - PageResponse, -} from '../../../cosmos/base/query/v1beta1/pagination'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Provider } from './provider'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { PageRequest, PageResponse } from "../../../cosmos/base/query/v1beta1/pagination"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Provider } from "./provider"; /** QueryProvidersRequest is request type for the Query/Providers RPC method */ export interface QueryProvidersRequest { - $type: 'akash.provider.v1beta3.QueryProvidersRequest'; + $type: "akash.provider.v1beta3.QueryProvidersRequest"; pagination: PageRequest | undefined; } /** QueryProvidersResponse is response type for the Query/Providers RPC method */ export interface QueryProvidersResponse { - $type: 'akash.provider.v1beta3.QueryProvidersResponse'; + $type: "akash.provider.v1beta3.QueryProvidersResponse"; providers: Provider[]; pagination: PageResponse | undefined; } /** QueryProviderRequest is request type for the Query/Provider RPC method */ export interface QueryProviderRequest { - $type: 'akash.provider.v1beta3.QueryProviderRequest'; + $type: "akash.provider.v1beta3.QueryProviderRequest"; owner: string; } /** QueryProviderResponse is response type for the Query/Provider RPC method */ export interface QueryProviderResponse { - $type: 'akash.provider.v1beta3.QueryProviderResponse'; + $type: "akash.provider.v1beta3.QueryProviderResponse"; provider: Provider | undefined; } function createBaseQueryProvidersRequest(): QueryProvidersRequest { - return { - $type: 'akash.provider.v1beta3.QueryProvidersRequest', - pagination: undefined, - }; + return { $type: "akash.provider.v1beta3.QueryProvidersRequest", pagination: undefined }; } export const QueryProvidersRequest = { - $type: 'akash.provider.v1beta3.QueryProvidersRequest' as const, + $type: "akash.provider.v1beta3.QueryProvidersRequest" as const, - encode( - message: QueryProvidersRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.pagination !== undefined) { PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersRequest(); while (reader.pos < end) { @@ -83,9 +70,7 @@ export const QueryProvidersRequest = { fromJSON(object: any): QueryProvidersRequest { return { $type: QueryProvidersRequest.$type, - pagination: isSet(object.pagination) - ? PageRequest.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageRequest.fromJSON(object.pagination) : undefined, }; }, @@ -100,14 +85,11 @@ export const QueryProvidersRequest = { create(base?: DeepPartial): QueryProvidersRequest { return QueryProvidersRequest.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersRequest { + fromPartial(object: DeepPartial): QueryProvidersRequest { const message = createBaseQueryProvidersRequest(); - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageRequest.fromPartial(object.pagination) - : undefined; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageRequest.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -115,38 +97,24 @@ export const QueryProvidersRequest = { messageTypeRegistry.set(QueryProvidersRequest.$type, QueryProvidersRequest); function createBaseQueryProvidersResponse(): QueryProvidersResponse { - return { - $type: 'akash.provider.v1beta3.QueryProvidersResponse', - providers: [], - pagination: undefined, - }; + return { $type: "akash.provider.v1beta3.QueryProvidersResponse", providers: [], pagination: undefined }; } export const QueryProvidersResponse = { - $type: 'akash.provider.v1beta3.QueryProvidersResponse' as const, + $type: "akash.provider.v1beta3.QueryProvidersResponse" as const, - encode( - message: QueryProvidersResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProvidersResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.providers) { Provider.encode(v!, writer.uint32(10).fork()).ldelim(); } if (message.pagination !== undefined) { - PageResponse.encode( - message.pagination, - writer.uint32(18).fork(), - ).ldelim(); + PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProvidersResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProvidersResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProvidersResponse(); while (reader.pos < end) { @@ -181,9 +149,7 @@ export const QueryProvidersResponse = { providers: globalThis.Array.isArray(object?.providers) ? object.providers.map((e: any) => Provider.fromJSON(e)) : [], - pagination: isSet(object.pagination) - ? PageResponse.fromJSON(object.pagination) - : undefined, + pagination: isSet(object.pagination) ? PageResponse.fromJSON(object.pagination) : undefined, }; }, @@ -201,16 +167,12 @@ export const QueryProvidersResponse = { create(base?: DeepPartial): QueryProvidersResponse { return QueryProvidersResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProvidersResponse { + fromPartial(object: DeepPartial): QueryProvidersResponse { const message = createBaseQueryProvidersResponse(); - message.providers = - object.providers?.map((e) => Provider.fromPartial(e)) || []; - message.pagination = - object.pagination !== undefined && object.pagination !== null - ? PageResponse.fromPartial(object.pagination) - : undefined; + message.providers = object.providers?.map((e) => Provider.fromPartial(e)) || []; + message.pagination = (object.pagination !== undefined && object.pagination !== null) + ? PageResponse.fromPartial(object.pagination) + : undefined; return message; }, }; @@ -218,28 +180,21 @@ export const QueryProvidersResponse = { messageTypeRegistry.set(QueryProvidersResponse.$type, QueryProvidersResponse); function createBaseQueryProviderRequest(): QueryProviderRequest { - return { $type: 'akash.provider.v1beta3.QueryProviderRequest', owner: '' }; + return { $type: "akash.provider.v1beta3.QueryProviderRequest", owner: "" }; } export const QueryProviderRequest = { - $type: 'akash.provider.v1beta3.QueryProviderRequest' as const, + $type: "akash.provider.v1beta3.QueryProviderRequest" as const, - encode( - message: QueryProviderRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.owner !== '') { + encode(message: QueryProviderRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.owner !== "") { writer.uint32(10).string(message.owner); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderRequest { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderRequest(); while (reader.pos < end) { @@ -262,15 +217,12 @@ export const QueryProviderRequest = { }, fromJSON(object: any): QueryProviderRequest { - return { - $type: QueryProviderRequest.$type, - owner: isSet(object.owner) ? globalThis.String(object.owner) : '', - }; + return { $type: QueryProviderRequest.$type, owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; }, toJSON(message: QueryProviderRequest): unknown { const obj: any = {}; - if (message.owner !== '') { + if (message.owner !== "") { obj.owner = message.owner; } return obj; @@ -281,7 +233,7 @@ export const QueryProviderRequest = { }, fromPartial(object: DeepPartial): QueryProviderRequest { const message = createBaseQueryProviderRequest(); - message.owner = object.owner ?? ''; + message.owner = object.owner ?? ""; return message; }, }; @@ -289,31 +241,21 @@ export const QueryProviderRequest = { messageTypeRegistry.set(QueryProviderRequest.$type, QueryProviderRequest); function createBaseQueryProviderResponse(): QueryProviderResponse { - return { - $type: 'akash.provider.v1beta3.QueryProviderResponse', - provider: undefined, - }; + return { $type: "akash.provider.v1beta3.QueryProviderResponse", provider: undefined }; } export const QueryProviderResponse = { - $type: 'akash.provider.v1beta3.QueryProviderResponse' as const, + $type: "akash.provider.v1beta3.QueryProviderResponse" as const, - encode( - message: QueryProviderResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: QueryProviderResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.provider !== undefined) { Provider.encode(message.provider, writer.uint32(10).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): QueryProviderResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): QueryProviderResponse { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQueryProviderResponse(); while (reader.pos < end) { @@ -338,9 +280,7 @@ export const QueryProviderResponse = { fromJSON(object: any): QueryProviderResponse { return { $type: QueryProviderResponse.$type, - provider: isSet(object.provider) - ? Provider.fromJSON(object.provider) - : undefined, + provider: isSet(object.provider) ? Provider.fromJSON(object.provider) : undefined, }; }, @@ -355,14 +295,11 @@ export const QueryProviderResponse = { create(base?: DeepPartial): QueryProviderResponse { return QueryProviderResponse.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): QueryProviderResponse { + fromPartial(object: DeepPartial): QueryProviderResponse { const message = createBaseQueryProviderResponse(); - message.provider = - object.provider !== undefined && object.provider !== null - ? Provider.fromPartial(object.provider) - : undefined; + message.provider = (object.provider !== undefined && object.provider !== null) + ? Provider.fromPartial(object.provider) + : undefined; return message; }, }; @@ -377,7 +314,7 @@ export interface Query { Provider(request: QueryProviderRequest): Promise; } -export const QueryServiceName = 'akash.provider.v1beta3.Query'; +export const QueryServiceName = "akash.provider.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -389,49 +326,28 @@ export class QueryClientImpl implements Query { } Providers(request: QueryProvidersRequest): Promise { const data = QueryProvidersRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Providers', data); - return promise.then((data) => - QueryProvidersResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Providers", data); + return promise.then((data) => QueryProvidersResponse.decode(_m0.Reader.create(data))); } Provider(request: QueryProviderRequest): Promise { const data = QueryProviderRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, 'Provider', data); - return promise.then((data) => - QueryProviderResponse.decode(_m0.Reader.create(data)), - ); + const promise = this.rpc.request(this.service, "Provider", data); + return promise.then((data) => QueryProviderResponse.decode(_m0.Reader.create(data))); } } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/staking/v1beta3/genesis.ts b/ts/src/generated/akash/staking/v1beta3/genesis.ts index eafa9362..d1d69f14 100644 --- a/ts/src/generated/akash/staking/v1beta3/genesis.ts +++ b/ts/src/generated/akash/staking/v1beta3/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Params } from "./params"; /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.staking.v1beta3.GenesisState'; + $type: "akash.staking.v1beta3.GenesisState"; params: Params | undefined; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.staking.v1beta3.GenesisState', params: undefined }; + return { $type: "akash.staking.v1beta3.GenesisState", params: undefined }; } export const GenesisState = { - $type: 'akash.staking.v1beta3.GenesisState' as const, + $type: "akash.staking.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -52,10 +48,7 @@ export const GenesisState = { }, fromJSON(object: any): GenesisState { - return { - $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - }; + return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { @@ -71,36 +64,22 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/staking/v1beta3/params.ts b/ts/src/generated/akash/staking/v1beta3/params.ts index 6d84a87d..48877ad8 100644 --- a/ts/src/generated/akash/staking/v1beta3/params.ts +++ b/ts/src/generated/akash/staking/v1beta3/params.ts @@ -1,35 +1,31 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** Params extends the parameters for the x/staking module */ export interface Params { - $type: 'akash.staking.v1beta3.Params'; + $type: "akash.staking.v1beta3.Params"; /** min_commission_rate is the chain-wide minimum commission rate that a validator can charge their delegators */ minCommissionRate: string; } function createBaseParams(): Params { - return { $type: 'akash.staking.v1beta3.Params', minCommissionRate: '' }; + return { $type: "akash.staking.v1beta3.Params", minCommissionRate: "" }; } export const Params = { - $type: 'akash.staking.v1beta3.Params' as const, + $type: "akash.staking.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.minCommissionRate !== '') { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.minCommissionRate !== "") { writer.uint32(10).string(message.minCommissionRate); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -54,15 +50,13 @@ export const Params = { fromJSON(object: any): Params { return { $type: Params.$type, - minCommissionRate: isSet(object.minCommissionRate) - ? globalThis.String(object.minCommissionRate) - : '', + minCommissionRate: isSet(object.minCommissionRate) ? globalThis.String(object.minCommissionRate) : "", }; }, toJSON(message: Params): unknown { const obj: any = {}; - if (message.minCommissionRate !== '') { + if (message.minCommissionRate !== "") { obj.minCommissionRate = message.minCommissionRate; } return obj; @@ -73,33 +67,20 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.minCommissionRate = object.minCommissionRate ?? ''; + message.minCommissionRate = object.minCommissionRate ?? ""; return message; }, }; messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/take/v1beta3/genesis.ts b/ts/src/generated/akash/take/v1beta3/genesis.ts index 1d505416..664ecbff 100644 --- a/ts/src/generated/akash/take/v1beta3/genesis.ts +++ b/ts/src/generated/akash/take/v1beta3/genesis.ts @@ -1,26 +1,23 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; -import { Params } from './params'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; +import { Params } from "./params"; /** GenesisState stores slice of genesis deployment instance */ export interface GenesisState { - $type: 'akash.take.v1beta3.GenesisState'; + $type: "akash.take.v1beta3.GenesisState"; params: Params | undefined; } function createBaseGenesisState(): GenesisState { - return { $type: 'akash.take.v1beta3.GenesisState', params: undefined }; + return { $type: "akash.take.v1beta3.GenesisState", params: undefined }; } export const GenesisState = { - $type: 'akash.take.v1beta3.GenesisState' as const, + $type: "akash.take.v1beta3.GenesisState" as const, - encode( - message: GenesisState, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GenesisState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.params !== undefined) { Params.encode(message.params, writer.uint32(10).fork()).ldelim(); } @@ -28,8 +25,7 @@ export const GenesisState = { }, decode(input: _m0.Reader | Uint8Array, length?: number): GenesisState { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGenesisState(); while (reader.pos < end) { @@ -52,10 +48,7 @@ export const GenesisState = { }, fromJSON(object: any): GenesisState { - return { - $type: GenesisState.$type, - params: isSet(object.params) ? Params.fromJSON(object.params) : undefined, - }; + return { $type: GenesisState.$type, params: isSet(object.params) ? Params.fromJSON(object.params) : undefined }; }, toJSON(message: GenesisState): unknown { @@ -71,36 +64,22 @@ export const GenesisState = { }, fromPartial(object: DeepPartial): GenesisState { const message = createBaseGenesisState(); - message.params = - object.params !== undefined && object.params !== null - ? Params.fromPartial(object.params) - : undefined; + message.params = (object.params !== undefined && object.params !== null) + ? Params.fromPartial(object.params) + : undefined; return message; }, }; messageTypeRegistry.set(GenesisState.$type, GenesisState); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/take/v1beta3/params.ts b/ts/src/generated/akash/take/v1beta3/params.ts index 5af9548a..73e2987a 100644 --- a/ts/src/generated/akash/take/v1beta3/params.ts +++ b/ts/src/generated/akash/take/v1beta3/params.ts @@ -1,35 +1,32 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; /** DenomTakeRate describes take rate for specified denom */ export interface DenomTakeRate { - $type: 'akash.take.v1beta3.DenomTakeRate'; + $type: "akash.take.v1beta3.DenomTakeRate"; denom: string; rate: number; } /** Params defines the parameters for the x/take package */ export interface Params { - $type: 'akash.take.v1beta3.Params'; + $type: "akash.take.v1beta3.Params"; /** denom -> % take rate */ denomTakeRates: DenomTakeRate[]; defaultTakeRate: number; } function createBaseDenomTakeRate(): DenomTakeRate { - return { $type: 'akash.take.v1beta3.DenomTakeRate', denom: '', rate: 0 }; + return { $type: "akash.take.v1beta3.DenomTakeRate", denom: "", rate: 0 }; } export const DenomTakeRate = { - $type: 'akash.take.v1beta3.DenomTakeRate' as const, + $type: "akash.take.v1beta3.DenomTakeRate" as const, - encode( - message: DenomTakeRate, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.denom !== '') { + encode(message: DenomTakeRate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denom !== "") { writer.uint32(10).string(message.denom); } if (message.rate !== 0) { @@ -39,8 +36,7 @@ export const DenomTakeRate = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DenomTakeRate { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDenomTakeRate(); while (reader.pos < end) { @@ -72,14 +68,14 @@ export const DenomTakeRate = { fromJSON(object: any): DenomTakeRate { return { $type: DenomTakeRate.$type, - denom: isSet(object.denom) ? globalThis.String(object.denom) : '', + denom: isSet(object.denom) ? globalThis.String(object.denom) : "", rate: isSet(object.rate) ? globalThis.Number(object.rate) : 0, }; }, toJSON(message: DenomTakeRate): unknown { const obj: any = {}; - if (message.denom !== '') { + if (message.denom !== "") { obj.denom = message.denom; } if (message.rate !== 0) { @@ -93,7 +89,7 @@ export const DenomTakeRate = { }, fromPartial(object: DeepPartial): DenomTakeRate { const message = createBaseDenomTakeRate(); - message.denom = object.denom ?? ''; + message.denom = object.denom ?? ""; message.rate = object.rate ?? 0; return message; }, @@ -102,20 +98,13 @@ export const DenomTakeRate = { messageTypeRegistry.set(DenomTakeRate.$type, DenomTakeRate); function createBaseParams(): Params { - return { - $type: 'akash.take.v1beta3.Params', - denomTakeRates: [], - defaultTakeRate: 0, - }; + return { $type: "akash.take.v1beta3.Params", denomTakeRates: [], defaultTakeRate: 0 }; } export const Params = { - $type: 'akash.take.v1beta3.Params' as const, + $type: "akash.take.v1beta3.Params" as const, - encode( - message: Params, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.denomTakeRates) { DenomTakeRate.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -126,8 +115,7 @@ export const Params = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Params { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseParams(); while (reader.pos < end) { @@ -138,9 +126,7 @@ export const Params = { break; } - message.denomTakeRates.push( - DenomTakeRate.decode(reader, reader.uint32()), - ); + message.denomTakeRates.push(DenomTakeRate.decode(reader, reader.uint32())); continue; case 2: if (tag !== 16) { @@ -164,18 +150,14 @@ export const Params = { denomTakeRates: globalThis.Array.isArray(object?.denomTakeRates) ? object.denomTakeRates.map((e: any) => DenomTakeRate.fromJSON(e)) : [], - defaultTakeRate: isSet(object.defaultTakeRate) - ? globalThis.Number(object.defaultTakeRate) - : 0, + defaultTakeRate: isSet(object.defaultTakeRate) ? globalThis.Number(object.defaultTakeRate) : 0, }; }, toJSON(message: Params): unknown { const obj: any = {}; if (message.denomTakeRates?.length) { - obj.denomTakeRates = message.denomTakeRates.map((e) => - DenomTakeRate.toJSON(e), - ); + obj.denomTakeRates = message.denomTakeRates.map((e) => DenomTakeRate.toJSON(e)); } if (message.defaultTakeRate !== 0) { obj.defaultTakeRate = Math.round(message.defaultTakeRate); @@ -188,8 +170,7 @@ export const Params = { }, fromPartial(object: DeepPartial): Params { const message = createBaseParams(); - message.denomTakeRates = - object.denomTakeRates?.map((e) => DenomTakeRate.fromPartial(e)) || []; + message.denomTakeRates = object.denomTakeRates?.map((e) => DenomTakeRate.fromPartial(e)) || []; message.defaultTakeRate = object.defaultTakeRate ?? 0; return message; }, @@ -197,26 +178,13 @@ export const Params = { messageTypeRegistry.set(Params.$type, Params); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/akash/take/v1beta3/query.ts b/ts/src/generated/akash/take/v1beta3/query.ts index 898ef92f..daa51ad3 100644 --- a/ts/src/generated/akash/take/v1beta3/query.ts +++ b/ts/src/generated/akash/take/v1beta3/query.ts @@ -1,9 +1,10 @@ /* eslint-disable */ /** Query defines the gRPC querier service */ -export interface Query {} +export interface Query { +} -export const QueryServiceName = 'akash.take.v1beta3.Query'; +export const QueryServiceName = "akash.take.v1beta3.Query"; export class QueryClientImpl implements Query { private readonly rpc: Rpc; private readonly service: string; @@ -14,9 +15,5 @@ export class QueryClientImpl implements Query { } interface Rpc { - request( - service: string, - method: string, - data: Uint8Array, - ): Promise; + request(service: string, method: string, data: Uint8Array): Promise; } diff --git a/ts/src/generated/cosmos/base/query/v1beta1/pagination.ts b/ts/src/generated/cosmos/base/query/v1beta1/pagination.ts index ad06a7a6..27c3f764 100644 --- a/ts/src/generated/cosmos/base/query/v1beta1/pagination.ts +++ b/ts/src/generated/cosmos/base/query/v1beta1/pagination.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../../typeRegistry"; /** * PageRequest is to be embedded in gRPC request messages for efficient @@ -13,7 +13,7 @@ import { messageTypeRegistry } from '../../../../typeRegistry'; * } */ export interface PageRequest { - $type: 'cosmos.base.query.v1beta1.PageRequest'; + $type: "cosmos.base.query.v1beta1.PageRequest"; /** * key is a value returned in PageResponse.next_key to begin * querying the next page most efficiently. Only one of offset or key @@ -56,7 +56,7 @@ export interface PageRequest { * } */ export interface PageResponse { - $type: 'cosmos.base.query.v1beta1.PageResponse'; + $type: "cosmos.base.query.v1beta1.PageResponse"; /** * next_key is the key to be passed to PageRequest.key to * query the next page most efficiently @@ -71,7 +71,7 @@ export interface PageResponse { function createBasePageRequest(): PageRequest { return { - $type: 'cosmos.base.query.v1beta1.PageRequest', + $type: "cosmos.base.query.v1beta1.PageRequest", key: new Uint8Array(0), offset: Long.UZERO, limit: Long.UZERO, @@ -81,12 +81,9 @@ function createBasePageRequest(): PageRequest { } export const PageRequest = { - $type: 'cosmos.base.query.v1beta1.PageRequest' as const, + $type: "cosmos.base.query.v1beta1.PageRequest" as const, - encode( - message: PageRequest, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: PageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.key.length !== 0) { writer.uint32(10).bytes(message.key); } @@ -106,8 +103,7 @@ export const PageRequest = { }, decode(input: _m0.Reader | Uint8Array, length?: number): PageRequest { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePageRequest(); while (reader.pos < end) { @@ -163,12 +159,8 @@ export const PageRequest = { key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0), offset: isSet(object.offset) ? Long.fromValue(object.offset) : Long.UZERO, limit: isSet(object.limit) ? Long.fromValue(object.limit) : Long.UZERO, - countTotal: isSet(object.countTotal) - ? globalThis.Boolean(object.countTotal) - : false, - reverse: isSet(object.reverse) - ? globalThis.Boolean(object.reverse) - : false, + countTotal: isSet(object.countTotal) ? globalThis.Boolean(object.countTotal) : false, + reverse: isSet(object.reverse) ? globalThis.Boolean(object.reverse) : false, }; }, @@ -198,14 +190,10 @@ export const PageRequest = { fromPartial(object: DeepPartial): PageRequest { const message = createBasePageRequest(); message.key = object.key ?? new Uint8Array(0); - message.offset = - object.offset !== undefined && object.offset !== null - ? Long.fromValue(object.offset) - : Long.UZERO; - message.limit = - object.limit !== undefined && object.limit !== null - ? Long.fromValue(object.limit) - : Long.UZERO; + message.offset = (object.offset !== undefined && object.offset !== null) + ? Long.fromValue(object.offset) + : Long.UZERO; + message.limit = (object.limit !== undefined && object.limit !== null) ? Long.fromValue(object.limit) : Long.UZERO; message.countTotal = object.countTotal ?? false; message.reverse = object.reverse ?? false; return message; @@ -215,20 +203,13 @@ export const PageRequest = { messageTypeRegistry.set(PageRequest.$type, PageRequest); function createBasePageResponse(): PageResponse { - return { - $type: 'cosmos.base.query.v1beta1.PageResponse', - nextKey: new Uint8Array(0), - total: Long.UZERO, - }; + return { $type: "cosmos.base.query.v1beta1.PageResponse", nextKey: new Uint8Array(0), total: Long.UZERO }; } export const PageResponse = { - $type: 'cosmos.base.query.v1beta1.PageResponse' as const, + $type: "cosmos.base.query.v1beta1.PageResponse" as const, - encode( - message: PageResponse, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: PageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.nextKey.length !== 0) { writer.uint32(10).bytes(message.nextKey); } @@ -239,8 +220,7 @@ export const PageResponse = { }, decode(input: _m0.Reader | Uint8Array, length?: number): PageResponse { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBasePageResponse(); while (reader.pos < end) { @@ -272,9 +252,7 @@ export const PageResponse = { fromJSON(object: any): PageResponse { return { $type: PageResponse.$type, - nextKey: isSet(object.nextKey) - ? bytesFromBase64(object.nextKey) - : new Uint8Array(0), + nextKey: isSet(object.nextKey) ? bytesFromBase64(object.nextKey) : new Uint8Array(0), total: isSet(object.total) ? Long.fromValue(object.total) : Long.UZERO, }; }, @@ -296,10 +274,7 @@ export const PageResponse = { fromPartial(object: DeepPartial): PageResponse { const message = createBasePageResponse(); message.nextKey = object.nextKey ?? new Uint8Array(0); - message.total = - object.total !== undefined && object.total !== null - ? Long.fromValue(object.total) - : Long.UZERO; + message.total = (object.total !== undefined && object.total !== null) ? Long.fromValue(object.total) : Long.UZERO; return message; }, }; @@ -308,7 +283,7 @@ messageTypeRegistry.set(PageResponse.$type, PageResponse); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -321,36 +296,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/cosmos/base/v1beta1/coin.original.ts b/ts/src/generated/cosmos/base/v1beta1/coin.original.ts deleted file mode 100644 index de5e1a8c..00000000 --- a/ts/src/generated/cosmos/base/v1beta1/coin.original.ts +++ /dev/null @@ -1,369 +0,0 @@ -/* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../typeRegistry'; - -/** - * Coin defines a token with a denomination and an amount. - * - * NOTE: The amount field is an Int which implements the custom method - * signatures required by gogoproto. - */ -export interface Coin { - $type: 'cosmos.base.v1beta1.Coin'; - denom: string; - amount: string; -} - -/** - * DecCoin defines a token with a denomination and a decimal amount. - * - * NOTE: The amount field is an Dec which implements the custom method - * signatures required by gogoproto. - */ -export interface DecCoin { - $type: 'cosmos.base.v1beta1.DecCoin'; - denom: string; - amount: string; -} - -/** IntProto defines a Protobuf wrapper around an Int object. */ -export interface IntProto { - $type: 'cosmos.base.v1beta1.IntProto'; - int: string; -} - -/** DecProto defines a Protobuf wrapper around a Dec object. */ -export interface DecProto { - $type: 'cosmos.base.v1beta1.DecProto'; - dec: string; -} - -function createBaseCoin(): Coin { - return { $type: 'cosmos.base.v1beta1.Coin', denom: '', amount: '' }; -} - -export const Coin = { - $type: 'cosmos.base.v1beta1.Coin' as const, - - encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { - if (message.denom !== '') { - writer.uint32(10).string(message.denom); - } - if (message.amount !== '') { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): Coin { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCoin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.denom = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.amount = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): Coin { - return { - $type: Coin.$type, - denom: isSet(object.denom) ? globalThis.String(object.denom) : '', - amount: isSet(object.amount) ? globalThis.String(object.amount) : '', - }; - }, - - toJSON(message: Coin): unknown { - const obj: any = {}; - if (message.denom !== '') { - obj.denom = message.denom; - } - if (message.amount !== '') { - obj.amount = message.amount; - } - return obj; - }, - - create(base?: DeepPartial): Coin { - return Coin.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): Coin { - const message = createBaseCoin(); - message.denom = object.denom ?? ''; - message.amount = object.amount ?? ''; - return message; - }, -}; - -messageTypeRegistry.set(Coin.$type, Coin); - -function createBaseDecCoin(): DecCoin { - return { $type: 'cosmos.base.v1beta1.DecCoin', denom: '', amount: '' }; -} - -export const DecCoin = { - $type: 'cosmos.base.v1beta1.DecCoin' as const, - - encode( - message: DecCoin, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.denom !== '') { - writer.uint32(10).string(message.denom); - } - if (message.amount !== '') { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecCoin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.denom = reader.string(); - continue; - case 2: - if (tag !== 18) { - break; - } - - message.amount = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DecCoin { - return { - $type: DecCoin.$type, - denom: isSet(object.denom) ? globalThis.String(object.denom) : '', - amount: isSet(object.amount) ? globalThis.String(object.amount) : '', - }; - }, - - toJSON(message: DecCoin): unknown { - const obj: any = {}; - if (message.denom !== '') { - obj.denom = message.denom; - } - if (message.amount !== '') { - obj.amount = message.amount; - } - return obj; - }, - - create(base?: DeepPartial): DecCoin { - return DecCoin.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DecCoin { - const message = createBaseDecCoin(); - message.denom = object.denom ?? ''; - message.amount = object.amount ?? ''; - return message; - }, -}; - -messageTypeRegistry.set(DecCoin.$type, DecCoin); - -function createBaseIntProto(): IntProto { - return { $type: 'cosmos.base.v1beta1.IntProto', int: '' }; -} - -export const IntProto = { - $type: 'cosmos.base.v1beta1.IntProto' as const, - - encode( - message: IntProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.int !== '') { - writer.uint32(10).string(message.int); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): IntProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseIntProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.int = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): IntProto { - return { - $type: IntProto.$type, - int: isSet(object.int) ? globalThis.String(object.int) : '', - }; - }, - - toJSON(message: IntProto): unknown { - const obj: any = {}; - if (message.int !== '') { - obj.int = message.int; - } - return obj; - }, - - create(base?: DeepPartial): IntProto { - return IntProto.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): IntProto { - const message = createBaseIntProto(); - message.int = object.int ?? ''; - return message; - }, -}; - -messageTypeRegistry.set(IntProto.$type, IntProto); - -function createBaseDecProto(): DecProto { - return { $type: 'cosmos.base.v1beta1.DecProto', dec: '' }; -} - -export const DecProto = { - $type: 'cosmos.base.v1beta1.DecProto' as const, - - encode( - message: DecProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.dec !== '') { - writer.uint32(10).string(message.dec); - } - return writer; - }, - - decode(input: _m0.Reader | Uint8Array, length?: number): DecProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseDecProto(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: - if (tag !== 10) { - break; - } - - message.dec = reader.string(); - continue; - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skipType(tag & 7); - } - return message; - }, - - fromJSON(object: any): DecProto { - return { - $type: DecProto.$type, - dec: isSet(object.dec) ? globalThis.String(object.dec) : '', - }; - }, - - toJSON(message: DecProto): unknown { - const obj: any = {}; - if (message.dec !== '') { - obj.dec = message.dec; - } - return obj; - }, - - create(base?: DeepPartial): DecProto { - return DecProto.fromPartial(base ?? {}); - }, - fromPartial(object: DeepPartial): DecProto { - const message = createBaseDecProto(); - message.dec = object.dec ?? ''; - return message; - }, -}; - -messageTypeRegistry.set(DecProto.$type, DecProto); - -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; - -if (_m0.util.Long !== Long) { - _m0.util.Long = Long as any; - _m0.configure(); -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} diff --git a/ts/src/generated/cosmos/base/v1beta1/coin.ts b/ts/src/generated/cosmos/base/v1beta1/coin.ts index 6cfccce8..f6491d9a 100644 --- a/ts/src/generated/cosmos/base/v1beta1/coin.ts +++ b/ts/src/generated/cosmos/base/v1beta1/coin.ts @@ -1 +1,337 @@ -export * from '../../../../patch/cosmos/base/v1beta1/coin'; +/* eslint-disable */ +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../typeRegistry"; + +/** + * Coin defines a token with a denomination and an amount. + * + * NOTE: The amount field is an Int which implements the custom method + * signatures required by gogoproto. + */ +export interface Coin { + $type: "cosmos.base.v1beta1.Coin"; + denom: string; + amount: string; +} + +/** + * DecCoin defines a token with a denomination and a decimal amount. + * + * NOTE: The amount field is an Dec which implements the custom method + * signatures required by gogoproto. + */ +export interface DecCoin { + $type: "cosmos.base.v1beta1.DecCoin"; + denom: string; + amount: string; +} + +/** IntProto defines a Protobuf wrapper around an Int object. */ +export interface IntProto { + $type: "cosmos.base.v1beta1.IntProto"; + int: string; +} + +/** DecProto defines a Protobuf wrapper around a Dec object. */ +export interface DecProto { + $type: "cosmos.base.v1beta1.DecProto"; + dec: string; +} + +function createBaseCoin(): Coin { + return { $type: "cosmos.base.v1beta1.Coin", denom: "", amount: "" }; +} + +export const Coin = { + $type: "cosmos.base.v1beta1.Coin" as const, + + encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denom !== "") { + writer.uint32(10).string(message.denom); + } + if (message.amount !== "") { + writer.uint32(18).string(message.amount); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): Coin { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseCoin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.denom = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.amount = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): Coin { + return { + $type: Coin.$type, + denom: isSet(object.denom) ? globalThis.String(object.denom) : "", + amount: isSet(object.amount) ? globalThis.String(object.amount) : "", + }; + }, + + toJSON(message: Coin): unknown { + const obj: any = {}; + if (message.denom !== "") { + obj.denom = message.denom; + } + if (message.amount !== "") { + obj.amount = message.amount; + } + return obj; + }, + + create(base?: DeepPartial): Coin { + return Coin.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): Coin { + const message = createBaseCoin(); + message.denom = object.denom ?? ""; + message.amount = object.amount ?? ""; + return message; + }, +}; + +messageTypeRegistry.set(Coin.$type, Coin); + +function createBaseDecCoin(): DecCoin { + return { $type: "cosmos.base.v1beta1.DecCoin", denom: "", amount: "" }; +} + +export const DecCoin = { + $type: "cosmos.base.v1beta1.DecCoin" as const, + + encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.denom !== "") { + writer.uint32(10).string(message.denom); + } + if (message.amount !== "") { + writer.uint32(18).string(message.amount); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DecCoin { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDecCoin(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.denom = reader.string(); + continue; + case 2: + if (tag !== 18) { + break; + } + + message.amount = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DecCoin { + return { + $type: DecCoin.$type, + denom: isSet(object.denom) ? globalThis.String(object.denom) : "", + amount: isSet(object.amount) ? globalThis.String(object.amount) : "", + }; + }, + + toJSON(message: DecCoin): unknown { + const obj: any = {}; + if (message.denom !== "") { + obj.denom = message.denom; + } + if (message.amount !== "") { + obj.amount = message.amount; + } + return obj; + }, + + create(base?: DeepPartial): DecCoin { + return DecCoin.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DecCoin { + const message = createBaseDecCoin(); + message.denom = object.denom ?? ""; + message.amount = object.amount ?? ""; + return message; + }, +}; + +messageTypeRegistry.set(DecCoin.$type, DecCoin); + +function createBaseIntProto(): IntProto { + return { $type: "cosmos.base.v1beta1.IntProto", int: "" }; +} + +export const IntProto = { + $type: "cosmos.base.v1beta1.IntProto" as const, + + encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.int !== "") { + writer.uint32(10).string(message.int); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): IntProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseIntProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.int = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): IntProto { + return { $type: IntProto.$type, int: isSet(object.int) ? globalThis.String(object.int) : "" }; + }, + + toJSON(message: IntProto): unknown { + const obj: any = {}; + if (message.int !== "") { + obj.int = message.int; + } + return obj; + }, + + create(base?: DeepPartial): IntProto { + return IntProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): IntProto { + const message = createBaseIntProto(); + message.int = object.int ?? ""; + return message; + }, +}; + +messageTypeRegistry.set(IntProto.$type, IntProto); + +function createBaseDecProto(): DecProto { + return { $type: "cosmos.base.v1beta1.DecProto", dec: "" }; +} + +export const DecProto = { + $type: "cosmos.base.v1beta1.DecProto" as const, + + encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.dec !== "") { + writer.uint32(10).string(message.dec); + } + return writer; + }, + + decode(input: _m0.Reader | Uint8Array, length?: number): DecProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); + let end = length === undefined ? reader.len : reader.pos + length; + const message = createBaseDecProto(); + while (reader.pos < end) { + const tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (tag !== 10) { + break; + } + + message.dec = reader.string(); + continue; + } + if ((tag & 7) === 4 || tag === 0) { + break; + } + reader.skipType(tag & 7); + } + return message; + }, + + fromJSON(object: any): DecProto { + return { $type: DecProto.$type, dec: isSet(object.dec) ? globalThis.String(object.dec) : "" }; + }, + + toJSON(message: DecProto): unknown { + const obj: any = {}; + if (message.dec !== "") { + obj.dec = message.dec; + } + return obj; + }, + + create(base?: DeepPartial): DecProto { + return DecProto.fromPartial(base ?? {}); + }, + fromPartial(object: DeepPartial): DecProto { + const message = createBaseDecProto(); + message.dec = object.dec ?? ""; + return message; + }, +}; + +messageTypeRegistry.set(DecProto.$type, DecProto); + +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; + +if (_m0.util.Long !== Long) { + _m0.util.Long = Long as any; + _m0.configure(); +} + +function isSet(value: any): boolean { + return value !== null && value !== undefined; +} diff --git a/ts/src/generated/google/api/http.ts b/ts/src/generated/google/api/http.ts index 7c2d04aa..2bd58125 100644 --- a/ts/src/generated/google/api/http.ts +++ b/ts/src/generated/google/api/http.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../typeRegistry"; /** * Defines the HTTP configuration for an API service. It contains a list of @@ -9,7 +9,7 @@ import { messageTypeRegistry } from '../../typeRegistry'; * to one or more HTTP REST API methods. */ export interface Http { - $type: 'google.api.Http'; + $type: "google.api.Http"; /** * A list of HTTP configuration rules that apply to individual API methods. * @@ -240,7 +240,7 @@ export interface Http { * repeated fields or map fields. */ export interface HttpRule { - $type: 'google.api.HttpRule'; + $type: "google.api.HttpRule"; /** * Selects methods to which this rule applies. * @@ -248,22 +248,34 @@ export interface HttpRule { */ selector: string; /** Used for listing and getting information about resources. */ - get?: string | undefined; + get?: + | string + | undefined; /** Used for updating a resource. */ - put?: string | undefined; + put?: + | string + | undefined; /** Used for creating a resource. */ - post?: string | undefined; + post?: + | string + | undefined; /** Used for deleting a resource. */ - delete?: string | undefined; + delete?: + | string + | undefined; /** Used for updating a resource. */ - patch?: string | undefined; + patch?: + | string + | undefined; /** * The custom pattern is used for specifying an HTTP method that is not * included in the `pattern` field, such as HEAD, or "*" to leave the * HTTP method unspecified for this rule. The wild-card rule is useful * for services that provide content to Web (HTML) clients. */ - custom?: CustomHttpPattern | undefined; + custom?: + | CustomHttpPattern + | undefined; /** * The name of the request field whose value is mapped to the HTTP body, or * `*` for mapping all fields not captured by the path pattern to the HTTP @@ -287,7 +299,7 @@ export interface HttpRule { /** A custom pattern is used for defining custom HTTP verb. */ export interface CustomHttpPattern { - $type: 'google.api.CustomHttpPattern'; + $type: "google.api.CustomHttpPattern"; /** The name of this custom HTTP verb. */ kind: string; /** The path matched by this custom verb. */ @@ -295,15 +307,11 @@ export interface CustomHttpPattern { } function createBaseHttp(): Http { - return { - $type: 'google.api.Http', - rules: [], - fullyDecodeReservedExpansion: false, - }; + return { $type: "google.api.Http", rules: [], fullyDecodeReservedExpansion: false }; } export const Http = { - $type: 'google.api.Http' as const, + $type: "google.api.Http" as const, encode(message: Http, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.rules) { @@ -316,8 +324,7 @@ export const Http = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Http { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHttp(); while (reader.pos < end) { @@ -349,9 +356,7 @@ export const Http = { fromJSON(object: any): Http { return { $type: Http.$type, - rules: globalThis.Array.isArray(object?.rules) - ? object.rules.map((e: any) => HttpRule.fromJSON(e)) - : [], + rules: globalThis.Array.isArray(object?.rules) ? object.rules.map((e: any) => HttpRule.fromJSON(e)) : [], fullyDecodeReservedExpansion: isSet(object.fullyDecodeReservedExpansion) ? globalThis.Boolean(object.fullyDecodeReservedExpansion) : false, @@ -375,8 +380,7 @@ export const Http = { fromPartial(object: DeepPartial): Http { const message = createBaseHttp(); message.rules = object.rules?.map((e) => HttpRule.fromPartial(e)) || []; - message.fullyDecodeReservedExpansion = - object.fullyDecodeReservedExpansion ?? false; + message.fullyDecodeReservedExpansion = object.fullyDecodeReservedExpansion ?? false; return message; }, }; @@ -385,28 +389,25 @@ messageTypeRegistry.set(Http.$type, Http); function createBaseHttpRule(): HttpRule { return { - $type: 'google.api.HttpRule', - selector: '', + $type: "google.api.HttpRule", + selector: "", get: undefined, put: undefined, post: undefined, delete: undefined, patch: undefined, custom: undefined, - body: '', - responseBody: '', + body: "", + responseBody: "", additionalBindings: [], }; } export const HttpRule = { - $type: 'google.api.HttpRule' as const, + $type: "google.api.HttpRule" as const, - encode( - message: HttpRule, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.selector !== '') { + encode(message: HttpRule, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.selector !== "") { writer.uint32(10).string(message.selector); } if (message.get !== undefined) { @@ -425,15 +426,12 @@ export const HttpRule = { writer.uint32(50).string(message.patch); } if (message.custom !== undefined) { - CustomHttpPattern.encode( - message.custom, - writer.uint32(66).fork(), - ).ldelim(); + CustomHttpPattern.encode(message.custom, writer.uint32(66).fork()).ldelim(); } - if (message.body !== '') { + if (message.body !== "") { writer.uint32(58).string(message.body); } - if (message.responseBody !== '') { + if (message.responseBody !== "") { writer.uint32(98).string(message.responseBody); } for (const v of message.additionalBindings) { @@ -443,8 +441,7 @@ export const HttpRule = { }, decode(input: _m0.Reader | Uint8Array, length?: number): HttpRule { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseHttpRule(); while (reader.pos < end) { @@ -518,9 +515,7 @@ export const HttpRule = { break; } - message.additionalBindings.push( - HttpRule.decode(reader, reader.uint32()), - ); + message.additionalBindings.push(HttpRule.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -534,23 +529,15 @@ export const HttpRule = { fromJSON(object: any): HttpRule { return { $type: HttpRule.$type, - selector: isSet(object.selector) - ? globalThis.String(object.selector) - : '', + selector: isSet(object.selector) ? globalThis.String(object.selector) : "", get: isSet(object.get) ? globalThis.String(object.get) : undefined, put: isSet(object.put) ? globalThis.String(object.put) : undefined, post: isSet(object.post) ? globalThis.String(object.post) : undefined, - delete: isSet(object.delete) - ? globalThis.String(object.delete) - : undefined, + delete: isSet(object.delete) ? globalThis.String(object.delete) : undefined, patch: isSet(object.patch) ? globalThis.String(object.patch) : undefined, - custom: isSet(object.custom) - ? CustomHttpPattern.fromJSON(object.custom) - : undefined, - body: isSet(object.body) ? globalThis.String(object.body) : '', - responseBody: isSet(object.responseBody) - ? globalThis.String(object.responseBody) - : '', + custom: isSet(object.custom) ? CustomHttpPattern.fromJSON(object.custom) : undefined, + body: isSet(object.body) ? globalThis.String(object.body) : "", + responseBody: isSet(object.responseBody) ? globalThis.String(object.responseBody) : "", additionalBindings: globalThis.Array.isArray(object?.additionalBindings) ? object.additionalBindings.map((e: any) => HttpRule.fromJSON(e)) : [], @@ -559,7 +546,7 @@ export const HttpRule = { toJSON(message: HttpRule): unknown { const obj: any = {}; - if (message.selector !== '') { + if (message.selector !== "") { obj.selector = message.selector; } if (message.get !== undefined) { @@ -580,16 +567,14 @@ export const HttpRule = { if (message.custom !== undefined) { obj.custom = CustomHttpPattern.toJSON(message.custom); } - if (message.body !== '') { + if (message.body !== "") { obj.body = message.body; } - if (message.responseBody !== '') { + if (message.responseBody !== "") { obj.responseBody = message.responseBody; } if (message.additionalBindings?.length) { - obj.additionalBindings = message.additionalBindings.map((e) => - HttpRule.toJSON(e), - ); + obj.additionalBindings = message.additionalBindings.map((e) => HttpRule.toJSON(e)); } return obj; }, @@ -599,20 +584,18 @@ export const HttpRule = { }, fromPartial(object: DeepPartial): HttpRule { const message = createBaseHttpRule(); - message.selector = object.selector ?? ''; + message.selector = object.selector ?? ""; message.get = object.get ?? undefined; message.put = object.put ?? undefined; message.post = object.post ?? undefined; message.delete = object.delete ?? undefined; message.patch = object.patch ?? undefined; - message.custom = - object.custom !== undefined && object.custom !== null - ? CustomHttpPattern.fromPartial(object.custom) - : undefined; - message.body = object.body ?? ''; - message.responseBody = object.responseBody ?? ''; - message.additionalBindings = - object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || []; + message.custom = (object.custom !== undefined && object.custom !== null) + ? CustomHttpPattern.fromPartial(object.custom) + : undefined; + message.body = object.body ?? ""; + message.responseBody = object.responseBody ?? ""; + message.additionalBindings = object.additionalBindings?.map((e) => HttpRule.fromPartial(e)) || []; return message; }, }; @@ -620,28 +603,24 @@ export const HttpRule = { messageTypeRegistry.set(HttpRule.$type, HttpRule); function createBaseCustomHttpPattern(): CustomHttpPattern { - return { $type: 'google.api.CustomHttpPattern', kind: '', path: '' }; + return { $type: "google.api.CustomHttpPattern", kind: "", path: "" }; } export const CustomHttpPattern = { - $type: 'google.api.CustomHttpPattern' as const, + $type: "google.api.CustomHttpPattern" as const, - encode( - message: CustomHttpPattern, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.kind !== '') { + encode(message: CustomHttpPattern, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.kind !== "") { writer.uint32(10).string(message.kind); } - if (message.path !== '') { + if (message.path !== "") { writer.uint32(18).string(message.path); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): CustomHttpPattern { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseCustomHttpPattern(); while (reader.pos < end) { @@ -673,17 +652,17 @@ export const CustomHttpPattern = { fromJSON(object: any): CustomHttpPattern { return { $type: CustomHttpPattern.$type, - kind: isSet(object.kind) ? globalThis.String(object.kind) : '', - path: isSet(object.path) ? globalThis.String(object.path) : '', + kind: isSet(object.kind) ? globalThis.String(object.kind) : "", + path: isSet(object.path) ? globalThis.String(object.path) : "", }; }, toJSON(message: CustomHttpPattern): unknown { const obj: any = {}; - if (message.kind !== '') { + if (message.kind !== "") { obj.kind = message.kind; } - if (message.path !== '') { + if (message.path !== "") { obj.path = message.path; } return obj; @@ -694,34 +673,21 @@ export const CustomHttpPattern = { }, fromPartial(object: DeepPartial): CustomHttpPattern { const message = createBaseCustomHttpPattern(); - message.kind = object.kind ?? ''; - message.path = object.path ?? ''; + message.kind = object.kind ?? ""; + message.path = object.path ?? ""; return message; }, }; messageTypeRegistry.set(CustomHttpPattern.$type, CustomHttpPattern); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/google/protobuf/descriptor.ts b/ts/src/generated/google/protobuf/descriptor.ts index 18fac7f5..a5f1cc3b 100644 --- a/ts/src/generated/google/protobuf/descriptor.ts +++ b/ts/src/generated/google/protobuf/descriptor.ts @@ -1,24 +1,28 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../typeRegistry"; /** * The protocol compiler can output a FileDescriptorSet containing the .proto * files it parses. */ export interface FileDescriptorSet { - $type: 'google.protobuf.FileDescriptorSet'; + $type: "google.protobuf.FileDescriptorSet"; file: FileDescriptorProto[]; } /** Describes a complete .proto file. */ export interface FileDescriptorProto { - $type: 'google.protobuf.FileDescriptorProto'; + $type: "google.protobuf.FileDescriptorProto"; /** file name, relative to root of source tree */ - name?: string | undefined; + name?: + | string + | undefined; /** e.g. "foo", "foo.bar", etc. */ - package?: string | undefined; + package?: + | string + | undefined; /** Names of files imported by this file. */ dependency: string[]; /** Indexes of the public imported files in the dependency list above. */ @@ -33,14 +37,18 @@ export interface FileDescriptorProto { enumType: EnumDescriptorProto[]; service: ServiceDescriptorProto[]; extension: FieldDescriptorProto[]; - options?: FileOptions | undefined; + options?: + | FileOptions + | undefined; /** * This field contains optional information about the original source code. * You may safely remove this entire field without harming runtime * functionality of the descriptors -- the information is needed only by * development tools. */ - sourceCodeInfo?: SourceCodeInfo | undefined; + sourceCodeInfo?: + | SourceCodeInfo + | undefined; /** * The syntax of the proto file. * The supported values are "proto2" and "proto3". @@ -50,7 +58,7 @@ export interface FileDescriptorProto { /** Describes a message type. */ export interface DescriptorProto { - $type: 'google.protobuf.DescriptorProto'; + $type: "google.protobuf.DescriptorProto"; name?: string | undefined; field: FieldDescriptorProto[]; extension: FieldDescriptorProto[]; @@ -68,9 +76,11 @@ export interface DescriptorProto { } export interface DescriptorProto_ExtensionRange { - $type: 'google.protobuf.DescriptorProto.ExtensionRange'; + $type: "google.protobuf.DescriptorProto.ExtensionRange"; /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Exclusive. */ end?: number | undefined; options?: ExtensionRangeOptions | undefined; @@ -82,30 +92,36 @@ export interface DescriptorProto_ExtensionRange { * not overlap. */ export interface DescriptorProto_ReservedRange { - $type: 'google.protobuf.DescriptorProto.ReservedRange'; + $type: "google.protobuf.DescriptorProto.ReservedRange"; /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Exclusive. */ end?: number | undefined; } export interface ExtensionRangeOptions { - $type: 'google.protobuf.ExtensionRangeOptions'; + $type: "google.protobuf.ExtensionRangeOptions"; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } /** Describes a field within a message. */ export interface FieldDescriptorProto { - $type: 'google.protobuf.FieldDescriptorProto'; + $type: "google.protobuf.FieldDescriptorProto"; name?: string | undefined; number?: number | undefined; - label?: FieldDescriptorProto_Label | undefined; + label?: + | FieldDescriptorProto_Label + | undefined; /** * If type_name is set, this need not be set. If both this and type_name * are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. */ - type?: FieldDescriptorProto_Type | undefined; + type?: + | FieldDescriptorProto_Type + | undefined; /** * For message and enum types, this is the name of the type. If the name * starts with a '.', it is fully-qualified. Otherwise, C++-like scoping @@ -113,24 +129,32 @@ export interface FieldDescriptorProto { * message are searched, then within the parent, on up to the root * namespace). */ - typeName?: string | undefined; + typeName?: + | string + | undefined; /** * For extensions, this is the name of the type being extended. It is * resolved in the same manner as type_name. */ - extendee?: string | undefined; + extendee?: + | string + | undefined; /** * For numeric types, contains the original text representation of the value. * For booleans, "true" or "false". * For strings, contains the default text contents (not escaped in any way). * For bytes, contains the C escaped value. All bytes >= 128 are escaped. */ - defaultValue?: string | undefined; + defaultValue?: + | string + | undefined; /** * If set, gives the index of a oneof in the containing type's oneof_decl * list. This field is a member of that oneof. */ - oneofIndex?: number | undefined; + oneofIndex?: + | number + | undefined; /** * JSON name of this field. The value is set by protocol compiler. If the * user has set a "json_name" option on this field, that option's value @@ -138,7 +162,9 @@ export interface FieldDescriptorProto { * it to camelCase. */ jsonName?: string | undefined; - options?: FieldOptions | undefined; + options?: + | FieldOptions + | undefined; /** * If true, this is a proto3 "optional". When a proto3 field is optional, it * tracks presence regardless of field type. @@ -209,114 +235,110 @@ export enum FieldDescriptorProto_Type { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_TypeFromJSON( - object: any, -): FieldDescriptorProto_Type { +export function fieldDescriptorProto_TypeFromJSON(object: any): FieldDescriptorProto_Type { switch (object) { case 1: - case 'TYPE_DOUBLE': + case "TYPE_DOUBLE": return FieldDescriptorProto_Type.TYPE_DOUBLE; case 2: - case 'TYPE_FLOAT': + case "TYPE_FLOAT": return FieldDescriptorProto_Type.TYPE_FLOAT; case 3: - case 'TYPE_INT64': + case "TYPE_INT64": return FieldDescriptorProto_Type.TYPE_INT64; case 4: - case 'TYPE_UINT64': + case "TYPE_UINT64": return FieldDescriptorProto_Type.TYPE_UINT64; case 5: - case 'TYPE_INT32': + case "TYPE_INT32": return FieldDescriptorProto_Type.TYPE_INT32; case 6: - case 'TYPE_FIXED64': + case "TYPE_FIXED64": return FieldDescriptorProto_Type.TYPE_FIXED64; case 7: - case 'TYPE_FIXED32': + case "TYPE_FIXED32": return FieldDescriptorProto_Type.TYPE_FIXED32; case 8: - case 'TYPE_BOOL': + case "TYPE_BOOL": return FieldDescriptorProto_Type.TYPE_BOOL; case 9: - case 'TYPE_STRING': + case "TYPE_STRING": return FieldDescriptorProto_Type.TYPE_STRING; case 10: - case 'TYPE_GROUP': + case "TYPE_GROUP": return FieldDescriptorProto_Type.TYPE_GROUP; case 11: - case 'TYPE_MESSAGE': + case "TYPE_MESSAGE": return FieldDescriptorProto_Type.TYPE_MESSAGE; case 12: - case 'TYPE_BYTES': + case "TYPE_BYTES": return FieldDescriptorProto_Type.TYPE_BYTES; case 13: - case 'TYPE_UINT32': + case "TYPE_UINT32": return FieldDescriptorProto_Type.TYPE_UINT32; case 14: - case 'TYPE_ENUM': + case "TYPE_ENUM": return FieldDescriptorProto_Type.TYPE_ENUM; case 15: - case 'TYPE_SFIXED32': + case "TYPE_SFIXED32": return FieldDescriptorProto_Type.TYPE_SFIXED32; case 16: - case 'TYPE_SFIXED64': + case "TYPE_SFIXED64": return FieldDescriptorProto_Type.TYPE_SFIXED64; case 17: - case 'TYPE_SINT32': + case "TYPE_SINT32": return FieldDescriptorProto_Type.TYPE_SINT32; case 18: - case 'TYPE_SINT64': + case "TYPE_SINT64": return FieldDescriptorProto_Type.TYPE_SINT64; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FieldDescriptorProto_Type.UNRECOGNIZED; } } -export function fieldDescriptorProto_TypeToJSON( - object: FieldDescriptorProto_Type, -): string { +export function fieldDescriptorProto_TypeToJSON(object: FieldDescriptorProto_Type): string { switch (object) { case FieldDescriptorProto_Type.TYPE_DOUBLE: - return 'TYPE_DOUBLE'; + return "TYPE_DOUBLE"; case FieldDescriptorProto_Type.TYPE_FLOAT: - return 'TYPE_FLOAT'; + return "TYPE_FLOAT"; case FieldDescriptorProto_Type.TYPE_INT64: - return 'TYPE_INT64'; + return "TYPE_INT64"; case FieldDescriptorProto_Type.TYPE_UINT64: - return 'TYPE_UINT64'; + return "TYPE_UINT64"; case FieldDescriptorProto_Type.TYPE_INT32: - return 'TYPE_INT32'; + return "TYPE_INT32"; case FieldDescriptorProto_Type.TYPE_FIXED64: - return 'TYPE_FIXED64'; + return "TYPE_FIXED64"; case FieldDescriptorProto_Type.TYPE_FIXED32: - return 'TYPE_FIXED32'; + return "TYPE_FIXED32"; case FieldDescriptorProto_Type.TYPE_BOOL: - return 'TYPE_BOOL'; + return "TYPE_BOOL"; case FieldDescriptorProto_Type.TYPE_STRING: - return 'TYPE_STRING'; + return "TYPE_STRING"; case FieldDescriptorProto_Type.TYPE_GROUP: - return 'TYPE_GROUP'; + return "TYPE_GROUP"; case FieldDescriptorProto_Type.TYPE_MESSAGE: - return 'TYPE_MESSAGE'; + return "TYPE_MESSAGE"; case FieldDescriptorProto_Type.TYPE_BYTES: - return 'TYPE_BYTES'; + return "TYPE_BYTES"; case FieldDescriptorProto_Type.TYPE_UINT32: - return 'TYPE_UINT32'; + return "TYPE_UINT32"; case FieldDescriptorProto_Type.TYPE_ENUM: - return 'TYPE_ENUM'; + return "TYPE_ENUM"; case FieldDescriptorProto_Type.TYPE_SFIXED32: - return 'TYPE_SFIXED32'; + return "TYPE_SFIXED32"; case FieldDescriptorProto_Type.TYPE_SFIXED64: - return 'TYPE_SFIXED64'; + return "TYPE_SFIXED64"; case FieldDescriptorProto_Type.TYPE_SINT32: - return 'TYPE_SINT32'; + return "TYPE_SINT32"; case FieldDescriptorProto_Type.TYPE_SINT64: - return 'TYPE_SINT64'; + return "TYPE_SINT64"; case FieldDescriptorProto_Type.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } @@ -328,55 +350,53 @@ export enum FieldDescriptorProto_Label { UNRECOGNIZED = -1, } -export function fieldDescriptorProto_LabelFromJSON( - object: any, -): FieldDescriptorProto_Label { +export function fieldDescriptorProto_LabelFromJSON(object: any): FieldDescriptorProto_Label { switch (object) { case 1: - case 'LABEL_OPTIONAL': + case "LABEL_OPTIONAL": return FieldDescriptorProto_Label.LABEL_OPTIONAL; case 2: - case 'LABEL_REQUIRED': + case "LABEL_REQUIRED": return FieldDescriptorProto_Label.LABEL_REQUIRED; case 3: - case 'LABEL_REPEATED': + case "LABEL_REPEATED": return FieldDescriptorProto_Label.LABEL_REPEATED; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FieldDescriptorProto_Label.UNRECOGNIZED; } } -export function fieldDescriptorProto_LabelToJSON( - object: FieldDescriptorProto_Label, -): string { +export function fieldDescriptorProto_LabelToJSON(object: FieldDescriptorProto_Label): string { switch (object) { case FieldDescriptorProto_Label.LABEL_OPTIONAL: - return 'LABEL_OPTIONAL'; + return "LABEL_OPTIONAL"; case FieldDescriptorProto_Label.LABEL_REQUIRED: - return 'LABEL_REQUIRED'; + return "LABEL_REQUIRED"; case FieldDescriptorProto_Label.LABEL_REPEATED: - return 'LABEL_REPEATED'; + return "LABEL_REPEATED"; case FieldDescriptorProto_Label.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } /** Describes a oneof. */ export interface OneofDescriptorProto { - $type: 'google.protobuf.OneofDescriptorProto'; + $type: "google.protobuf.OneofDescriptorProto"; name?: string | undefined; options?: OneofOptions | undefined; } /** Describes an enum type. */ export interface EnumDescriptorProto { - $type: 'google.protobuf.EnumDescriptorProto'; + $type: "google.protobuf.EnumDescriptorProto"; name?: string | undefined; value: EnumValueDescriptorProto[]; - options?: EnumOptions | undefined; + options?: + | EnumOptions + | undefined; /** * Range of reserved numeric values. Reserved numeric values may not be used * by enum values in the same enum declaration. Reserved ranges may not @@ -399,16 +419,18 @@ export interface EnumDescriptorProto { * domain. */ export interface EnumDescriptorProto_EnumReservedRange { - $type: 'google.protobuf.EnumDescriptorProto.EnumReservedRange'; + $type: "google.protobuf.EnumDescriptorProto.EnumReservedRange"; /** Inclusive. */ - start?: number | undefined; + start?: + | number + | undefined; /** Inclusive. */ end?: number | undefined; } /** Describes a value within an enum. */ export interface EnumValueDescriptorProto { - $type: 'google.protobuf.EnumValueDescriptorProto'; + $type: "google.protobuf.EnumValueDescriptorProto"; name?: string | undefined; number?: number | undefined; options?: EnumValueOptions | undefined; @@ -416,7 +438,7 @@ export interface EnumValueDescriptorProto { /** Describes a service. */ export interface ServiceDescriptorProto { - $type: 'google.protobuf.ServiceDescriptorProto'; + $type: "google.protobuf.ServiceDescriptorProto"; name?: string | undefined; method: MethodDescriptorProto[]; options?: ServiceOptions | undefined; @@ -424,30 +446,38 @@ export interface ServiceDescriptorProto { /** Describes a method of a service. */ export interface MethodDescriptorProto { - $type: 'google.protobuf.MethodDescriptorProto'; - name?: string | undefined; + $type: "google.protobuf.MethodDescriptorProto"; + name?: + | string + | undefined; /** * Input and output type names. These are resolved in the same way as * FieldDescriptorProto.type_name, but must refer to a message type. */ inputType?: string | undefined; outputType?: string | undefined; - options?: MethodOptions | undefined; + options?: + | MethodOptions + | undefined; /** Identifies if client streams multiple client messages */ - clientStreaming?: boolean | undefined; + clientStreaming?: + | boolean + | undefined; /** Identifies if server streams multiple server messages */ serverStreaming?: boolean | undefined; } export interface FileOptions { - $type: 'google.protobuf.FileOptions'; + $type: "google.protobuf.FileOptions"; /** * Sets the Java package where classes generated from this .proto will be * placed. By default, the proto package is used, but this is often * inappropriate because proto packages do not normally start with backwards * domain names. */ - javaPackage?: string | undefined; + javaPackage?: + | string + | undefined; /** * Controls the name of the wrapper Java class generated for the .proto file. * That class will always contain the .proto file's getDescriptor() method as @@ -455,7 +485,9 @@ export interface FileOptions { * If java_multiple_files is disabled, then all the other classes from the * .proto file will be nested inside the single wrapper outer class. */ - javaOuterClassname?: string | undefined; + javaOuterClassname?: + | string + | undefined; /** * If enabled, then the Java code generator will generate a separate .java * file for each top-level message, enum, and service defined in the .proto @@ -464,13 +496,17 @@ export interface FileOptions { * generated to contain the file's getDescriptor() method as well as any * top-level extensions defined in the file. */ - javaMultipleFiles?: boolean | undefined; + javaMultipleFiles?: + | boolean + | undefined; /** * This option does nothing. * * @deprecated */ - javaGenerateEqualsAndHash?: boolean | undefined; + javaGenerateEqualsAndHash?: + | boolean + | undefined; /** * If set true, then the Java2 code generator will generate code that * throws an exception whenever an attempt is made to assign a non-UTF-8 @@ -480,7 +516,9 @@ export interface FileOptions { * This option has no effect on when used with the lite runtime. */ javaStringCheckUtf8?: boolean | undefined; - optimizeFor?: FileOptions_OptimizeMode | undefined; + optimizeFor?: + | FileOptions_OptimizeMode + | undefined; /** * Sets the Go package where structs generated from this .proto will be * placed. If omitted, the Go package will be derived from the following: @@ -488,7 +526,9 @@ export interface FileOptions { * - Otherwise, the package statement in the .proto file, if present. * - Otherwise, the basename of the .proto file, without extension. */ - goPackage?: string | undefined; + goPackage?: + | string + | undefined; /** * Should generic services be generated in each language? "Generic" services * are not specific to any particular RPC system. They are generated by the @@ -504,56 +544,76 @@ export interface FileOptions { ccGenericServices?: boolean | undefined; javaGenericServices?: boolean | undefined; pyGenericServices?: boolean | undefined; - phpGenericServices?: boolean | undefined; + phpGenericServices?: + | boolean + | undefined; /** * Is this file deprecated? * Depending on the target platform, this can emit Deprecated annotations * for everything in the file, or it will be completely ignored; in the very * least, this is a formalization for deprecating files. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** * Enables the use of arenas for the proto messages in this file. This applies * only to generated classes for C++. */ - ccEnableArenas?: boolean | undefined; + ccEnableArenas?: + | boolean + | undefined; /** * Sets the objective c class prefix which is prepended to all objective c * generated classes from this .proto. There is no default. */ - objcClassPrefix?: string | undefined; + objcClassPrefix?: + | string + | undefined; /** Namespace for generated classes; defaults to the package. */ - csharpNamespace?: string | undefined; + csharpNamespace?: + | string + | undefined; /** * By default Swift generators will take the proto package and CamelCase it * replacing '.' with underscore and use that to prefix the types/symbols * defined. When this options is provided, they will use this value instead * to prefix the types/symbols defined. */ - swiftPrefix?: string | undefined; + swiftPrefix?: + | string + | undefined; /** * Sets the php class prefix which is prepended to all php generated classes * from this .proto. Default is empty. */ - phpClassPrefix?: string | undefined; + phpClassPrefix?: + | string + | undefined; /** * Use this option to change the namespace of php generated classes. Default * is empty. When this option is empty, the package name will be used for * determining the namespace. */ - phpNamespace?: string | undefined; + phpNamespace?: + | string + | undefined; /** * Use this option to change the namespace of php generated metadata classes. * Default is empty. When this option is empty, the proto file name will be * used for determining the namespace. */ - phpMetadataNamespace?: string | undefined; + phpMetadataNamespace?: + | string + | undefined; /** * Use this option to change the package of ruby generated classes. Default * is empty. When this option is not set, the package name will be used for * determining the ruby package. */ - rubyPackage?: string | undefined; + rubyPackage?: + | string + | undefined; /** * The parser stores options it doesn't recognize here. * See the documentation for the "Options" section above. @@ -572,44 +632,40 @@ export enum FileOptions_OptimizeMode { UNRECOGNIZED = -1, } -export function fileOptions_OptimizeModeFromJSON( - object: any, -): FileOptions_OptimizeMode { +export function fileOptions_OptimizeModeFromJSON(object: any): FileOptions_OptimizeMode { switch (object) { case 1: - case 'SPEED': + case "SPEED": return FileOptions_OptimizeMode.SPEED; case 2: - case 'CODE_SIZE': + case "CODE_SIZE": return FileOptions_OptimizeMode.CODE_SIZE; case 3: - case 'LITE_RUNTIME': + case "LITE_RUNTIME": return FileOptions_OptimizeMode.LITE_RUNTIME; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FileOptions_OptimizeMode.UNRECOGNIZED; } } -export function fileOptions_OptimizeModeToJSON( - object: FileOptions_OptimizeMode, -): string { +export function fileOptions_OptimizeModeToJSON(object: FileOptions_OptimizeMode): string { switch (object) { case FileOptions_OptimizeMode.SPEED: - return 'SPEED'; + return "SPEED"; case FileOptions_OptimizeMode.CODE_SIZE: - return 'CODE_SIZE'; + return "CODE_SIZE"; case FileOptions_OptimizeMode.LITE_RUNTIME: - return 'LITE_RUNTIME'; + return "LITE_RUNTIME"; case FileOptions_OptimizeMode.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } export interface MessageOptions { - $type: 'google.protobuf.MessageOptions'; + $type: "google.protobuf.MessageOptions"; /** * Set true to use the old proto1 MessageSet wire format for extensions. * This is provided for backwards-compatibility with the MessageSet wire @@ -630,20 +686,26 @@ export interface MessageOptions { * Because this is an option, the above two restrictions are not enforced by * the protocol compiler. */ - messageSetWireFormat?: boolean | undefined; + messageSetWireFormat?: + | boolean + | undefined; /** * Disables the generation of the standard "descriptor()" accessor, which can * conflict with a field of the same name. This is meant to make migration * from proto1 easier; new code should avoid fields named "descriptor". */ - noStandardDescriptorAccessor?: boolean | undefined; + noStandardDescriptorAccessor?: + | boolean + | undefined; /** * Is this message deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the message, or it will be completely ignored; in the very least, * this is a formalization for deprecating messages. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** * Whether the message is an automatically generated map entry type for the * maps field. @@ -667,20 +729,24 @@ export interface MessageOptions { * instead. The option should only be implicitly set by the proto compiler * parser. */ - mapEntry?: boolean | undefined; + mapEntry?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface FieldOptions { - $type: 'google.protobuf.FieldOptions'; + $type: "google.protobuf.FieldOptions"; /** * The ctype option instructs the C++ code generator to use a different * representation of the field than it normally would. See the specific * options below. This option is not yet implemented in the open source * release -- sorry, we'll try to include it in a future version! */ - ctype?: FieldOptions_CType | undefined; + ctype?: + | FieldOptions_CType + | undefined; /** * The packed option can be enabled for repeated primitive fields to enable * a more efficient representation on the wire. Rather than repeatedly @@ -688,7 +754,9 @@ export interface FieldOptions { * a single length-delimited blob. In proto3, only explicit setting it to * false will avoid using packed encoding. */ - packed?: boolean | undefined; + packed?: + | boolean + | undefined; /** * The jstype option determines the JavaScript type used for values of the * field. The option is permitted only for 64 bit integral and fixed types @@ -702,7 +770,9 @@ export interface FieldOptions { * This option is an enum to permit additional types to be added, e.g. * goog.math.Integer. */ - jstype?: FieldOptions_JSType | undefined; + jstype?: + | FieldOptions_JSType + | undefined; /** * Should this field be parsed lazily? Lazy applies only to message-type * fields. It means that when the outer message is initially parsed, the @@ -738,22 +808,30 @@ export interface FieldOptions { * * TODO(b/211906113): Enable validation on lazy fields. */ - lazy?: boolean | undefined; + lazy?: + | boolean + | undefined; /** * unverified_lazy does no correctness checks on the byte stream. This should * only be used where lazy with verification is prohibitive for performance * reasons. */ - unverifiedLazy?: boolean | undefined; + unverifiedLazy?: + | boolean + | undefined; /** * Is this field deprecated? * Depending on the target platform, this can emit Deprecated annotations * for accessors, or it will be completely ignored; in the very least, this * is a formalization for deprecating fields. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** For Google-internal migration only. Do not use. */ - weak?: boolean | undefined; + weak?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -769,16 +847,16 @@ export enum FieldOptions_CType { export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { switch (object) { case 0: - case 'STRING': + case "STRING": return FieldOptions_CType.STRING; case 1: - case 'CORD': + case "CORD": return FieldOptions_CType.CORD; case 2: - case 'STRING_PIECE': + case "STRING_PIECE": return FieldOptions_CType.STRING_PIECE; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FieldOptions_CType.UNRECOGNIZED; } @@ -787,14 +865,14 @@ export function fieldOptions_CTypeFromJSON(object: any): FieldOptions_CType { export function fieldOptions_CTypeToJSON(object: FieldOptions_CType): string { switch (object) { case FieldOptions_CType.STRING: - return 'STRING'; + return "STRING"; case FieldOptions_CType.CORD: - return 'CORD'; + return "CORD"; case FieldOptions_CType.STRING_PIECE: - return 'STRING_PIECE'; + return "STRING_PIECE"; case FieldOptions_CType.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } @@ -811,16 +889,16 @@ export enum FieldOptions_JSType { export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { switch (object) { case 0: - case 'JS_NORMAL': + case "JS_NORMAL": return FieldOptions_JSType.JS_NORMAL; case 1: - case 'JS_STRING': + case "JS_STRING": return FieldOptions_JSType.JS_STRING; case 2: - case 'JS_NUMBER': + case "JS_NUMBER": return FieldOptions_JSType.JS_NUMBER; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return FieldOptions_JSType.UNRECOGNIZED; } @@ -829,69 +907,77 @@ export function fieldOptions_JSTypeFromJSON(object: any): FieldOptions_JSType { export function fieldOptions_JSTypeToJSON(object: FieldOptions_JSType): string { switch (object) { case FieldOptions_JSType.JS_NORMAL: - return 'JS_NORMAL'; + return "JS_NORMAL"; case FieldOptions_JSType.JS_STRING: - return 'JS_STRING'; + return "JS_STRING"; case FieldOptions_JSType.JS_NUMBER: - return 'JS_NUMBER'; + return "JS_NUMBER"; case FieldOptions_JSType.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } export interface OneofOptions { - $type: 'google.protobuf.OneofOptions'; + $type: "google.protobuf.OneofOptions"; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface EnumOptions { - $type: 'google.protobuf.EnumOptions'; + $type: "google.protobuf.EnumOptions"; /** * Set this option to true to allow mapping different tag names to the same * value. */ - allowAlias?: boolean | undefined; + allowAlias?: + | boolean + | undefined; /** * Is this enum deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the enum, or it will be completely ignored; in the very least, this * is a formalization for deprecating enums. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface EnumValueOptions { - $type: 'google.protobuf.EnumValueOptions'; + $type: "google.protobuf.EnumValueOptions"; /** * Is this enum value deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the enum value, or it will be completely ignored; in the very least, * this is a formalization for deprecating enum values. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface ServiceOptions { - $type: 'google.protobuf.ServiceOptions'; + $type: "google.protobuf.ServiceOptions"; /** * Is this service deprecated? * Depending on the target platform, this can emit Deprecated annotations * for the service, or it will be completely ignored; in the very least, * this is a formalization for deprecating services. */ - deprecated?: boolean | undefined; + deprecated?: + | boolean + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } export interface MethodOptions { - $type: 'google.protobuf.MethodOptions'; + $type: "google.protobuf.MethodOptions"; /** * Is this method deprecated? * Depending on the target platform, this can emit Deprecated annotations @@ -899,7 +985,9 @@ export interface MethodOptions { * this is a formalization for deprecating methods. */ deprecated?: boolean | undefined; - idempotencyLevel?: MethodOptions_IdempotencyLevel | undefined; + idempotencyLevel?: + | MethodOptions_IdempotencyLevel + | undefined; /** The parser stores options it doesn't recognize here. See above. */ uninterpretedOption: UninterpretedOption[]; } @@ -918,39 +1006,35 @@ export enum MethodOptions_IdempotencyLevel { UNRECOGNIZED = -1, } -export function methodOptions_IdempotencyLevelFromJSON( - object: any, -): MethodOptions_IdempotencyLevel { +export function methodOptions_IdempotencyLevelFromJSON(object: any): MethodOptions_IdempotencyLevel { switch (object) { case 0: - case 'IDEMPOTENCY_UNKNOWN': + case "IDEMPOTENCY_UNKNOWN": return MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN; case 1: - case 'NO_SIDE_EFFECTS': + case "NO_SIDE_EFFECTS": return MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS; case 2: - case 'IDEMPOTENT': + case "IDEMPOTENT": return MethodOptions_IdempotencyLevel.IDEMPOTENT; case -1: - case 'UNRECOGNIZED': + case "UNRECOGNIZED": default: return MethodOptions_IdempotencyLevel.UNRECOGNIZED; } } -export function methodOptions_IdempotencyLevelToJSON( - object: MethodOptions_IdempotencyLevel, -): string { +export function methodOptions_IdempotencyLevelToJSON(object: MethodOptions_IdempotencyLevel): string { switch (object) { case MethodOptions_IdempotencyLevel.IDEMPOTENCY_UNKNOWN: - return 'IDEMPOTENCY_UNKNOWN'; + return "IDEMPOTENCY_UNKNOWN"; case MethodOptions_IdempotencyLevel.NO_SIDE_EFFECTS: - return 'NO_SIDE_EFFECTS'; + return "NO_SIDE_EFFECTS"; case MethodOptions_IdempotencyLevel.IDEMPOTENT: - return 'IDEMPOTENT'; + return "IDEMPOTENT"; case MethodOptions_IdempotencyLevel.UNRECOGNIZED: default: - return 'UNRECOGNIZED'; + return "UNRECOGNIZED"; } } @@ -963,7 +1047,7 @@ export function methodOptions_IdempotencyLevelToJSON( * in them. */ export interface UninterpretedOption { - $type: 'google.protobuf.UninterpretedOption'; + $type: "google.protobuf.UninterpretedOption"; name: UninterpretedOption_NamePart[]; /** * The value of the uninterpreted option, in whatever type the tokenizer @@ -985,7 +1069,7 @@ export interface UninterpretedOption { * "foo.(bar.baz).moo". */ export interface UninterpretedOption_NamePart { - $type: 'google.protobuf.UninterpretedOption.NamePart'; + $type: "google.protobuf.UninterpretedOption.NamePart"; namePart: string; isExtension: boolean; } @@ -995,7 +1079,7 @@ export interface UninterpretedOption_NamePart { * FileDescriptorProto was generated. */ export interface SourceCodeInfo { - $type: 'google.protobuf.SourceCodeInfo'; + $type: "google.protobuf.SourceCodeInfo"; /** * A Location identifies a piece of source code in a .proto file which * corresponds to a particular definition. This information is intended @@ -1045,7 +1129,7 @@ export interface SourceCodeInfo { } export interface SourceCodeInfo_Location { - $type: 'google.protobuf.SourceCodeInfo.Location'; + $type: "google.protobuf.SourceCodeInfo.Location"; /** * Identifies which part of the FileDescriptorProto was defined at this * location. @@ -1140,7 +1224,7 @@ export interface SourceCodeInfo_Location { * source file, but may contain references to different source .proto files. */ export interface GeneratedCodeInfo { - $type: 'google.protobuf.GeneratedCodeInfo'; + $type: "google.protobuf.GeneratedCodeInfo"; /** * An Annotation connects some span of text in generated code to an element * of its generating .proto file. @@ -1149,19 +1233,23 @@ export interface GeneratedCodeInfo { } export interface GeneratedCodeInfo_Annotation { - $type: 'google.protobuf.GeneratedCodeInfo.Annotation'; + $type: "google.protobuf.GeneratedCodeInfo.Annotation"; /** * Identifies the element in the original source .proto file. This field * is formatted the same as SourceCodeInfo.Location.path. */ path: number[]; /** Identifies the filesystem path to the original source .proto. */ - sourceFile?: string | undefined; + sourceFile?: + | string + | undefined; /** * Identifies the starting offset in bytes in the generated code * that relates to the identified object. */ - begin?: number | undefined; + begin?: + | number + | undefined; /** * Identifies the ending offset in bytes in the generated code that * relates to the identified offset. The end offset should be one past @@ -1171,16 +1259,13 @@ export interface GeneratedCodeInfo_Annotation { } function createBaseFileDescriptorSet(): FileDescriptorSet { - return { $type: 'google.protobuf.FileDescriptorSet', file: [] }; + return { $type: "google.protobuf.FileDescriptorSet", file: [] }; } export const FileDescriptorSet = { - $type: 'google.protobuf.FileDescriptorSet' as const, + $type: "google.protobuf.FileDescriptorSet" as const, - encode( - message: FileDescriptorSet, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: FileDescriptorSet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.file) { FileDescriptorProto.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -1188,8 +1273,7 @@ export const FileDescriptorSet = { }, decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorSet { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileDescriptorSet(); while (reader.pos < end) { @@ -1200,9 +1284,7 @@ export const FileDescriptorSet = { break; } - message.file.push( - FileDescriptorProto.decode(reader, reader.uint32()), - ); + message.file.push(FileDescriptorProto.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1216,9 +1298,7 @@ export const FileDescriptorSet = { fromJSON(object: any): FileDescriptorSet { return { $type: FileDescriptorSet.$type, - file: globalThis.Array.isArray(object?.file) - ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) - : [], + file: globalThis.Array.isArray(object?.file) ? object.file.map((e: any) => FileDescriptorProto.fromJSON(e)) : [], }; }, @@ -1235,8 +1315,7 @@ export const FileDescriptorSet = { }, fromPartial(object: DeepPartial): FileDescriptorSet { const message = createBaseFileDescriptorSet(); - message.file = - object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; + message.file = object.file?.map((e) => FileDescriptorProto.fromPartial(e)) || []; return message; }, }; @@ -1245,9 +1324,9 @@ messageTypeRegistry.set(FileDescriptorSet.$type, FileDescriptorSet); function createBaseFileDescriptorProto(): FileDescriptorProto { return { - $type: 'google.protobuf.FileDescriptorProto', - name: '', - package: '', + $type: "google.protobuf.FileDescriptorProto", + name: "", + package: "", dependency: [], publicDependency: [], weakDependency: [], @@ -1257,21 +1336,18 @@ function createBaseFileDescriptorProto(): FileDescriptorProto { extension: [], options: undefined, sourceCodeInfo: undefined, - syntax: '', + syntax: "", }; } export const FileDescriptorProto = { - $type: 'google.protobuf.FileDescriptorProto' as const, + $type: "google.protobuf.FileDescriptorProto" as const, - encode( - message: FileDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: FileDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } - if (message.package !== undefined && message.package !== '') { + if (message.package !== undefined && message.package !== "") { writer.uint32(18).string(message.package); } for (const v of message.dependency) { @@ -1303,20 +1379,16 @@ export const FileDescriptorProto = { FileOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); } if (message.sourceCodeInfo !== undefined) { - SourceCodeInfo.encode( - message.sourceCodeInfo, - writer.uint32(74).fork(), - ).ldelim(); + SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(74).fork()).ldelim(); } - if (message.syntax !== undefined && message.syntax !== '') { + if (message.syntax !== undefined && message.syntax !== "") { writer.uint32(98).string(message.syntax); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): FileDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileDescriptorProto(); while (reader.pos < end) { @@ -1382,36 +1454,28 @@ export const FileDescriptorProto = { break; } - message.messageType.push( - DescriptorProto.decode(reader, reader.uint32()), - ); + message.messageType.push(DescriptorProto.decode(reader, reader.uint32())); continue; case 5: if (tag !== 42) { break; } - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()), - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); continue; case 6: if (tag !== 50) { break; } - message.service.push( - ServiceDescriptorProto.decode(reader, reader.uint32()), - ); + message.service.push(ServiceDescriptorProto.decode(reader, reader.uint32())); continue; case 7: if (tag !== 58) { break; } - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); continue; case 8: if (tag !== 66) { @@ -1425,10 +1489,7 @@ export const FileDescriptorProto = { break; } - message.sourceCodeInfo = SourceCodeInfo.decode( - reader, - reader.uint32(), - ); + message.sourceCodeInfo = SourceCodeInfo.decode(reader, reader.uint32()); continue; case 12: if (tag !== 98) { @@ -1449,8 +1510,8 @@ export const FileDescriptorProto = { fromJSON(object: any): FileDescriptorProto { return { $type: FileDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - package: isSet(object.package) ? globalThis.String(object.package) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", + package: isSet(object.package) ? globalThis.String(object.package) : "", dependency: globalThis.Array.isArray(object?.dependency) ? object.dependency.map((e: any) => globalThis.String(e)) : [], @@ -1472,22 +1533,18 @@ export const FileDescriptorProto = { extension: globalThis.Array.isArray(object?.extension) ? object.extension.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) - ? FileOptions.fromJSON(object.options) - : undefined, - sourceCodeInfo: isSet(object.sourceCodeInfo) - ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) - : undefined, - syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : '', + options: isSet(object.options) ? FileOptions.fromJSON(object.options) : undefined, + sourceCodeInfo: isSet(object.sourceCodeInfo) ? SourceCodeInfo.fromJSON(object.sourceCodeInfo) : undefined, + syntax: isSet(object.syntax) ? globalThis.String(object.syntax) : "", }; }, toJSON(message: FileDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } - if (message.package !== undefined && message.package !== '') { + if (message.package !== undefined && message.package !== "") { obj.package = message.package; } if (message.dependency?.length) { @@ -1500,22 +1557,16 @@ export const FileDescriptorProto = { obj.weakDependency = message.weakDependency.map((e) => Math.round(e)); } if (message.messageType?.length) { - obj.messageType = message.messageType.map((e) => - DescriptorProto.toJSON(e), - ); + obj.messageType = message.messageType.map((e) => DescriptorProto.toJSON(e)); } if (message.enumType?.length) { obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); } if (message.service?.length) { - obj.service = message.service.map((e) => - ServiceDescriptorProto.toJSON(e), - ); + obj.service = message.service.map((e) => ServiceDescriptorProto.toJSON(e)); } if (message.extension?.length) { - obj.extension = message.extension.map((e) => - FieldDescriptorProto.toJSON(e), - ); + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = FileOptions.toJSON(message.options); @@ -1523,7 +1574,7 @@ export const FileDescriptorProto = { if (message.sourceCodeInfo !== undefined) { obj.sourceCodeInfo = SourceCodeInfo.toJSON(message.sourceCodeInfo); } - if (message.syntax !== undefined && message.syntax !== '') { + if (message.syntax !== undefined && message.syntax !== "") { obj.syntax = message.syntax; } return obj; @@ -1534,28 +1585,22 @@ export const FileDescriptorProto = { }, fromPartial(object: DeepPartial): FileDescriptorProto { const message = createBaseFileDescriptorProto(); - message.name = object.name ?? ''; - message.package = object.package ?? ''; + message.name = object.name ?? ""; + message.package = object.package ?? ""; message.dependency = object.dependency?.map((e) => e) || []; message.publicDependency = object.publicDependency?.map((e) => e) || []; message.weakDependency = object.weakDependency?.map((e) => e) || []; - message.messageType = - object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.service = - object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? FileOptions.fromPartial(object.options) - : undefined; - message.sourceCodeInfo = - object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null - ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) - : undefined; - message.syntax = object.syntax ?? ''; + message.messageType = object.messageType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.service = object.service?.map((e) => ServiceDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? FileOptions.fromPartial(object.options) + : undefined; + message.sourceCodeInfo = (object.sourceCodeInfo !== undefined && object.sourceCodeInfo !== null) + ? SourceCodeInfo.fromPartial(object.sourceCodeInfo) + : undefined; + message.syntax = object.syntax ?? ""; return message; }, }; @@ -1564,8 +1609,8 @@ messageTypeRegistry.set(FileDescriptorProto.$type, FileDescriptorProto); function createBaseDescriptorProto(): DescriptorProto { return { - $type: 'google.protobuf.DescriptorProto', - name: '', + $type: "google.protobuf.DescriptorProto", + name: "", field: [], extension: [], nestedType: [], @@ -1579,13 +1624,10 @@ function createBaseDescriptorProto(): DescriptorProto { } export const DescriptorProto = { - $type: 'google.protobuf.DescriptorProto' as const, + $type: "google.protobuf.DescriptorProto" as const, - encode( - message: DescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: DescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.field) { @@ -1601,10 +1643,7 @@ export const DescriptorProto = { EnumDescriptorProto.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.extensionRange) { - DescriptorProto_ExtensionRange.encode( - v!, - writer.uint32(42).fork(), - ).ldelim(); + DescriptorProto_ExtensionRange.encode(v!, writer.uint32(42).fork()).ldelim(); } for (const v of message.oneofDecl) { OneofDescriptorProto.encode(v!, writer.uint32(66).fork()).ldelim(); @@ -1613,10 +1652,7 @@ export const DescriptorProto = { MessageOptions.encode(message.options, writer.uint32(58).fork()).ldelim(); } for (const v of message.reservedRange) { - DescriptorProto_ReservedRange.encode( - v!, - writer.uint32(74).fork(), - ).ldelim(); + DescriptorProto_ReservedRange.encode(v!, writer.uint32(74).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(82).string(v!); @@ -1625,8 +1661,7 @@ export const DescriptorProto = { }, decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto(); while (reader.pos < end) { @@ -1644,54 +1679,42 @@ export const DescriptorProto = { break; } - message.field.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); + message.field.push(FieldDescriptorProto.decode(reader, reader.uint32())); continue; case 6: if (tag !== 50) { break; } - message.extension.push( - FieldDescriptorProto.decode(reader, reader.uint32()), - ); + message.extension.push(FieldDescriptorProto.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { break; } - message.nestedType.push( - DescriptorProto.decode(reader, reader.uint32()), - ); + message.nestedType.push(DescriptorProto.decode(reader, reader.uint32())); continue; case 4: if (tag !== 34) { break; } - message.enumType.push( - EnumDescriptorProto.decode(reader, reader.uint32()), - ); + message.enumType.push(EnumDescriptorProto.decode(reader, reader.uint32())); continue; case 5: if (tag !== 42) { break; } - message.extensionRange.push( - DescriptorProto_ExtensionRange.decode(reader, reader.uint32()), - ); + message.extensionRange.push(DescriptorProto_ExtensionRange.decode(reader, reader.uint32())); continue; case 8: if (tag !== 66) { break; } - message.oneofDecl.push( - OneofDescriptorProto.decode(reader, reader.uint32()), - ); + message.oneofDecl.push(OneofDescriptorProto.decode(reader, reader.uint32())); continue; case 7: if (tag !== 58) { @@ -1705,9 +1728,7 @@ export const DescriptorProto = { break; } - message.reservedRange.push( - DescriptorProto_ReservedRange.decode(reader, reader.uint32()), - ); + message.reservedRange.push(DescriptorProto_ReservedRange.decode(reader, reader.uint32())); continue; case 10: if (tag !== 82) { @@ -1728,7 +1749,7 @@ export const DescriptorProto = { fromJSON(object: any): DescriptorProto { return { $type: DescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", field: globalThis.Array.isArray(object?.field) ? object.field.map((e: any) => FieldDescriptorProto.fromJSON(e)) : [], @@ -1742,20 +1763,14 @@ export const DescriptorProto = { ? object.enumType.map((e: any) => EnumDescriptorProto.fromJSON(e)) : [], extensionRange: globalThis.Array.isArray(object?.extensionRange) - ? object.extensionRange.map((e: any) => - DescriptorProto_ExtensionRange.fromJSON(e), - ) + ? object.extensionRange.map((e: any) => DescriptorProto_ExtensionRange.fromJSON(e)) : [], oneofDecl: globalThis.Array.isArray(object?.oneofDecl) ? object.oneofDecl.map((e: any) => OneofDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) - ? MessageOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? MessageOptions.fromJSON(object.options) : undefined, reservedRange: globalThis.Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - DescriptorProto_ReservedRange.fromJSON(e), - ) + ? object.reservedRange.map((e: any) => DescriptorProto_ReservedRange.fromJSON(e)) : [], reservedName: globalThis.Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => globalThis.String(e)) @@ -1765,16 +1780,14 @@ export const DescriptorProto = { toJSON(message: DescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.field?.length) { obj.field = message.field.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.extension?.length) { - obj.extension = message.extension.map((e) => - FieldDescriptorProto.toJSON(e), - ); + obj.extension = message.extension.map((e) => FieldDescriptorProto.toJSON(e)); } if (message.nestedType?.length) { obj.nestedType = message.nestedType.map((e) => DescriptorProto.toJSON(e)); @@ -1783,22 +1796,16 @@ export const DescriptorProto = { obj.enumType = message.enumType.map((e) => EnumDescriptorProto.toJSON(e)); } if (message.extensionRange?.length) { - obj.extensionRange = message.extensionRange.map((e) => - DescriptorProto_ExtensionRange.toJSON(e), - ); + obj.extensionRange = message.extensionRange.map((e) => DescriptorProto_ExtensionRange.toJSON(e)); } if (message.oneofDecl?.length) { - obj.oneofDecl = message.oneofDecl.map((e) => - OneofDescriptorProto.toJSON(e), - ); + obj.oneofDecl = message.oneofDecl.map((e) => OneofDescriptorProto.toJSON(e)); } if (message.options !== undefined) { obj.options = MessageOptions.toJSON(message.options); } if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map((e) => - DescriptorProto_ReservedRange.toJSON(e), - ); + obj.reservedRange = message.reservedRange.map((e) => DescriptorProto_ReservedRange.toJSON(e)); } if (message.reservedName?.length) { obj.reservedName = message.reservedName; @@ -1811,29 +1818,17 @@ export const DescriptorProto = { }, fromPartial(object: DeepPartial): DescriptorProto { const message = createBaseDescriptorProto(); - message.name = object.name ?? ''; - message.field = - object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.extension = - object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; - message.nestedType = - object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; - message.enumType = - object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; - message.extensionRange = - object.extensionRange?.map((e) => - DescriptorProto_ExtensionRange.fromPartial(e), - ) || []; - message.oneofDecl = - object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? MessageOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - DescriptorProto_ReservedRange.fromPartial(e), - ) || []; + message.name = object.name ?? ""; + message.field = object.field?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.extension = object.extension?.map((e) => FieldDescriptorProto.fromPartial(e)) || []; + message.nestedType = object.nestedType?.map((e) => DescriptorProto.fromPartial(e)) || []; + message.enumType = object.enumType?.map((e) => EnumDescriptorProto.fromPartial(e)) || []; + message.extensionRange = object.extensionRange?.map((e) => DescriptorProto_ExtensionRange.fromPartial(e)) || []; + message.oneofDecl = object.oneofDecl?.map((e) => OneofDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? MessageOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => DescriptorProto_ReservedRange.fromPartial(e)) || []; message.reservedName = object.reservedName?.map((e) => e) || []; return message; }, @@ -1842,21 +1837,13 @@ export const DescriptorProto = { messageTypeRegistry.set(DescriptorProto.$type, DescriptorProto); function createBaseDescriptorProto_ExtensionRange(): DescriptorProto_ExtensionRange { - return { - $type: 'google.protobuf.DescriptorProto.ExtensionRange', - start: 0, - end: 0, - options: undefined, - }; + return { $type: "google.protobuf.DescriptorProto.ExtensionRange", start: 0, end: 0, options: undefined }; } export const DescriptorProto_ExtensionRange = { - $type: 'google.protobuf.DescriptorProto.ExtensionRange' as const, + $type: "google.protobuf.DescriptorProto.ExtensionRange" as const, - encode( - message: DescriptorProto_ExtensionRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DescriptorProto_ExtensionRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== undefined && message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -1864,20 +1851,13 @@ export const DescriptorProto_ExtensionRange = { writer.uint32(16).int32(message.end); } if (message.options !== undefined) { - ExtensionRangeOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); + ExtensionRangeOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DescriptorProto_ExtensionRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ExtensionRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_ExtensionRange(); while (reader.pos < end) { @@ -1902,10 +1882,7 @@ export const DescriptorProto_ExtensionRange = { break; } - message.options = ExtensionRangeOptions.decode( - reader, - reader.uint32(), - ); + message.options = ExtensionRangeOptions.decode(reader, reader.uint32()); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -1921,9 +1898,7 @@ export const DescriptorProto_ExtensionRange = { $type: DescriptorProto_ExtensionRange.$type, start: isSet(object.start) ? globalThis.Number(object.start) : 0, end: isSet(object.end) ? globalThis.Number(object.end) : 0, - options: isSet(object.options) - ? ExtensionRangeOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? ExtensionRangeOptions.fromJSON(object.options) : undefined, }; }, @@ -1941,45 +1916,30 @@ export const DescriptorProto_ExtensionRange = { return obj; }, - create( - base?: DeepPartial, - ): DescriptorProto_ExtensionRange { + create(base?: DeepPartial): DescriptorProto_ExtensionRange { return DescriptorProto_ExtensionRange.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): DescriptorProto_ExtensionRange { + fromPartial(object: DeepPartial): DescriptorProto_ExtensionRange { const message = createBaseDescriptorProto_ExtensionRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? ExtensionRangeOptions.fromPartial(object.options) - : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? ExtensionRangeOptions.fromPartial(object.options) + : undefined; return message; }, }; -messageTypeRegistry.set( - DescriptorProto_ExtensionRange.$type, - DescriptorProto_ExtensionRange, -); +messageTypeRegistry.set(DescriptorProto_ExtensionRange.$type, DescriptorProto_ExtensionRange); function createBaseDescriptorProto_ReservedRange(): DescriptorProto_ReservedRange { - return { - $type: 'google.protobuf.DescriptorProto.ReservedRange', - start: 0, - end: 0, - }; + return { $type: "google.protobuf.DescriptorProto.ReservedRange", start: 0, end: 0 }; } export const DescriptorProto_ReservedRange = { - $type: 'google.protobuf.DescriptorProto.ReservedRange' as const, + $type: "google.protobuf.DescriptorProto.ReservedRange" as const, - encode( - message: DescriptorProto_ReservedRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: DescriptorProto_ReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== undefined && message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -1989,12 +1949,8 @@ export const DescriptorProto_ReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): DescriptorProto_ReservedRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): DescriptorProto_ReservedRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseDescriptorProto_ReservedRange(); while (reader.pos < end) { @@ -2042,14 +1998,10 @@ export const DescriptorProto_ReservedRange = { return obj; }, - create( - base?: DeepPartial, - ): DescriptorProto_ReservedRange { + create(base?: DeepPartial): DescriptorProto_ReservedRange { return DescriptorProto_ReservedRange.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): DescriptorProto_ReservedRange { + fromPartial(object: DeepPartial): DescriptorProto_ReservedRange { const message = createBaseDescriptorProto_ReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -2057,37 +2009,24 @@ export const DescriptorProto_ReservedRange = { }, }; -messageTypeRegistry.set( - DescriptorProto_ReservedRange.$type, - DescriptorProto_ReservedRange, -); +messageTypeRegistry.set(DescriptorProto_ReservedRange.$type, DescriptorProto_ReservedRange); function createBaseExtensionRangeOptions(): ExtensionRangeOptions { - return { - $type: 'google.protobuf.ExtensionRangeOptions', - uninterpretedOption: [], - }; + return { $type: "google.protobuf.ExtensionRangeOptions", uninterpretedOption: [] }; } export const ExtensionRangeOptions = { - $type: 'google.protobuf.ExtensionRangeOptions' as const, + $type: "google.protobuf.ExtensionRangeOptions" as const, - encode( - message: ExtensionRangeOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ExtensionRangeOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ExtensionRangeOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ExtensionRangeOptions { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseExtensionRangeOptions(); while (reader.pos < end) { @@ -2098,9 +2037,7 @@ export const ExtensionRangeOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -2115,9 +2052,7 @@ export const ExtensionRangeOptions = { return { $type: ExtensionRangeOptions.$type, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -2125,9 +2060,7 @@ export const ExtensionRangeOptions = { toJSON(message: ExtensionRangeOptions): unknown { const obj: any = {}; if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -2135,14 +2068,9 @@ export const ExtensionRangeOptions = { create(base?: DeepPartial): ExtensionRangeOptions { return ExtensionRangeOptions.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ExtensionRangeOptions { + fromPartial(object: DeepPartial): ExtensionRangeOptions { const message = createBaseExtensionRangeOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -2151,29 +2079,26 @@ messageTypeRegistry.set(ExtensionRangeOptions.$type, ExtensionRangeOptions); function createBaseFieldDescriptorProto(): FieldDescriptorProto { return { - $type: 'google.protobuf.FieldDescriptorProto', - name: '', + $type: "google.protobuf.FieldDescriptorProto", + name: "", number: 0, label: 1, type: 1, - typeName: '', - extendee: '', - defaultValue: '', + typeName: "", + extendee: "", + defaultValue: "", oneofIndex: 0, - jsonName: '', + jsonName: "", options: undefined, proto3Optional: false, }; } export const FieldDescriptorProto = { - $type: 'google.protobuf.FieldDescriptorProto' as const, + $type: "google.protobuf.FieldDescriptorProto" as const, - encode( - message: FieldDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: FieldDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } if (message.number !== undefined && message.number !== 0) { @@ -2185,39 +2110,32 @@ export const FieldDescriptorProto = { if (message.type !== undefined && message.type !== 1) { writer.uint32(40).int32(message.type); } - if (message.typeName !== undefined && message.typeName !== '') { + if (message.typeName !== undefined && message.typeName !== "") { writer.uint32(50).string(message.typeName); } - if (message.extendee !== undefined && message.extendee !== '') { + if (message.extendee !== undefined && message.extendee !== "") { writer.uint32(18).string(message.extendee); } - if (message.defaultValue !== undefined && message.defaultValue !== '') { + if (message.defaultValue !== undefined && message.defaultValue !== "") { writer.uint32(58).string(message.defaultValue); } if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { writer.uint32(72).int32(message.oneofIndex); } - if (message.jsonName !== undefined && message.jsonName !== '') { + if (message.jsonName !== undefined && message.jsonName !== "") { writer.uint32(82).string(message.jsonName); } if (message.options !== undefined) { FieldOptions.encode(message.options, writer.uint32(66).fork()).ldelim(); } - if ( - message.proto3Optional !== undefined && - message.proto3Optional !== false - ) { + if (message.proto3Optional !== undefined && message.proto3Optional !== false) { writer.uint32(136).bool(message.proto3Optional); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): FieldDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): FieldDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFieldDescriptorProto(); while (reader.pos < end) { @@ -2312,41 +2230,23 @@ export const FieldDescriptorProto = { fromJSON(object: any): FieldDescriptorProto { return { $type: FieldDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", number: isSet(object.number) ? globalThis.Number(object.number) : 0, - label: isSet(object.label) - ? fieldDescriptorProto_LabelFromJSON(object.label) - : 1, - type: isSet(object.type) - ? fieldDescriptorProto_TypeFromJSON(object.type) - : 1, - typeName: isSet(object.typeName) - ? globalThis.String(object.typeName) - : '', - extendee: isSet(object.extendee) - ? globalThis.String(object.extendee) - : '', - defaultValue: isSet(object.defaultValue) - ? globalThis.String(object.defaultValue) - : '', - oneofIndex: isSet(object.oneofIndex) - ? globalThis.Number(object.oneofIndex) - : 0, - jsonName: isSet(object.jsonName) - ? globalThis.String(object.jsonName) - : '', - options: isSet(object.options) - ? FieldOptions.fromJSON(object.options) - : undefined, - proto3Optional: isSet(object.proto3Optional) - ? globalThis.Boolean(object.proto3Optional) - : false, + label: isSet(object.label) ? fieldDescriptorProto_LabelFromJSON(object.label) : 1, + type: isSet(object.type) ? fieldDescriptorProto_TypeFromJSON(object.type) : 1, + typeName: isSet(object.typeName) ? globalThis.String(object.typeName) : "", + extendee: isSet(object.extendee) ? globalThis.String(object.extendee) : "", + defaultValue: isSet(object.defaultValue) ? globalThis.String(object.defaultValue) : "", + oneofIndex: isSet(object.oneofIndex) ? globalThis.Number(object.oneofIndex) : 0, + jsonName: isSet(object.jsonName) ? globalThis.String(object.jsonName) : "", + options: isSet(object.options) ? FieldOptions.fromJSON(object.options) : undefined, + proto3Optional: isSet(object.proto3Optional) ? globalThis.Boolean(object.proto3Optional) : false, }; }, toJSON(message: FieldDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.number !== undefined && message.number !== 0) { @@ -2358,28 +2258,25 @@ export const FieldDescriptorProto = { if (message.type !== undefined && message.type !== 1) { obj.type = fieldDescriptorProto_TypeToJSON(message.type); } - if (message.typeName !== undefined && message.typeName !== '') { + if (message.typeName !== undefined && message.typeName !== "") { obj.typeName = message.typeName; } - if (message.extendee !== undefined && message.extendee !== '') { + if (message.extendee !== undefined && message.extendee !== "") { obj.extendee = message.extendee; } - if (message.defaultValue !== undefined && message.defaultValue !== '') { + if (message.defaultValue !== undefined && message.defaultValue !== "") { obj.defaultValue = message.defaultValue; } if (message.oneofIndex !== undefined && message.oneofIndex !== 0) { obj.oneofIndex = Math.round(message.oneofIndex); } - if (message.jsonName !== undefined && message.jsonName !== '') { + if (message.jsonName !== undefined && message.jsonName !== "") { obj.jsonName = message.jsonName; } if (message.options !== undefined) { obj.options = FieldOptions.toJSON(message.options); } - if ( - message.proto3Optional !== undefined && - message.proto3Optional !== false - ) { + if (message.proto3Optional !== undefined && message.proto3Optional !== false) { obj.proto3Optional = message.proto3Optional; } return obj; @@ -2390,19 +2287,18 @@ export const FieldDescriptorProto = { }, fromPartial(object: DeepPartial): FieldDescriptorProto { const message = createBaseFieldDescriptorProto(); - message.name = object.name ?? ''; + message.name = object.name ?? ""; message.number = object.number ?? 0; message.label = object.label ?? 1; message.type = object.type ?? 1; - message.typeName = object.typeName ?? ''; - message.extendee = object.extendee ?? ''; - message.defaultValue = object.defaultValue ?? ''; + message.typeName = object.typeName ?? ""; + message.extendee = object.extendee ?? ""; + message.defaultValue = object.defaultValue ?? ""; message.oneofIndex = object.oneofIndex ?? 0; - message.jsonName = object.jsonName ?? ''; - message.options = - object.options !== undefined && object.options !== null - ? FieldOptions.fromPartial(object.options) - : undefined; + message.jsonName = object.jsonName ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? FieldOptions.fromPartial(object.options) + : undefined; message.proto3Optional = object.proto3Optional ?? false; return message; }, @@ -2411,21 +2307,14 @@ export const FieldDescriptorProto = { messageTypeRegistry.set(FieldDescriptorProto.$type, FieldDescriptorProto); function createBaseOneofDescriptorProto(): OneofDescriptorProto { - return { - $type: 'google.protobuf.OneofDescriptorProto', - name: '', - options: undefined, - }; + return { $type: "google.protobuf.OneofDescriptorProto", name: "", options: undefined }; } export const OneofDescriptorProto = { - $type: 'google.protobuf.OneofDescriptorProto' as const, + $type: "google.protobuf.OneofDescriptorProto" as const, - encode( - message: OneofDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: OneofDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } if (message.options !== undefined) { @@ -2434,12 +2323,8 @@ export const OneofDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): OneofDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): OneofDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOneofDescriptorProto(); while (reader.pos < end) { @@ -2471,16 +2356,14 @@ export const OneofDescriptorProto = { fromJSON(object: any): OneofDescriptorProto { return { $type: OneofDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - options: isSet(object.options) - ? OneofOptions.fromJSON(object.options) - : undefined, + name: isSet(object.name) ? globalThis.String(object.name) : "", + options: isSet(object.options) ? OneofOptions.fromJSON(object.options) : undefined, }; }, toJSON(message: OneofDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.options !== undefined) { @@ -2494,11 +2377,10 @@ export const OneofDescriptorProto = { }, fromPartial(object: DeepPartial): OneofDescriptorProto { const message = createBaseOneofDescriptorProto(); - message.name = object.name ?? ''; - message.options = - object.options !== undefined && object.options !== null - ? OneofOptions.fromPartial(object.options) - : undefined; + message.name = object.name ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? OneofOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -2507,8 +2389,8 @@ messageTypeRegistry.set(OneofDescriptorProto.$type, OneofDescriptorProto); function createBaseEnumDescriptorProto(): EnumDescriptorProto { return { - $type: 'google.protobuf.EnumDescriptorProto', - name: '', + $type: "google.protobuf.EnumDescriptorProto", + name: "", value: [], options: undefined, reservedRange: [], @@ -2517,13 +2399,10 @@ function createBaseEnumDescriptorProto(): EnumDescriptorProto { } export const EnumDescriptorProto = { - $type: 'google.protobuf.EnumDescriptorProto' as const, + $type: "google.protobuf.EnumDescriptorProto" as const, - encode( - message: EnumDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: EnumDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.value) { @@ -2533,10 +2412,7 @@ export const EnumDescriptorProto = { EnumOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } for (const v of message.reservedRange) { - EnumDescriptorProto_EnumReservedRange.encode( - v!, - writer.uint32(34).fork(), - ).ldelim(); + EnumDescriptorProto_EnumReservedRange.encode(v!, writer.uint32(34).fork()).ldelim(); } for (const v of message.reservedName) { writer.uint32(42).string(v!); @@ -2545,8 +2421,7 @@ export const EnumDescriptorProto = { }, decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumDescriptorProto(); while (reader.pos < end) { @@ -2564,9 +2439,7 @@ export const EnumDescriptorProto = { break; } - message.value.push( - EnumValueDescriptorProto.decode(reader, reader.uint32()), - ); + message.value.push(EnumValueDescriptorProto.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { @@ -2580,12 +2453,7 @@ export const EnumDescriptorProto = { break; } - message.reservedRange.push( - EnumDescriptorProto_EnumReservedRange.decode( - reader, - reader.uint32(), - ), - ); + message.reservedRange.push(EnumDescriptorProto_EnumReservedRange.decode(reader, reader.uint32())); continue; case 5: if (tag !== 42) { @@ -2606,17 +2474,13 @@ export const EnumDescriptorProto = { fromJSON(object: any): EnumDescriptorProto { return { $type: EnumDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", value: globalThis.Array.isArray(object?.value) ? object.value.map((e: any) => EnumValueDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) - ? EnumOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? EnumOptions.fromJSON(object.options) : undefined, reservedRange: globalThis.Array.isArray(object?.reservedRange) - ? object.reservedRange.map((e: any) => - EnumDescriptorProto_EnumReservedRange.fromJSON(e), - ) + ? object.reservedRange.map((e: any) => EnumDescriptorProto_EnumReservedRange.fromJSON(e)) : [], reservedName: globalThis.Array.isArray(object?.reservedName) ? object.reservedName.map((e: any) => globalThis.String(e)) @@ -2626,7 +2490,7 @@ export const EnumDescriptorProto = { toJSON(message: EnumDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.value?.length) { @@ -2636,9 +2500,7 @@ export const EnumDescriptorProto = { obj.options = EnumOptions.toJSON(message.options); } if (message.reservedRange?.length) { - obj.reservedRange = message.reservedRange.map((e) => - EnumDescriptorProto_EnumReservedRange.toJSON(e), - ); + obj.reservedRange = message.reservedRange.map((e) => EnumDescriptorProto_EnumReservedRange.toJSON(e)); } if (message.reservedName?.length) { obj.reservedName = message.reservedName; @@ -2651,17 +2513,13 @@ export const EnumDescriptorProto = { }, fromPartial(object: DeepPartial): EnumDescriptorProto { const message = createBaseEnumDescriptorProto(); - message.name = object.name ?? ''; - message.value = - object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? EnumOptions.fromPartial(object.options) - : undefined; - message.reservedRange = - object.reservedRange?.map((e) => - EnumDescriptorProto_EnumReservedRange.fromPartial(e), - ) || []; + message.name = object.name ?? ""; + message.value = object.value?.map((e) => EnumValueDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? EnumOptions.fromPartial(object.options) + : undefined; + message.reservedRange = object.reservedRange?.map((e) => EnumDescriptorProto_EnumReservedRange.fromPartial(e)) || + []; message.reservedName = object.reservedName?.map((e) => e) || []; return message; }, @@ -2670,20 +2528,13 @@ export const EnumDescriptorProto = { messageTypeRegistry.set(EnumDescriptorProto.$type, EnumDescriptorProto); function createBaseEnumDescriptorProto_EnumReservedRange(): EnumDescriptorProto_EnumReservedRange { - return { - $type: 'google.protobuf.EnumDescriptorProto.EnumReservedRange', - start: 0, - end: 0, - }; + return { $type: "google.protobuf.EnumDescriptorProto.EnumReservedRange", start: 0, end: 0 }; } export const EnumDescriptorProto_EnumReservedRange = { - $type: 'google.protobuf.EnumDescriptorProto.EnumReservedRange' as const, + $type: "google.protobuf.EnumDescriptorProto.EnumReservedRange" as const, - encode( - message: EnumDescriptorProto_EnumReservedRange, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: EnumDescriptorProto_EnumReservedRange, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.start !== undefined && message.start !== 0) { writer.uint32(8).int32(message.start); } @@ -2693,12 +2544,8 @@ export const EnumDescriptorProto_EnumReservedRange = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EnumDescriptorProto_EnumReservedRange { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): EnumDescriptorProto_EnumReservedRange { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumDescriptorProto_EnumReservedRange(); while (reader.pos < end) { @@ -2746,14 +2593,10 @@ export const EnumDescriptorProto_EnumReservedRange = { return obj; }, - create( - base?: DeepPartial, - ): EnumDescriptorProto_EnumReservedRange { + create(base?: DeepPartial): EnumDescriptorProto_EnumReservedRange { return EnumDescriptorProto_EnumReservedRange.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): EnumDescriptorProto_EnumReservedRange { + fromPartial(object: DeepPartial): EnumDescriptorProto_EnumReservedRange { const message = createBaseEnumDescriptorProto_EnumReservedRange(); message.start = object.start ?? 0; message.end = object.end ?? 0; @@ -2761,48 +2604,30 @@ export const EnumDescriptorProto_EnumReservedRange = { }, }; -messageTypeRegistry.set( - EnumDescriptorProto_EnumReservedRange.$type, - EnumDescriptorProto_EnumReservedRange, -); +messageTypeRegistry.set(EnumDescriptorProto_EnumReservedRange.$type, EnumDescriptorProto_EnumReservedRange); function createBaseEnumValueDescriptorProto(): EnumValueDescriptorProto { - return { - $type: 'google.protobuf.EnumValueDescriptorProto', - name: '', - number: 0, - options: undefined, - }; + return { $type: "google.protobuf.EnumValueDescriptorProto", name: "", number: 0, options: undefined }; } export const EnumValueDescriptorProto = { - $type: 'google.protobuf.EnumValueDescriptorProto' as const, + $type: "google.protobuf.EnumValueDescriptorProto" as const, - encode( - message: EnumValueDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: EnumValueDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } if (message.number !== undefined && message.number !== 0) { writer.uint32(16).int32(message.number); } if (message.options !== undefined) { - EnumValueOptions.encode( - message.options, - writer.uint32(26).fork(), - ).ldelim(); + EnumValueOptions.encode(message.options, writer.uint32(26).fork()).ldelim(); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): EnumValueDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumValueDescriptorProto(); while (reader.pos < end) { @@ -2841,17 +2666,15 @@ export const EnumValueDescriptorProto = { fromJSON(object: any): EnumValueDescriptorProto { return { $type: EnumValueDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", number: isSet(object.number) ? globalThis.Number(object.number) : 0, - options: isSet(object.options) - ? EnumValueOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? EnumValueOptions.fromJSON(object.options) : undefined, }; }, toJSON(message: EnumValueDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.number !== undefined && message.number !== 0) { @@ -2863,47 +2686,31 @@ export const EnumValueDescriptorProto = { return obj; }, - create( - base?: DeepPartial, - ): EnumValueDescriptorProto { + create(base?: DeepPartial): EnumValueDescriptorProto { return EnumValueDescriptorProto.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): EnumValueDescriptorProto { + fromPartial(object: DeepPartial): EnumValueDescriptorProto { const message = createBaseEnumValueDescriptorProto(); - message.name = object.name ?? ''; + message.name = object.name ?? ""; message.number = object.number ?? 0; - message.options = - object.options !== undefined && object.options !== null - ? EnumValueOptions.fromPartial(object.options) - : undefined; + message.options = (object.options !== undefined && object.options !== null) + ? EnumValueOptions.fromPartial(object.options) + : undefined; return message; }, }; -messageTypeRegistry.set( - EnumValueDescriptorProto.$type, - EnumValueDescriptorProto, -); +messageTypeRegistry.set(EnumValueDescriptorProto.$type, EnumValueDescriptorProto); function createBaseServiceDescriptorProto(): ServiceDescriptorProto { - return { - $type: 'google.protobuf.ServiceDescriptorProto', - name: '', - method: [], - options: undefined, - }; + return { $type: "google.protobuf.ServiceDescriptorProto", name: "", method: [], options: undefined }; } export const ServiceDescriptorProto = { - $type: 'google.protobuf.ServiceDescriptorProto' as const, + $type: "google.protobuf.ServiceDescriptorProto" as const, - encode( - message: ServiceDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: ServiceDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } for (const v of message.method) { @@ -2915,12 +2722,8 @@ export const ServiceDescriptorProto = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): ServiceDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): ServiceDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceDescriptorProto(); while (reader.pos < end) { @@ -2938,9 +2741,7 @@ export const ServiceDescriptorProto = { break; } - message.method.push( - MethodDescriptorProto.decode(reader, reader.uint32()), - ); + message.method.push(MethodDescriptorProto.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { @@ -2961,19 +2762,17 @@ export const ServiceDescriptorProto = { fromJSON(object: any): ServiceDescriptorProto { return { $type: ServiceDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', + name: isSet(object.name) ? globalThis.String(object.name) : "", method: globalThis.Array.isArray(object?.method) ? object.method.map((e: any) => MethodDescriptorProto.fromJSON(e)) : [], - options: isSet(object.options) - ? ServiceOptions.fromJSON(object.options) - : undefined, + options: isSet(object.options) ? ServiceOptions.fromJSON(object.options) : undefined, }; }, toJSON(message: ServiceDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } if (message.method?.length) { @@ -2988,17 +2787,13 @@ export const ServiceDescriptorProto = { create(base?: DeepPartial): ServiceDescriptorProto { return ServiceDescriptorProto.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): ServiceDescriptorProto { + fromPartial(object: DeepPartial): ServiceDescriptorProto { const message = createBaseServiceDescriptorProto(); - message.name = object.name ?? ''; - message.method = - object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; - message.options = - object.options !== undefined && object.options !== null - ? ServiceOptions.fromPartial(object.options) - : undefined; + message.name = object.name ?? ""; + message.method = object.method?.map((e) => MethodDescriptorProto.fromPartial(e)) || []; + message.options = (object.options !== undefined && object.options !== null) + ? ServiceOptions.fromPartial(object.options) + : undefined; return message; }, }; @@ -3007,10 +2802,10 @@ messageTypeRegistry.set(ServiceDescriptorProto.$type, ServiceDescriptorProto); function createBaseMethodDescriptorProto(): MethodDescriptorProto { return { - $type: 'google.protobuf.MethodDescriptorProto', - name: '', - inputType: '', - outputType: '', + $type: "google.protobuf.MethodDescriptorProto", + name: "", + inputType: "", + outputType: "", options: undefined, clientStreaming: false, serverStreaming: false, @@ -3018,45 +2813,32 @@ function createBaseMethodDescriptorProto(): MethodDescriptorProto { } export const MethodDescriptorProto = { - $type: 'google.protobuf.MethodDescriptorProto' as const, + $type: "google.protobuf.MethodDescriptorProto" as const, - encode( - message: MethodDescriptorProto, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.name !== undefined && message.name !== '') { + encode(message: MethodDescriptorProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.name !== undefined && message.name !== "") { writer.uint32(10).string(message.name); } - if (message.inputType !== undefined && message.inputType !== '') { + if (message.inputType !== undefined && message.inputType !== "") { writer.uint32(18).string(message.inputType); } - if (message.outputType !== undefined && message.outputType !== '') { + if (message.outputType !== undefined && message.outputType !== "") { writer.uint32(26).string(message.outputType); } if (message.options !== undefined) { MethodOptions.encode(message.options, writer.uint32(34).fork()).ldelim(); } - if ( - message.clientStreaming !== undefined && - message.clientStreaming !== false - ) { + if (message.clientStreaming !== undefined && message.clientStreaming !== false) { writer.uint32(40).bool(message.clientStreaming); } - if ( - message.serverStreaming !== undefined && - message.serverStreaming !== false - ) { + if (message.serverStreaming !== undefined && message.serverStreaming !== false) { writer.uint32(48).bool(message.serverStreaming); } return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): MethodDescriptorProto { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): MethodDescriptorProto { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMethodDescriptorProto(); while (reader.pos < end) { @@ -3116,49 +2898,33 @@ export const MethodDescriptorProto = { fromJSON(object: any): MethodDescriptorProto { return { $type: MethodDescriptorProto.$type, - name: isSet(object.name) ? globalThis.String(object.name) : '', - inputType: isSet(object.inputType) - ? globalThis.String(object.inputType) - : '', - outputType: isSet(object.outputType) - ? globalThis.String(object.outputType) - : '', - options: isSet(object.options) - ? MethodOptions.fromJSON(object.options) - : undefined, - clientStreaming: isSet(object.clientStreaming) - ? globalThis.Boolean(object.clientStreaming) - : false, - serverStreaming: isSet(object.serverStreaming) - ? globalThis.Boolean(object.serverStreaming) - : false, + name: isSet(object.name) ? globalThis.String(object.name) : "", + inputType: isSet(object.inputType) ? globalThis.String(object.inputType) : "", + outputType: isSet(object.outputType) ? globalThis.String(object.outputType) : "", + options: isSet(object.options) ? MethodOptions.fromJSON(object.options) : undefined, + clientStreaming: isSet(object.clientStreaming) ? globalThis.Boolean(object.clientStreaming) : false, + serverStreaming: isSet(object.serverStreaming) ? globalThis.Boolean(object.serverStreaming) : false, }; }, toJSON(message: MethodDescriptorProto): unknown { const obj: any = {}; - if (message.name !== undefined && message.name !== '') { + if (message.name !== undefined && message.name !== "") { obj.name = message.name; } - if (message.inputType !== undefined && message.inputType !== '') { + if (message.inputType !== undefined && message.inputType !== "") { obj.inputType = message.inputType; } - if (message.outputType !== undefined && message.outputType !== '') { + if (message.outputType !== undefined && message.outputType !== "") { obj.outputType = message.outputType; } if (message.options !== undefined) { obj.options = MethodOptions.toJSON(message.options); } - if ( - message.clientStreaming !== undefined && - message.clientStreaming !== false - ) { + if (message.clientStreaming !== undefined && message.clientStreaming !== false) { obj.clientStreaming = message.clientStreaming; } - if ( - message.serverStreaming !== undefined && - message.serverStreaming !== false - ) { + if (message.serverStreaming !== undefined && message.serverStreaming !== false) { obj.serverStreaming = message.serverStreaming; } return obj; @@ -3167,17 +2933,14 @@ export const MethodDescriptorProto = { create(base?: DeepPartial): MethodDescriptorProto { return MethodDescriptorProto.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): MethodDescriptorProto { + fromPartial(object: DeepPartial): MethodDescriptorProto { const message = createBaseMethodDescriptorProto(); - message.name = object.name ?? ''; - message.inputType = object.inputType ?? ''; - message.outputType = object.outputType ?? ''; - message.options = - object.options !== undefined && object.options !== null - ? MethodOptions.fromPartial(object.options) - : undefined; + message.name = object.name ?? ""; + message.inputType = object.inputType ?? ""; + message.outputType = object.outputType ?? ""; + message.options = (object.options !== undefined && object.options !== null) + ? MethodOptions.fromPartial(object.options) + : undefined; message.clientStreaming = object.clientStreaming ?? false; message.serverStreaming = object.serverStreaming ?? false; return message; @@ -3188,132 +2951,93 @@ messageTypeRegistry.set(MethodDescriptorProto.$type, MethodDescriptorProto); function createBaseFileOptions(): FileOptions { return { - $type: 'google.protobuf.FileOptions', - javaPackage: '', - javaOuterClassname: '', + $type: "google.protobuf.FileOptions", + javaPackage: "", + javaOuterClassname: "", javaMultipleFiles: false, javaGenerateEqualsAndHash: false, javaStringCheckUtf8: false, optimizeFor: 1, - goPackage: '', + goPackage: "", ccGenericServices: false, javaGenericServices: false, pyGenericServices: false, phpGenericServices: false, deprecated: false, ccEnableArenas: true, - objcClassPrefix: '', - csharpNamespace: '', - swiftPrefix: '', - phpClassPrefix: '', - phpNamespace: '', - phpMetadataNamespace: '', - rubyPackage: '', + objcClassPrefix: "", + csharpNamespace: "", + swiftPrefix: "", + phpClassPrefix: "", + phpNamespace: "", + phpMetadataNamespace: "", + rubyPackage: "", uninterpretedOption: [], }; } export const FileOptions = { - $type: 'google.protobuf.FileOptions' as const, + $type: "google.protobuf.FileOptions" as const, - encode( - message: FileOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.javaPackage !== undefined && message.javaPackage !== '') { + encode(message: FileOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.javaPackage !== undefined && message.javaPackage !== "") { writer.uint32(10).string(message.javaPackage); } - if ( - message.javaOuterClassname !== undefined && - message.javaOuterClassname !== '' - ) { + if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") { writer.uint32(66).string(message.javaOuterClassname); } - if ( - message.javaMultipleFiles !== undefined && - message.javaMultipleFiles !== false - ) { + if (message.javaMultipleFiles !== undefined && message.javaMultipleFiles !== false) { writer.uint32(80).bool(message.javaMultipleFiles); } - if ( - message.javaGenerateEqualsAndHash !== undefined && - message.javaGenerateEqualsAndHash !== false - ) { + if (message.javaGenerateEqualsAndHash !== undefined && message.javaGenerateEqualsAndHash !== false) { writer.uint32(160).bool(message.javaGenerateEqualsAndHash); } - if ( - message.javaStringCheckUtf8 !== undefined && - message.javaStringCheckUtf8 !== false - ) { + if (message.javaStringCheckUtf8 !== undefined && message.javaStringCheckUtf8 !== false) { writer.uint32(216).bool(message.javaStringCheckUtf8); } if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { writer.uint32(72).int32(message.optimizeFor); } - if (message.goPackage !== undefined && message.goPackage !== '') { + if (message.goPackage !== undefined && message.goPackage !== "") { writer.uint32(90).string(message.goPackage); } - if ( - message.ccGenericServices !== undefined && - message.ccGenericServices !== false - ) { + if (message.ccGenericServices !== undefined && message.ccGenericServices !== false) { writer.uint32(128).bool(message.ccGenericServices); } - if ( - message.javaGenericServices !== undefined && - message.javaGenericServices !== false - ) { + if (message.javaGenericServices !== undefined && message.javaGenericServices !== false) { writer.uint32(136).bool(message.javaGenericServices); } - if ( - message.pyGenericServices !== undefined && - message.pyGenericServices !== false - ) { + if (message.pyGenericServices !== undefined && message.pyGenericServices !== false) { writer.uint32(144).bool(message.pyGenericServices); } - if ( - message.phpGenericServices !== undefined && - message.phpGenericServices !== false - ) { + if (message.phpGenericServices !== undefined && message.phpGenericServices !== false) { writer.uint32(336).bool(message.phpGenericServices); } if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(184).bool(message.deprecated); } - if ( - message.ccEnableArenas !== undefined && - message.ccEnableArenas !== true - ) { + if (message.ccEnableArenas !== undefined && message.ccEnableArenas !== true) { writer.uint32(248).bool(message.ccEnableArenas); } - if ( - message.objcClassPrefix !== undefined && - message.objcClassPrefix !== '' - ) { + if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") { writer.uint32(290).string(message.objcClassPrefix); } - if ( - message.csharpNamespace !== undefined && - message.csharpNamespace !== '' - ) { + if (message.csharpNamespace !== undefined && message.csharpNamespace !== "") { writer.uint32(298).string(message.csharpNamespace); } - if (message.swiftPrefix !== undefined && message.swiftPrefix !== '') { + if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { writer.uint32(314).string(message.swiftPrefix); } - if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== '') { + if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== "") { writer.uint32(322).string(message.phpClassPrefix); } - if (message.phpNamespace !== undefined && message.phpNamespace !== '') { + if (message.phpNamespace !== undefined && message.phpNamespace !== "") { writer.uint32(330).string(message.phpNamespace); } - if ( - message.phpMetadataNamespace !== undefined && - message.phpMetadataNamespace !== '' - ) { + if (message.phpMetadataNamespace !== undefined && message.phpMetadataNamespace !== "") { writer.uint32(354).string(message.phpMetadataNamespace); } - if (message.rubyPackage !== undefined && message.rubyPackage !== '') { + if (message.rubyPackage !== undefined && message.rubyPackage !== "") { writer.uint32(362).string(message.rubyPackage); } for (const v of message.uninterpretedOption) { @@ -3323,8 +3047,7 @@ export const FileOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): FileOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFileOptions(); while (reader.pos < end) { @@ -3475,9 +3198,7 @@ export const FileOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -3491,176 +3212,98 @@ export const FileOptions = { fromJSON(object: any): FileOptions { return { $type: FileOptions.$type, - javaPackage: isSet(object.javaPackage) - ? globalThis.String(object.javaPackage) - : '', - javaOuterClassname: isSet(object.javaOuterClassname) - ? globalThis.String(object.javaOuterClassname) - : '', - javaMultipleFiles: isSet(object.javaMultipleFiles) - ? globalThis.Boolean(object.javaMultipleFiles) - : false, + javaPackage: isSet(object.javaPackage) ? globalThis.String(object.javaPackage) : "", + javaOuterClassname: isSet(object.javaOuterClassname) ? globalThis.String(object.javaOuterClassname) : "", + javaMultipleFiles: isSet(object.javaMultipleFiles) ? globalThis.Boolean(object.javaMultipleFiles) : false, javaGenerateEqualsAndHash: isSet(object.javaGenerateEqualsAndHash) ? globalThis.Boolean(object.javaGenerateEqualsAndHash) : false, - javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) - ? globalThis.Boolean(object.javaStringCheckUtf8) - : false, - optimizeFor: isSet(object.optimizeFor) - ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) - : 1, - goPackage: isSet(object.goPackage) - ? globalThis.String(object.goPackage) - : '', - ccGenericServices: isSet(object.ccGenericServices) - ? globalThis.Boolean(object.ccGenericServices) - : false, - javaGenericServices: isSet(object.javaGenericServices) - ? globalThis.Boolean(object.javaGenericServices) - : false, - pyGenericServices: isSet(object.pyGenericServices) - ? globalThis.Boolean(object.pyGenericServices) - : false, - phpGenericServices: isSet(object.phpGenericServices) - ? globalThis.Boolean(object.phpGenericServices) - : false, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, - ccEnableArenas: isSet(object.ccEnableArenas) - ? globalThis.Boolean(object.ccEnableArenas) - : true, - objcClassPrefix: isSet(object.objcClassPrefix) - ? globalThis.String(object.objcClassPrefix) - : '', - csharpNamespace: isSet(object.csharpNamespace) - ? globalThis.String(object.csharpNamespace) - : '', - swiftPrefix: isSet(object.swiftPrefix) - ? globalThis.String(object.swiftPrefix) - : '', - phpClassPrefix: isSet(object.phpClassPrefix) - ? globalThis.String(object.phpClassPrefix) - : '', - phpNamespace: isSet(object.phpNamespace) - ? globalThis.String(object.phpNamespace) - : '', - phpMetadataNamespace: isSet(object.phpMetadataNamespace) - ? globalThis.String(object.phpMetadataNamespace) - : '', - rubyPackage: isSet(object.rubyPackage) - ? globalThis.String(object.rubyPackage) - : '', + javaStringCheckUtf8: isSet(object.javaStringCheckUtf8) ? globalThis.Boolean(object.javaStringCheckUtf8) : false, + optimizeFor: isSet(object.optimizeFor) ? fileOptions_OptimizeModeFromJSON(object.optimizeFor) : 1, + goPackage: isSet(object.goPackage) ? globalThis.String(object.goPackage) : "", + ccGenericServices: isSet(object.ccGenericServices) ? globalThis.Boolean(object.ccGenericServices) : false, + javaGenericServices: isSet(object.javaGenericServices) ? globalThis.Boolean(object.javaGenericServices) : false, + pyGenericServices: isSet(object.pyGenericServices) ? globalThis.Boolean(object.pyGenericServices) : false, + phpGenericServices: isSet(object.phpGenericServices) ? globalThis.Boolean(object.phpGenericServices) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + ccEnableArenas: isSet(object.ccEnableArenas) ? globalThis.Boolean(object.ccEnableArenas) : true, + objcClassPrefix: isSet(object.objcClassPrefix) ? globalThis.String(object.objcClassPrefix) : "", + csharpNamespace: isSet(object.csharpNamespace) ? globalThis.String(object.csharpNamespace) : "", + swiftPrefix: isSet(object.swiftPrefix) ? globalThis.String(object.swiftPrefix) : "", + phpClassPrefix: isSet(object.phpClassPrefix) ? globalThis.String(object.phpClassPrefix) : "", + phpNamespace: isSet(object.phpNamespace) ? globalThis.String(object.phpNamespace) : "", + phpMetadataNamespace: isSet(object.phpMetadataNamespace) ? globalThis.String(object.phpMetadataNamespace) : "", + rubyPackage: isSet(object.rubyPackage) ? globalThis.String(object.rubyPackage) : "", uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message: FileOptions): unknown { const obj: any = {}; - if (message.javaPackage !== undefined && message.javaPackage !== '') { + if (message.javaPackage !== undefined && message.javaPackage !== "") { obj.javaPackage = message.javaPackage; } - if ( - message.javaOuterClassname !== undefined && - message.javaOuterClassname !== '' - ) { + if (message.javaOuterClassname !== undefined && message.javaOuterClassname !== "") { obj.javaOuterClassname = message.javaOuterClassname; } - if ( - message.javaMultipleFiles !== undefined && - message.javaMultipleFiles !== false - ) { + if (message.javaMultipleFiles !== undefined && message.javaMultipleFiles !== false) { obj.javaMultipleFiles = message.javaMultipleFiles; } - if ( - message.javaGenerateEqualsAndHash !== undefined && - message.javaGenerateEqualsAndHash !== false - ) { + if (message.javaGenerateEqualsAndHash !== undefined && message.javaGenerateEqualsAndHash !== false) { obj.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; } - if ( - message.javaStringCheckUtf8 !== undefined && - message.javaStringCheckUtf8 !== false - ) { + if (message.javaStringCheckUtf8 !== undefined && message.javaStringCheckUtf8 !== false) { obj.javaStringCheckUtf8 = message.javaStringCheckUtf8; } if (message.optimizeFor !== undefined && message.optimizeFor !== 1) { obj.optimizeFor = fileOptions_OptimizeModeToJSON(message.optimizeFor); } - if (message.goPackage !== undefined && message.goPackage !== '') { + if (message.goPackage !== undefined && message.goPackage !== "") { obj.goPackage = message.goPackage; } - if ( - message.ccGenericServices !== undefined && - message.ccGenericServices !== false - ) { + if (message.ccGenericServices !== undefined && message.ccGenericServices !== false) { obj.ccGenericServices = message.ccGenericServices; } - if ( - message.javaGenericServices !== undefined && - message.javaGenericServices !== false - ) { + if (message.javaGenericServices !== undefined && message.javaGenericServices !== false) { obj.javaGenericServices = message.javaGenericServices; } - if ( - message.pyGenericServices !== undefined && - message.pyGenericServices !== false - ) { + if (message.pyGenericServices !== undefined && message.pyGenericServices !== false) { obj.pyGenericServices = message.pyGenericServices; } - if ( - message.phpGenericServices !== undefined && - message.phpGenericServices !== false - ) { + if (message.phpGenericServices !== undefined && message.phpGenericServices !== false) { obj.phpGenericServices = message.phpGenericServices; } if (message.deprecated !== undefined && message.deprecated !== false) { obj.deprecated = message.deprecated; } - if ( - message.ccEnableArenas !== undefined && - message.ccEnableArenas !== true - ) { + if (message.ccEnableArenas !== undefined && message.ccEnableArenas !== true) { obj.ccEnableArenas = message.ccEnableArenas; } - if ( - message.objcClassPrefix !== undefined && - message.objcClassPrefix !== '' - ) { + if (message.objcClassPrefix !== undefined && message.objcClassPrefix !== "") { obj.objcClassPrefix = message.objcClassPrefix; } - if ( - message.csharpNamespace !== undefined && - message.csharpNamespace !== '' - ) { + if (message.csharpNamespace !== undefined && message.csharpNamespace !== "") { obj.csharpNamespace = message.csharpNamespace; } - if (message.swiftPrefix !== undefined && message.swiftPrefix !== '') { + if (message.swiftPrefix !== undefined && message.swiftPrefix !== "") { obj.swiftPrefix = message.swiftPrefix; } - if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== '') { + if (message.phpClassPrefix !== undefined && message.phpClassPrefix !== "") { obj.phpClassPrefix = message.phpClassPrefix; } - if (message.phpNamespace !== undefined && message.phpNamespace !== '') { + if (message.phpNamespace !== undefined && message.phpNamespace !== "") { obj.phpNamespace = message.phpNamespace; } - if ( - message.phpMetadataNamespace !== undefined && - message.phpMetadataNamespace !== '' - ) { + if (message.phpMetadataNamespace !== undefined && message.phpMetadataNamespace !== "") { obj.phpMetadataNamespace = message.phpMetadataNamespace; } - if (message.rubyPackage !== undefined && message.rubyPackage !== '') { + if (message.rubyPackage !== undefined && message.rubyPackage !== "") { obj.rubyPackage = message.rubyPackage; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -3670,31 +3313,27 @@ export const FileOptions = { }, fromPartial(object: DeepPartial): FileOptions { const message = createBaseFileOptions(); - message.javaPackage = object.javaPackage ?? ''; - message.javaOuterClassname = object.javaOuterClassname ?? ''; + message.javaPackage = object.javaPackage ?? ""; + message.javaOuterClassname = object.javaOuterClassname ?? ""; message.javaMultipleFiles = object.javaMultipleFiles ?? false; - message.javaGenerateEqualsAndHash = - object.javaGenerateEqualsAndHash ?? false; + message.javaGenerateEqualsAndHash = object.javaGenerateEqualsAndHash ?? false; message.javaStringCheckUtf8 = object.javaStringCheckUtf8 ?? false; message.optimizeFor = object.optimizeFor ?? 1; - message.goPackage = object.goPackage ?? ''; + message.goPackage = object.goPackage ?? ""; message.ccGenericServices = object.ccGenericServices ?? false; message.javaGenericServices = object.javaGenericServices ?? false; message.pyGenericServices = object.pyGenericServices ?? false; message.phpGenericServices = object.phpGenericServices ?? false; message.deprecated = object.deprecated ?? false; message.ccEnableArenas = object.ccEnableArenas ?? true; - message.objcClassPrefix = object.objcClassPrefix ?? ''; - message.csharpNamespace = object.csharpNamespace ?? ''; - message.swiftPrefix = object.swiftPrefix ?? ''; - message.phpClassPrefix = object.phpClassPrefix ?? ''; - message.phpNamespace = object.phpNamespace ?? ''; - message.phpMetadataNamespace = object.phpMetadataNamespace ?? ''; - message.rubyPackage = object.rubyPackage ?? ''; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.objcClassPrefix = object.objcClassPrefix ?? ""; + message.csharpNamespace = object.csharpNamespace ?? ""; + message.swiftPrefix = object.swiftPrefix ?? ""; + message.phpClassPrefix = object.phpClassPrefix ?? ""; + message.phpNamespace = object.phpNamespace ?? ""; + message.phpMetadataNamespace = object.phpMetadataNamespace ?? ""; + message.rubyPackage = object.rubyPackage ?? ""; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -3703,7 +3342,7 @@ messageTypeRegistry.set(FileOptions.$type, FileOptions); function createBaseMessageOptions(): MessageOptions { return { - $type: 'google.protobuf.MessageOptions', + $type: "google.protobuf.MessageOptions", messageSetWireFormat: false, noStandardDescriptorAccessor: false, deprecated: false, @@ -3713,22 +3352,13 @@ function createBaseMessageOptions(): MessageOptions { } export const MessageOptions = { - $type: 'google.protobuf.MessageOptions' as const, - - encode( - message: MessageOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if ( - message.messageSetWireFormat !== undefined && - message.messageSetWireFormat !== false - ) { + $type: "google.protobuf.MessageOptions" as const, + + encode(message: MessageOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.messageSetWireFormat !== undefined && message.messageSetWireFormat !== false) { writer.uint32(8).bool(message.messageSetWireFormat); } - if ( - message.noStandardDescriptorAccessor !== undefined && - message.noStandardDescriptorAccessor !== false - ) { + if (message.noStandardDescriptorAccessor !== undefined && message.noStandardDescriptorAccessor !== false) { writer.uint32(16).bool(message.noStandardDescriptorAccessor); } if (message.deprecated !== undefined && message.deprecated !== false) { @@ -3744,8 +3374,7 @@ export const MessageOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MessageOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMessageOptions(); while (reader.pos < end) { @@ -3784,9 +3413,7 @@ export const MessageOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -3806,32 +3433,20 @@ export const MessageOptions = { noStandardDescriptorAccessor: isSet(object.noStandardDescriptorAccessor) ? globalThis.Boolean(object.noStandardDescriptorAccessor) : false, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, - mapEntry: isSet(object.mapEntry) - ? globalThis.Boolean(object.mapEntry) - : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, + mapEntry: isSet(object.mapEntry) ? globalThis.Boolean(object.mapEntry) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, toJSON(message: MessageOptions): unknown { const obj: any = {}; - if ( - message.messageSetWireFormat !== undefined && - message.messageSetWireFormat !== false - ) { + if (message.messageSetWireFormat !== undefined && message.messageSetWireFormat !== false) { obj.messageSetWireFormat = message.messageSetWireFormat; } - if ( - message.noStandardDescriptorAccessor !== undefined && - message.noStandardDescriptorAccessor !== false - ) { + if (message.noStandardDescriptorAccessor !== undefined && message.noStandardDescriptorAccessor !== false) { obj.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; } if (message.deprecated !== undefined && message.deprecated !== false) { @@ -3841,9 +3456,7 @@ export const MessageOptions = { obj.mapEntry = message.mapEntry; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -3854,14 +3467,10 @@ export const MessageOptions = { fromPartial(object: DeepPartial): MessageOptions { const message = createBaseMessageOptions(); message.messageSetWireFormat = object.messageSetWireFormat ?? false; - message.noStandardDescriptorAccessor = - object.noStandardDescriptorAccessor ?? false; + message.noStandardDescriptorAccessor = object.noStandardDescriptorAccessor ?? false; message.deprecated = object.deprecated ?? false; message.mapEntry = object.mapEntry ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -3870,7 +3479,7 @@ messageTypeRegistry.set(MessageOptions.$type, MessageOptions); function createBaseFieldOptions(): FieldOptions { return { - $type: 'google.protobuf.FieldOptions', + $type: "google.protobuf.FieldOptions", ctype: 0, packed: false, jstype: 0, @@ -3883,12 +3492,9 @@ function createBaseFieldOptions(): FieldOptions { } export const FieldOptions = { - $type: 'google.protobuf.FieldOptions' as const, + $type: "google.protobuf.FieldOptions" as const, - encode( - message: FieldOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: FieldOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.ctype !== undefined && message.ctype !== 0) { writer.uint32(8).int32(message.ctype); } @@ -3901,10 +3507,7 @@ export const FieldOptions = { if (message.lazy !== undefined && message.lazy !== false) { writer.uint32(40).bool(message.lazy); } - if ( - message.unverifiedLazy !== undefined && - message.unverifiedLazy !== false - ) { + if (message.unverifiedLazy !== undefined && message.unverifiedLazy !== false) { writer.uint32(120).bool(message.unverifiedLazy); } if (message.deprecated !== undefined && message.deprecated !== false) { @@ -3920,8 +3523,7 @@ export const FieldOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): FieldOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseFieldOptions(); while (reader.pos < end) { @@ -3981,9 +3583,7 @@ export const FieldOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -3999,21 +3599,13 @@ export const FieldOptions = { $type: FieldOptions.$type, ctype: isSet(object.ctype) ? fieldOptions_CTypeFromJSON(object.ctype) : 0, packed: isSet(object.packed) ? globalThis.Boolean(object.packed) : false, - jstype: isSet(object.jstype) - ? fieldOptions_JSTypeFromJSON(object.jstype) - : 0, + jstype: isSet(object.jstype) ? fieldOptions_JSTypeFromJSON(object.jstype) : 0, lazy: isSet(object.lazy) ? globalThis.Boolean(object.lazy) : false, - unverifiedLazy: isSet(object.unverifiedLazy) - ? globalThis.Boolean(object.unverifiedLazy) - : false, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, + unverifiedLazy: isSet(object.unverifiedLazy) ? globalThis.Boolean(object.unverifiedLazy) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, weak: isSet(object.weak) ? globalThis.Boolean(object.weak) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4032,10 +3624,7 @@ export const FieldOptions = { if (message.lazy !== undefined && message.lazy !== false) { obj.lazy = message.lazy; } - if ( - message.unverifiedLazy !== undefined && - message.unverifiedLazy !== false - ) { + if (message.unverifiedLazy !== undefined && message.unverifiedLazy !== false) { obj.unverifiedLazy = message.unverifiedLazy; } if (message.deprecated !== undefined && message.deprecated !== false) { @@ -4045,9 +3634,7 @@ export const FieldOptions = { obj.weak = message.weak; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4064,10 +3651,7 @@ export const FieldOptions = { message.unverifiedLazy = object.unverifiedLazy ?? false; message.deprecated = object.deprecated ?? false; message.weak = object.weak ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4075,16 +3659,13 @@ export const FieldOptions = { messageTypeRegistry.set(FieldOptions.$type, FieldOptions); function createBaseOneofOptions(): OneofOptions { - return { $type: 'google.protobuf.OneofOptions', uninterpretedOption: [] }; + return { $type: "google.protobuf.OneofOptions", uninterpretedOption: [] }; } export const OneofOptions = { - $type: 'google.protobuf.OneofOptions' as const, + $type: "google.protobuf.OneofOptions" as const, - encode( - message: OneofOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: OneofOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.uninterpretedOption) { UninterpretedOption.encode(v!, writer.uint32(7994).fork()).ldelim(); } @@ -4092,8 +3673,7 @@ export const OneofOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): OneofOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseOneofOptions(); while (reader.pos < end) { @@ -4104,9 +3684,7 @@ export const OneofOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4121,9 +3699,7 @@ export const OneofOptions = { return { $type: OneofOptions.$type, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4131,9 +3707,7 @@ export const OneofOptions = { toJSON(message: OneofOptions): unknown { const obj: any = {}; if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4143,10 +3717,7 @@ export const OneofOptions = { }, fromPartial(object: DeepPartial): OneofOptions { const message = createBaseOneofOptions(); - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4154,21 +3725,13 @@ export const OneofOptions = { messageTypeRegistry.set(OneofOptions.$type, OneofOptions); function createBaseEnumOptions(): EnumOptions { - return { - $type: 'google.protobuf.EnumOptions', - allowAlias: false, - deprecated: false, - uninterpretedOption: [], - }; + return { $type: "google.protobuf.EnumOptions", allowAlias: false, deprecated: false, uninterpretedOption: [] }; } export const EnumOptions = { - $type: 'google.protobuf.EnumOptions' as const, + $type: "google.protobuf.EnumOptions" as const, - encode( - message: EnumOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: EnumOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.allowAlias !== undefined && message.allowAlias !== false) { writer.uint32(16).bool(message.allowAlias); } @@ -4182,8 +3745,7 @@ export const EnumOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): EnumOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumOptions(); while (reader.pos < end) { @@ -4208,9 +3770,7 @@ export const EnumOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4224,16 +3784,10 @@ export const EnumOptions = { fromJSON(object: any): EnumOptions { return { $type: EnumOptions.$type, - allowAlias: isSet(object.allowAlias) - ? globalThis.Boolean(object.allowAlias) - : false, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, + allowAlias: isSet(object.allowAlias) ? globalThis.Boolean(object.allowAlias) : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4247,9 +3801,7 @@ export const EnumOptions = { obj.deprecated = message.deprecated; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4261,10 +3813,7 @@ export const EnumOptions = { const message = createBaseEnumOptions(); message.allowAlias = object.allowAlias ?? false; message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4272,20 +3821,13 @@ export const EnumOptions = { messageTypeRegistry.set(EnumOptions.$type, EnumOptions); function createBaseEnumValueOptions(): EnumValueOptions { - return { - $type: 'google.protobuf.EnumValueOptions', - deprecated: false, - uninterpretedOption: [], - }; + return { $type: "google.protobuf.EnumValueOptions", deprecated: false, uninterpretedOption: [] }; } export const EnumValueOptions = { - $type: 'google.protobuf.EnumValueOptions' as const, + $type: "google.protobuf.EnumValueOptions" as const, - encode( - message: EnumValueOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: EnumValueOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(8).bool(message.deprecated); } @@ -4296,8 +3838,7 @@ export const EnumValueOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): EnumValueOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEnumValueOptions(); while (reader.pos < end) { @@ -4315,9 +3856,7 @@ export const EnumValueOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4331,13 +3870,9 @@ export const EnumValueOptions = { fromJSON(object: any): EnumValueOptions { return { $type: EnumValueOptions.$type, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4348,9 +3883,7 @@ export const EnumValueOptions = { obj.deprecated = message.deprecated; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4361,10 +3894,7 @@ export const EnumValueOptions = { fromPartial(object: DeepPartial): EnumValueOptions { const message = createBaseEnumValueOptions(); message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4372,20 +3902,13 @@ export const EnumValueOptions = { messageTypeRegistry.set(EnumValueOptions.$type, EnumValueOptions); function createBaseServiceOptions(): ServiceOptions { - return { - $type: 'google.protobuf.ServiceOptions', - deprecated: false, - uninterpretedOption: [], - }; + return { $type: "google.protobuf.ServiceOptions", deprecated: false, uninterpretedOption: [] }; } export const ServiceOptions = { - $type: 'google.protobuf.ServiceOptions' as const, + $type: "google.protobuf.ServiceOptions" as const, - encode( - message: ServiceOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: ServiceOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(264).bool(message.deprecated); } @@ -4396,8 +3919,7 @@ export const ServiceOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): ServiceOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseServiceOptions(); while (reader.pos < end) { @@ -4415,9 +3937,7 @@ export const ServiceOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4431,13 +3951,9 @@ export const ServiceOptions = { fromJSON(object: any): ServiceOptions { return { $type: ServiceOptions.$type, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4448,9 +3964,7 @@ export const ServiceOptions = { obj.deprecated = message.deprecated; } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4461,10 +3975,7 @@ export const ServiceOptions = { fromPartial(object: DeepPartial): ServiceOptions { const message = createBaseServiceOptions(); message.deprecated = object.deprecated ?? false; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4472,28 +3983,17 @@ export const ServiceOptions = { messageTypeRegistry.set(ServiceOptions.$type, ServiceOptions); function createBaseMethodOptions(): MethodOptions { - return { - $type: 'google.protobuf.MethodOptions', - deprecated: false, - idempotencyLevel: 0, - uninterpretedOption: [], - }; + return { $type: "google.protobuf.MethodOptions", deprecated: false, idempotencyLevel: 0, uninterpretedOption: [] }; } export const MethodOptions = { - $type: 'google.protobuf.MethodOptions' as const, + $type: "google.protobuf.MethodOptions" as const, - encode( - message: MethodOptions, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: MethodOptions, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (message.deprecated !== undefined && message.deprecated !== false) { writer.uint32(264).bool(message.deprecated); } - if ( - message.idempotencyLevel !== undefined && - message.idempotencyLevel !== 0 - ) { + if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) { writer.uint32(272).int32(message.idempotencyLevel); } for (const v of message.uninterpretedOption) { @@ -4503,8 +4003,7 @@ export const MethodOptions = { }, decode(input: _m0.Reader | Uint8Array, length?: number): MethodOptions { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseMethodOptions(); while (reader.pos < end) { @@ -4529,9 +4028,7 @@ export const MethodOptions = { break; } - message.uninterpretedOption.push( - UninterpretedOption.decode(reader, reader.uint32()), - ); + message.uninterpretedOption.push(UninterpretedOption.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4545,16 +4042,12 @@ export const MethodOptions = { fromJSON(object: any): MethodOptions { return { $type: MethodOptions.$type, - deprecated: isSet(object.deprecated) - ? globalThis.Boolean(object.deprecated) - : false, + deprecated: isSet(object.deprecated) ? globalThis.Boolean(object.deprecated) : false, idempotencyLevel: isSet(object.idempotencyLevel) ? methodOptions_IdempotencyLevelFromJSON(object.idempotencyLevel) : 0, uninterpretedOption: globalThis.Array.isArray(object?.uninterpretedOption) - ? object.uninterpretedOption.map((e: any) => - UninterpretedOption.fromJSON(e), - ) + ? object.uninterpretedOption.map((e: any) => UninterpretedOption.fromJSON(e)) : [], }; }, @@ -4564,18 +4057,11 @@ export const MethodOptions = { if (message.deprecated !== undefined && message.deprecated !== false) { obj.deprecated = message.deprecated; } - if ( - message.idempotencyLevel !== undefined && - message.idempotencyLevel !== 0 - ) { - obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON( - message.idempotencyLevel, - ); + if (message.idempotencyLevel !== undefined && message.idempotencyLevel !== 0) { + obj.idempotencyLevel = methodOptions_IdempotencyLevelToJSON(message.idempotencyLevel); } if (message.uninterpretedOption?.length) { - obj.uninterpretedOption = message.uninterpretedOption.map((e) => - UninterpretedOption.toJSON(e), - ); + obj.uninterpretedOption = message.uninterpretedOption.map((e) => UninterpretedOption.toJSON(e)); } return obj; }, @@ -4587,10 +4073,7 @@ export const MethodOptions = { const message = createBaseMethodOptions(); message.deprecated = object.deprecated ?? false; message.idempotencyLevel = object.idempotencyLevel ?? 0; - message.uninterpretedOption = - object.uninterpretedOption?.map((e) => - UninterpretedOption.fromPartial(e), - ) || []; + message.uninterpretedOption = object.uninterpretedOption?.map((e) => UninterpretedOption.fromPartial(e)) || []; return message; }, }; @@ -4599,46 +4082,31 @@ messageTypeRegistry.set(MethodOptions.$type, MethodOptions); function createBaseUninterpretedOption(): UninterpretedOption { return { - $type: 'google.protobuf.UninterpretedOption', + $type: "google.protobuf.UninterpretedOption", name: [], - identifierValue: '', + identifierValue: "", positiveIntValue: Long.UZERO, negativeIntValue: Long.ZERO, doubleValue: 0, stringValue: new Uint8Array(0), - aggregateValue: '', + aggregateValue: "", }; } export const UninterpretedOption = { - $type: 'google.protobuf.UninterpretedOption' as const, + $type: "google.protobuf.UninterpretedOption" as const, - encode( - message: UninterpretedOption, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: UninterpretedOption, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.name) { - UninterpretedOption_NamePart.encode( - v!, - writer.uint32(18).fork(), - ).ldelim(); - } - if ( - message.identifierValue !== undefined && - message.identifierValue !== '' - ) { + UninterpretedOption_NamePart.encode(v!, writer.uint32(18).fork()).ldelim(); + } + if (message.identifierValue !== undefined && message.identifierValue !== "") { writer.uint32(26).string(message.identifierValue); } - if ( - message.positiveIntValue !== undefined && - !message.positiveIntValue.equals(Long.UZERO) - ) { + if (message.positiveIntValue !== undefined && !message.positiveIntValue.equals(Long.UZERO)) { writer.uint32(32).uint64(message.positiveIntValue); } - if ( - message.negativeIntValue !== undefined && - !message.negativeIntValue.equals(Long.ZERO) - ) { + if (message.negativeIntValue !== undefined && !message.negativeIntValue.equals(Long.ZERO)) { writer.uint32(40).int64(message.negativeIntValue); } if (message.doubleValue !== undefined && message.doubleValue !== 0) { @@ -4647,15 +4115,14 @@ export const UninterpretedOption = { if (message.stringValue !== undefined && message.stringValue.length !== 0) { writer.uint32(58).bytes(message.stringValue); } - if (message.aggregateValue !== undefined && message.aggregateValue !== '') { + if (message.aggregateValue !== undefined && message.aggregateValue !== "") { writer.uint32(66).string(message.aggregateValue); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUninterpretedOption(); while (reader.pos < end) { @@ -4666,9 +4133,7 @@ export const UninterpretedOption = { break; } - message.name.push( - UninterpretedOption_NamePart.decode(reader, reader.uint32()), - ); + message.name.push(UninterpretedOption_NamePart.decode(reader, reader.uint32())); continue; case 3: if (tag !== 26) { @@ -4727,52 +4192,27 @@ export const UninterpretedOption = { name: globalThis.Array.isArray(object?.name) ? object.name.map((e: any) => UninterpretedOption_NamePart.fromJSON(e)) : [], - identifierValue: isSet(object.identifierValue) - ? globalThis.String(object.identifierValue) - : '', - positiveIntValue: isSet(object.positiveIntValue) - ? Long.fromValue(object.positiveIntValue) - : Long.UZERO, - negativeIntValue: isSet(object.negativeIntValue) - ? Long.fromValue(object.negativeIntValue) - : Long.ZERO, - doubleValue: isSet(object.doubleValue) - ? globalThis.Number(object.doubleValue) - : 0, - stringValue: isSet(object.stringValue) - ? bytesFromBase64(object.stringValue) - : new Uint8Array(0), - aggregateValue: isSet(object.aggregateValue) - ? globalThis.String(object.aggregateValue) - : '', + identifierValue: isSet(object.identifierValue) ? globalThis.String(object.identifierValue) : "", + positiveIntValue: isSet(object.positiveIntValue) ? Long.fromValue(object.positiveIntValue) : Long.UZERO, + negativeIntValue: isSet(object.negativeIntValue) ? Long.fromValue(object.negativeIntValue) : Long.ZERO, + doubleValue: isSet(object.doubleValue) ? globalThis.Number(object.doubleValue) : 0, + stringValue: isSet(object.stringValue) ? bytesFromBase64(object.stringValue) : new Uint8Array(0), + aggregateValue: isSet(object.aggregateValue) ? globalThis.String(object.aggregateValue) : "", }; }, toJSON(message: UninterpretedOption): unknown { const obj: any = {}; if (message.name?.length) { - obj.name = message.name.map((e) => - UninterpretedOption_NamePart.toJSON(e), - ); - } - if ( - message.identifierValue !== undefined && - message.identifierValue !== '' - ) { + obj.name = message.name.map((e) => UninterpretedOption_NamePart.toJSON(e)); + } + if (message.identifierValue !== undefined && message.identifierValue !== "") { obj.identifierValue = message.identifierValue; } - if ( - message.positiveIntValue !== undefined && - !message.positiveIntValue.equals(Long.UZERO) - ) { - obj.positiveIntValue = ( - message.positiveIntValue || Long.UZERO - ).toString(); - } - if ( - message.negativeIntValue !== undefined && - !message.negativeIntValue.equals(Long.ZERO) - ) { + if (message.positiveIntValue !== undefined && !message.positiveIntValue.equals(Long.UZERO)) { + obj.positiveIntValue = (message.positiveIntValue || Long.UZERO).toString(); + } + if (message.negativeIntValue !== undefined && !message.negativeIntValue.equals(Long.ZERO)) { obj.negativeIntValue = (message.negativeIntValue || Long.ZERO).toString(); } if (message.doubleValue !== undefined && message.doubleValue !== 0) { @@ -4781,7 +4221,7 @@ export const UninterpretedOption = { if (message.stringValue !== undefined && message.stringValue.length !== 0) { obj.stringValue = base64FromBytes(message.stringValue); } - if (message.aggregateValue !== undefined && message.aggregateValue !== '') { + if (message.aggregateValue !== undefined && message.aggregateValue !== "") { obj.aggregateValue = message.aggregateValue; } return obj; @@ -4792,21 +4232,17 @@ export const UninterpretedOption = { }, fromPartial(object: DeepPartial): UninterpretedOption { const message = createBaseUninterpretedOption(); - message.name = - object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || - []; - message.identifierValue = object.identifierValue ?? ''; - message.positiveIntValue = - object.positiveIntValue !== undefined && object.positiveIntValue !== null - ? Long.fromValue(object.positiveIntValue) - : Long.UZERO; - message.negativeIntValue = - object.negativeIntValue !== undefined && object.negativeIntValue !== null - ? Long.fromValue(object.negativeIntValue) - : Long.ZERO; + message.name = object.name?.map((e) => UninterpretedOption_NamePart.fromPartial(e)) || []; + message.identifierValue = object.identifierValue ?? ""; + message.positiveIntValue = (object.positiveIntValue !== undefined && object.positiveIntValue !== null) + ? Long.fromValue(object.positiveIntValue) + : Long.UZERO; + message.negativeIntValue = (object.negativeIntValue !== undefined && object.negativeIntValue !== null) + ? Long.fromValue(object.negativeIntValue) + : Long.ZERO; message.doubleValue = object.doubleValue ?? 0; message.stringValue = object.stringValue ?? new Uint8Array(0); - message.aggregateValue = object.aggregateValue ?? ''; + message.aggregateValue = object.aggregateValue ?? ""; return message; }, }; @@ -4814,21 +4250,14 @@ export const UninterpretedOption = { messageTypeRegistry.set(UninterpretedOption.$type, UninterpretedOption); function createBaseUninterpretedOption_NamePart(): UninterpretedOption_NamePart { - return { - $type: 'google.protobuf.UninterpretedOption.NamePart', - namePart: '', - isExtension: false, - }; + return { $type: "google.protobuf.UninterpretedOption.NamePart", namePart: "", isExtension: false }; } export const UninterpretedOption_NamePart = { - $type: 'google.protobuf.UninterpretedOption.NamePart' as const, + $type: "google.protobuf.UninterpretedOption.NamePart" as const, - encode( - message: UninterpretedOption_NamePart, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.namePart !== '') { + encode(message: UninterpretedOption_NamePart, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.namePart !== "") { writer.uint32(10).string(message.namePart); } if (message.isExtension !== false) { @@ -4837,12 +4266,8 @@ export const UninterpretedOption_NamePart = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): UninterpretedOption_NamePart { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): UninterpretedOption_NamePart { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseUninterpretedOption_NamePart(); while (reader.pos < end) { @@ -4874,18 +4299,14 @@ export const UninterpretedOption_NamePart = { fromJSON(object: any): UninterpretedOption_NamePart { return { $type: UninterpretedOption_NamePart.$type, - namePart: isSet(object.namePart) - ? globalThis.String(object.namePart) - : '', - isExtension: isSet(object.isExtension) - ? globalThis.Boolean(object.isExtension) - : false, + namePart: isSet(object.namePart) ? globalThis.String(object.namePart) : "", + isExtension: isSet(object.isExtension) ? globalThis.Boolean(object.isExtension) : false, }; }, toJSON(message: UninterpretedOption_NamePart): unknown { const obj: any = {}; - if (message.namePart !== '') { + if (message.namePart !== "") { obj.namePart = message.namePart; } if (message.isExtension !== false) { @@ -4894,37 +4315,27 @@ export const UninterpretedOption_NamePart = { return obj; }, - create( - base?: DeepPartial, - ): UninterpretedOption_NamePart { + create(base?: DeepPartial): UninterpretedOption_NamePart { return UninterpretedOption_NamePart.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): UninterpretedOption_NamePart { + fromPartial(object: DeepPartial): UninterpretedOption_NamePart { const message = createBaseUninterpretedOption_NamePart(); - message.namePart = object.namePart ?? ''; + message.namePart = object.namePart ?? ""; message.isExtension = object.isExtension ?? false; return message; }, }; -messageTypeRegistry.set( - UninterpretedOption_NamePart.$type, - UninterpretedOption_NamePart, -); +messageTypeRegistry.set(UninterpretedOption_NamePart.$type, UninterpretedOption_NamePart); function createBaseSourceCodeInfo(): SourceCodeInfo { - return { $type: 'google.protobuf.SourceCodeInfo', location: [] }; + return { $type: "google.protobuf.SourceCodeInfo", location: [] }; } export const SourceCodeInfo = { - $type: 'google.protobuf.SourceCodeInfo' as const, + $type: "google.protobuf.SourceCodeInfo" as const, - encode( - message: SourceCodeInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SourceCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.location) { SourceCodeInfo_Location.encode(v!, writer.uint32(10).fork()).ldelim(); } @@ -4932,8 +4343,7 @@ export const SourceCodeInfo = { }, decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSourceCodeInfo(); while (reader.pos < end) { @@ -4944,9 +4354,7 @@ export const SourceCodeInfo = { break; } - message.location.push( - SourceCodeInfo_Location.decode(reader, reader.uint32()), - ); + message.location.push(SourceCodeInfo_Location.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -4969,9 +4377,7 @@ export const SourceCodeInfo = { toJSON(message: SourceCodeInfo): unknown { const obj: any = {}; if (message.location?.length) { - obj.location = message.location.map((e) => - SourceCodeInfo_Location.toJSON(e), - ); + obj.location = message.location.map((e) => SourceCodeInfo_Location.toJSON(e)); } return obj; }, @@ -4981,8 +4387,7 @@ export const SourceCodeInfo = { }, fromPartial(object: DeepPartial): SourceCodeInfo { const message = createBaseSourceCodeInfo(); - message.location = - object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; + message.location = object.location?.map((e) => SourceCodeInfo_Location.fromPartial(e)) || []; return message; }, }; @@ -4991,22 +4396,19 @@ messageTypeRegistry.set(SourceCodeInfo.$type, SourceCodeInfo); function createBaseSourceCodeInfo_Location(): SourceCodeInfo_Location { return { - $type: 'google.protobuf.SourceCodeInfo.Location', + $type: "google.protobuf.SourceCodeInfo.Location", path: [], span: [], - leadingComments: '', - trailingComments: '', + leadingComments: "", + trailingComments: "", leadingDetachedComments: [], }; } export const SourceCodeInfo_Location = { - $type: 'google.protobuf.SourceCodeInfo.Location' as const, + $type: "google.protobuf.SourceCodeInfo.Location" as const, - encode( - message: SourceCodeInfo_Location, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: SourceCodeInfo_Location, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); @@ -5017,16 +4419,10 @@ export const SourceCodeInfo_Location = { writer.int32(v); } writer.ldelim(); - if ( - message.leadingComments !== undefined && - message.leadingComments !== '' - ) { + if (message.leadingComments !== undefined && message.leadingComments !== "") { writer.uint32(26).string(message.leadingComments); } - if ( - message.trailingComments !== undefined && - message.trailingComments !== '' - ) { + if (message.trailingComments !== undefined && message.trailingComments !== "") { writer.uint32(34).string(message.trailingComments); } for (const v of message.leadingDetachedComments) { @@ -5035,12 +4431,8 @@ export const SourceCodeInfo_Location = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): SourceCodeInfo_Location { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): SourceCodeInfo_Location { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseSourceCodeInfo_Location(); while (reader.pos < end) { @@ -5113,21 +4505,11 @@ export const SourceCodeInfo_Location = { fromJSON(object: any): SourceCodeInfo_Location { return { $type: SourceCodeInfo_Location.$type, - path: globalThis.Array.isArray(object?.path) - ? object.path.map((e: any) => globalThis.Number(e)) - : [], - span: globalThis.Array.isArray(object?.span) - ? object.span.map((e: any) => globalThis.Number(e)) - : [], - leadingComments: isSet(object.leadingComments) - ? globalThis.String(object.leadingComments) - : '', - trailingComments: isSet(object.trailingComments) - ? globalThis.String(object.trailingComments) - : '', - leadingDetachedComments: globalThis.Array.isArray( - object?.leadingDetachedComments, - ) + path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [], + span: globalThis.Array.isArray(object?.span) ? object.span.map((e: any) => globalThis.Number(e)) : [], + leadingComments: isSet(object.leadingComments) ? globalThis.String(object.leadingComments) : "", + trailingComments: isSet(object.trailingComments) ? globalThis.String(object.trailingComments) : "", + leadingDetachedComments: globalThis.Array.isArray(object?.leadingDetachedComments) ? object.leadingDetachedComments.map((e: any) => globalThis.String(e)) : [], }; @@ -5141,16 +4523,10 @@ export const SourceCodeInfo_Location = { if (message.span?.length) { obj.span = message.span.map((e) => Math.round(e)); } - if ( - message.leadingComments !== undefined && - message.leadingComments !== '' - ) { + if (message.leadingComments !== undefined && message.leadingComments !== "") { obj.leadingComments = message.leadingComments; } - if ( - message.trailingComments !== undefined && - message.trailingComments !== '' - ) { + if (message.trailingComments !== undefined && message.trailingComments !== "") { obj.trailingComments = message.trailingComments; } if (message.leadingDetachedComments?.length) { @@ -5162,16 +4538,13 @@ export const SourceCodeInfo_Location = { create(base?: DeepPartial): SourceCodeInfo_Location { return SourceCodeInfo_Location.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): SourceCodeInfo_Location { + fromPartial(object: DeepPartial): SourceCodeInfo_Location { const message = createBaseSourceCodeInfo_Location(); message.path = object.path?.map((e) => e) || []; message.span = object.span?.map((e) => e) || []; - message.leadingComments = object.leadingComments ?? ''; - message.trailingComments = object.trailingComments ?? ''; - message.leadingDetachedComments = - object.leadingDetachedComments?.map((e) => e) || []; + message.leadingComments = object.leadingComments ?? ""; + message.trailingComments = object.trailingComments ?? ""; + message.leadingDetachedComments = object.leadingDetachedComments?.map((e) => e) || []; return message; }, }; @@ -5179,28 +4552,21 @@ export const SourceCodeInfo_Location = { messageTypeRegistry.set(SourceCodeInfo_Location.$type, SourceCodeInfo_Location); function createBaseGeneratedCodeInfo(): GeneratedCodeInfo { - return { $type: 'google.protobuf.GeneratedCodeInfo', annotation: [] }; + return { $type: "google.protobuf.GeneratedCodeInfo", annotation: [] }; } export const GeneratedCodeInfo = { - $type: 'google.protobuf.GeneratedCodeInfo' as const, + $type: "google.protobuf.GeneratedCodeInfo" as const, - encode( - message: GeneratedCodeInfo, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GeneratedCodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { for (const v of message.annotation) { - GeneratedCodeInfo_Annotation.encode( - v!, - writer.uint32(10).fork(), - ).ldelim(); + GeneratedCodeInfo_Annotation.encode(v!, writer.uint32(10).fork()).ldelim(); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGeneratedCodeInfo(); while (reader.pos < end) { @@ -5211,9 +4577,7 @@ export const GeneratedCodeInfo = { break; } - message.annotation.push( - GeneratedCodeInfo_Annotation.decode(reader, reader.uint32()), - ); + message.annotation.push(GeneratedCodeInfo_Annotation.decode(reader, reader.uint32())); continue; } if ((tag & 7) === 4 || tag === 0) { @@ -5228,9 +4592,7 @@ export const GeneratedCodeInfo = { return { $type: GeneratedCodeInfo.$type, annotation: globalThis.Array.isArray(object?.annotation) - ? object.annotation.map((e: any) => - GeneratedCodeInfo_Annotation.fromJSON(e), - ) + ? object.annotation.map((e: any) => GeneratedCodeInfo_Annotation.fromJSON(e)) : [], }; }, @@ -5238,9 +4600,7 @@ export const GeneratedCodeInfo = { toJSON(message: GeneratedCodeInfo): unknown { const obj: any = {}; if (message.annotation?.length) { - obj.annotation = message.annotation.map((e) => - GeneratedCodeInfo_Annotation.toJSON(e), - ); + obj.annotation = message.annotation.map((e) => GeneratedCodeInfo_Annotation.toJSON(e)); } return obj; }, @@ -5250,10 +4610,7 @@ export const GeneratedCodeInfo = { }, fromPartial(object: DeepPartial): GeneratedCodeInfo { const message = createBaseGeneratedCodeInfo(); - message.annotation = - object.annotation?.map((e) => - GeneratedCodeInfo_Annotation.fromPartial(e), - ) || []; + message.annotation = object.annotation?.map((e) => GeneratedCodeInfo_Annotation.fromPartial(e)) || []; return message; }, }; @@ -5261,28 +4618,19 @@ export const GeneratedCodeInfo = { messageTypeRegistry.set(GeneratedCodeInfo.$type, GeneratedCodeInfo); function createBaseGeneratedCodeInfo_Annotation(): GeneratedCodeInfo_Annotation { - return { - $type: 'google.protobuf.GeneratedCodeInfo.Annotation', - path: [], - sourceFile: '', - begin: 0, - end: 0, - }; + return { $type: "google.protobuf.GeneratedCodeInfo.Annotation", path: [], sourceFile: "", begin: 0, end: 0 }; } export const GeneratedCodeInfo_Annotation = { - $type: 'google.protobuf.GeneratedCodeInfo.Annotation' as const, + $type: "google.protobuf.GeneratedCodeInfo.Annotation" as const, - encode( - message: GeneratedCodeInfo_Annotation, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: GeneratedCodeInfo_Annotation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { writer.uint32(10).fork(); for (const v of message.path) { writer.int32(v); } writer.ldelim(); - if (message.sourceFile !== undefined && message.sourceFile !== '') { + if (message.sourceFile !== undefined && message.sourceFile !== "") { writer.uint32(18).string(message.sourceFile); } if (message.begin !== undefined && message.begin !== 0) { @@ -5294,12 +4642,8 @@ export const GeneratedCodeInfo_Annotation = { return writer; }, - decode( - input: _m0.Reader | Uint8Array, - length?: number, - ): GeneratedCodeInfo_Annotation { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + decode(input: _m0.Reader | Uint8Array, length?: number): GeneratedCodeInfo_Annotation { + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseGeneratedCodeInfo_Annotation(); while (reader.pos < end) { @@ -5355,12 +4699,8 @@ export const GeneratedCodeInfo_Annotation = { fromJSON(object: any): GeneratedCodeInfo_Annotation { return { $type: GeneratedCodeInfo_Annotation.$type, - path: globalThis.Array.isArray(object?.path) - ? object.path.map((e: any) => globalThis.Number(e)) - : [], - sourceFile: isSet(object.sourceFile) - ? globalThis.String(object.sourceFile) - : '', + path: globalThis.Array.isArray(object?.path) ? object.path.map((e: any) => globalThis.Number(e)) : [], + sourceFile: isSet(object.sourceFile) ? globalThis.String(object.sourceFile) : "", begin: isSet(object.begin) ? globalThis.Number(object.begin) : 0, end: isSet(object.end) ? globalThis.Number(object.end) : 0, }; @@ -5371,7 +4711,7 @@ export const GeneratedCodeInfo_Annotation = { if (message.path?.length) { obj.path = message.path.map((e) => Math.round(e)); } - if (message.sourceFile !== undefined && message.sourceFile !== '') { + if (message.sourceFile !== undefined && message.sourceFile !== "") { obj.sourceFile = message.sourceFile; } if (message.begin !== undefined && message.begin !== 0) { @@ -5383,31 +4723,24 @@ export const GeneratedCodeInfo_Annotation = { return obj; }, - create( - base?: DeepPartial, - ): GeneratedCodeInfo_Annotation { + create(base?: DeepPartial): GeneratedCodeInfo_Annotation { return GeneratedCodeInfo_Annotation.fromPartial(base ?? {}); }, - fromPartial( - object: DeepPartial, - ): GeneratedCodeInfo_Annotation { + fromPartial(object: DeepPartial): GeneratedCodeInfo_Annotation { const message = createBaseGeneratedCodeInfo_Annotation(); message.path = object.path?.map((e) => e) || []; - message.sourceFile = object.sourceFile ?? ''; + message.sourceFile = object.sourceFile ?? ""; message.begin = object.begin ?? 0; message.end = object.end ?? 0; return message; }, }; -messageTypeRegistry.set( - GeneratedCodeInfo_Annotation.$type, - GeneratedCodeInfo_Annotation, -); +messageTypeRegistry.set(GeneratedCodeInfo_Annotation.$type, GeneratedCodeInfo_Annotation); function bytesFromBase64(b64: string): Uint8Array { if ((globalThis as any).Buffer) { - return Uint8Array.from(globalThis.Buffer.from(b64, 'base64')); + return Uint8Array.from(globalThis.Buffer.from(b64, "base64")); } else { const bin = globalThis.atob(b64); const arr = new Uint8Array(bin.length); @@ -5420,36 +4753,23 @@ function bytesFromBase64(b64: string): Uint8Array { function base64FromBytes(arr: Uint8Array): string { if ((globalThis as any).Buffer) { - return globalThis.Buffer.from(arr).toString('base64'); + return globalThis.Buffer.from(arr).toString("base64"); } else { const bin: string[] = []; arr.forEach((byte) => { bin.push(globalThis.String.fromCharCode(byte)); }); - return globalThis.btoa(bin.join('')); + return globalThis.btoa(bin.join("")); } } -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; - -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; + +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/google/protobuf/empty.ts b/ts/src/generated/google/protobuf/empty.ts index e6397d8e..8cc6f414 100644 --- a/ts/src/generated/google/protobuf/empty.ts +++ b/ts/src/generated/google/protobuf/empty.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../typeRegistry"; /** * A generic empty message that you can re-use to avoid defining duplicated @@ -13,23 +13,22 @@ import { messageTypeRegistry } from '../../typeRegistry'; * } */ export interface Empty { - $type: 'google.protobuf.Empty'; + $type: "google.protobuf.Empty"; } function createBaseEmpty(): Empty { - return { $type: 'google.protobuf.Empty' }; + return { $type: "google.protobuf.Empty" }; } export const Empty = { - $type: 'google.protobuf.Empty' as const, + $type: "google.protobuf.Empty" as const, encode(_: Empty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Empty { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseEmpty(); while (reader.pos < end) { @@ -64,26 +63,13 @@ export const Empty = { messageTypeRegistry.set(Empty.$type, Empty); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/google/protobuf/timestamp.ts b/ts/src/generated/google/protobuf/timestamp.ts index 30335455..66cb086b 100644 --- a/ts/src/generated/google/protobuf/timestamp.ts +++ b/ts/src/generated/google/protobuf/timestamp.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../typeRegistry"; /** * A Timestamp represents a point in time independent of any time zone or local @@ -95,7 +95,7 @@ import { messageTypeRegistry } from '../../typeRegistry'; * ) to obtain a formatter capable of generating timestamps in this format. */ export interface Timestamp { - $type: 'google.protobuf.Timestamp'; + $type: "google.protobuf.Timestamp"; /** * Represents seconds of UTC time since Unix epoch * 1970-01-01T00:00:00Z. Must be from 0001-01-01T00:00:00Z to @@ -112,16 +112,13 @@ export interface Timestamp { } function createBaseTimestamp(): Timestamp { - return { $type: 'google.protobuf.Timestamp', seconds: Long.ZERO, nanos: 0 }; + return { $type: "google.protobuf.Timestamp", seconds: Long.ZERO, nanos: 0 }; } export const Timestamp = { - $type: 'google.protobuf.Timestamp' as const, + $type: "google.protobuf.Timestamp" as const, - encode( - message: Timestamp, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { + encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { if (!message.seconds.equals(Long.ZERO)) { writer.uint32(8).int64(message.seconds); } @@ -132,8 +129,7 @@ export const Timestamp = { }, decode(input: _m0.Reader | Uint8Array, length?: number): Timestamp { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseTimestamp(); while (reader.pos < end) { @@ -165,9 +161,7 @@ export const Timestamp = { fromJSON(object: any): Timestamp { return { $type: Timestamp.$type, - seconds: isSet(object.seconds) - ? Long.fromValue(object.seconds) - : Long.ZERO, + seconds: isSet(object.seconds) ? Long.fromValue(object.seconds) : Long.ZERO, nanos: isSet(object.nanos) ? globalThis.Number(object.nanos) : 0, }; }, @@ -188,10 +182,9 @@ export const Timestamp = { }, fromPartial(object: DeepPartial): Timestamp { const message = createBaseTimestamp(); - message.seconds = - object.seconds !== undefined && object.seconds !== null - ? Long.fromValue(object.seconds) - : Long.ZERO; + message.seconds = (object.seconds !== undefined && object.seconds !== null) + ? Long.fromValue(object.seconds) + : Long.ZERO; message.nanos = object.nanos ?? 0; return message; }, @@ -199,26 +192,13 @@ export const Timestamp = { messageTypeRegistry.set(Timestamp.$type, Timestamp); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/index.akash.audit.ts b/ts/src/generated/index.akash.audit.ts index 37c079ec..141b22fb 100644 --- a/ts/src/generated/index.akash.audit.ts +++ b/ts/src/generated/index.akash.audit.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.audit.v1beta3'; +export * as v1beta3 from "./index.akash.audit.v1beta3"; diff --git a/ts/src/generated/index.akash.audit.v1beta1.ts b/ts/src/generated/index.akash.audit.v1beta1.ts index 5d4f762f..0ef95141 100644 --- a/ts/src/generated/index.akash.audit.v1beta1.ts +++ b/ts/src/generated/index.akash.audit.v1beta1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/audit/v1beta1/audit'; +export * from "./akash/audit/v1beta1/audit"; diff --git a/ts/src/generated/index.akash.audit.v1beta2.ts b/ts/src/generated/index.akash.audit.v1beta2.ts index 55fe13fa..3eb52871 100644 --- a/ts/src/generated/index.akash.audit.v1beta2.ts +++ b/ts/src/generated/index.akash.audit.v1beta2.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/audit/v1beta2/audit'; -export * from './akash/audit/v1beta2/query'; -export * from './akash/audit/v1beta2/genesis'; +export * from "./akash/audit/v1beta2/audit"; +export * from "./akash/audit/v1beta2/query"; +export * from "./akash/audit/v1beta2/genesis"; diff --git a/ts/src/generated/index.akash.audit.v1beta3.ts b/ts/src/generated/index.akash.audit.v1beta3.ts index 8876fec9..96329323 100644 --- a/ts/src/generated/index.akash.audit.v1beta3.ts +++ b/ts/src/generated/index.akash.audit.v1beta3.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/audit/v1beta3/audit'; -export * from './akash/audit/v1beta3/query'; -export * from './akash/audit/v1beta3/genesis'; +export * from "./akash/audit/v1beta3/audit"; +export * from "./akash/audit/v1beta3/query"; +export * from "./akash/audit/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.base.ts b/ts/src/generated/index.akash.base.ts index e965921f..b44aa19f 100644 --- a/ts/src/generated/index.akash.base.ts +++ b/ts/src/generated/index.akash.base.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.base.v1beta3'; +export * as v1beta3 from "./index.akash.base.v1beta3"; diff --git a/ts/src/generated/index.akash.base.v1beta1.ts b/ts/src/generated/index.akash.base.v1beta1.ts index c67747f2..8d32351b 100644 --- a/ts/src/generated/index.akash.base.v1beta1.ts +++ b/ts/src/generated/index.akash.base.v1beta1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/base/v1beta1/attribute'; +export * from "./akash/base/v1beta1/attribute"; diff --git a/ts/src/generated/index.akash.base.v1beta2.ts b/ts/src/generated/index.akash.base.v1beta2.ts index d438b9fd..19a4fcc4 100644 --- a/ts/src/generated/index.akash.base.v1beta2.ts +++ b/ts/src/generated/index.akash.base.v1beta2.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -export * from './akash/base/v1beta2/attribute'; -export * from './akash/base/v1beta2/resourcevalue'; -export * from './akash/base/v1beta2/resource'; -export * from './akash/base/v1beta2/endpoint'; -export * from './akash/base/v1beta2/resourceunits'; +export * from "./akash/base/v1beta2/attribute"; +export * from "./akash/base/v1beta2/resourcevalue"; +export * from "./akash/base/v1beta2/resource"; +export * from "./akash/base/v1beta2/endpoint"; +export * from "./akash/base/v1beta2/resourceunits"; diff --git a/ts/src/generated/index.akash.base.v1beta3.ts b/ts/src/generated/index.akash.base.v1beta3.ts index 2cf462d6..a9744583 100644 --- a/ts/src/generated/index.akash.base.v1beta3.ts +++ b/ts/src/generated/index.akash.base.v1beta3.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/base/v1beta3/attribute'; +export * from "./akash/base/v1beta3/attribute"; diff --git a/ts/src/generated/index.akash.cert.ts b/ts/src/generated/index.akash.cert.ts index 5d815254..61bf67af 100644 --- a/ts/src/generated/index.akash.cert.ts +++ b/ts/src/generated/index.akash.cert.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.cert.v1beta3'; +export * as v1beta3 from "./index.akash.cert.v1beta3"; diff --git a/ts/src/generated/index.akash.cert.v1beta2.ts b/ts/src/generated/index.akash.cert.v1beta2.ts index c2342f0e..6893caa9 100644 --- a/ts/src/generated/index.akash.cert.v1beta2.ts +++ b/ts/src/generated/index.akash.cert.v1beta2.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/cert/v1beta2/cert'; -export * from './akash/cert/v1beta2/query'; -export * from './akash/cert/v1beta2/genesis'; +export * from "./akash/cert/v1beta2/cert"; +export * from "./akash/cert/v1beta2/query"; +export * from "./akash/cert/v1beta2/genesis"; diff --git a/ts/src/generated/index.akash.cert.v1beta3.ts b/ts/src/generated/index.akash.cert.v1beta3.ts index 9819c895..d83c7e9d 100644 --- a/ts/src/generated/index.akash.cert.v1beta3.ts +++ b/ts/src/generated/index.akash.cert.v1beta3.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/cert/v1beta3/cert'; -export * from './akash/cert/v1beta3/query'; -export * from './akash/cert/v1beta3/genesis'; +export * from "./akash/cert/v1beta3/cert"; +export * from "./akash/cert/v1beta3/query"; +export * from "./akash/cert/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.deployment.ts b/ts/src/generated/index.akash.deployment.ts index 190d7e31..f465693a 100644 --- a/ts/src/generated/index.akash.deployment.ts +++ b/ts/src/generated/index.akash.deployment.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.deployment.v1beta3'; +export * as v1beta3 from "./index.akash.deployment.v1beta3"; diff --git a/ts/src/generated/index.akash.deployment.v1beta1.ts b/ts/src/generated/index.akash.deployment.v1beta1.ts index dd4dc7c1..83fc7f47 100644 --- a/ts/src/generated/index.akash.deployment.v1beta1.ts +++ b/ts/src/generated/index.akash.deployment.v1beta1.ts @@ -1,8 +1,8 @@ /* eslint-disable */ -export * from './akash/deployment/v1beta1/group'; -export * from './akash/deployment/v1beta1/deployment'; -export * from './akash/deployment/v1beta1/query'; -export * from './akash/deployment/v1beta1/authz'; -export * from './akash/deployment/v1beta1/params'; -export * from './akash/deployment/v1beta1/genesis'; +export * from "./akash/deployment/v1beta1/group"; +export * from "./akash/deployment/v1beta1/deployment"; +export * from "./akash/deployment/v1beta1/query"; +export * from "./akash/deployment/v1beta1/authz"; +export * from "./akash/deployment/v1beta1/params"; +export * from "./akash/deployment/v1beta1/genesis"; diff --git a/ts/src/generated/index.akash.deployment.v1beta2.ts b/ts/src/generated/index.akash.deployment.v1beta2.ts index e26f02b2..56efdd96 100644 --- a/ts/src/generated/index.akash.deployment.v1beta2.ts +++ b/ts/src/generated/index.akash.deployment.v1beta2.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/deployment/v1beta2/resource'; -export * from './akash/deployment/v1beta2/groupspec'; +export * from "./akash/deployment/v1beta2/resource"; +export * from "./akash/deployment/v1beta2/groupspec"; diff --git a/ts/src/generated/index.akash.deployment.v1beta3.ts b/ts/src/generated/index.akash.deployment.v1beta3.ts index 5a03119c..27a505ec 100644 --- a/ts/src/generated/index.akash.deployment.v1beta3.ts +++ b/ts/src/generated/index.akash.deployment.v1beta3.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/deployment/v1beta3/resourceunit'; -export * from './akash/deployment/v1beta3/groupspec'; +export * from "./akash/deployment/v1beta3/resourceunit"; +export * from "./akash/deployment/v1beta3/groupspec"; diff --git a/ts/src/generated/index.akash.discovery.ts b/ts/src/generated/index.akash.discovery.ts index da67d129..8c69353e 100644 --- a/ts/src/generated/index.akash.discovery.ts +++ b/ts/src/generated/index.akash.discovery.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1 from './index.akash.discovery.v1'; +export * as v1 from "./index.akash.discovery.v1"; diff --git a/ts/src/generated/index.akash.discovery.v1.ts b/ts/src/generated/index.akash.discovery.v1.ts index 99d4d8f0..87078ad7 100644 --- a/ts/src/generated/index.akash.discovery.v1.ts +++ b/ts/src/generated/index.akash.discovery.v1.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/discovery/v1/client_info'; -export * from './akash/discovery/v1/akash'; +export * from "./akash/discovery/v1/client_info"; +export * from "./akash/discovery/v1/akash"; diff --git a/ts/src/generated/index.akash.escrow.ts b/ts/src/generated/index.akash.escrow.ts index b7e22927..f7417f29 100644 --- a/ts/src/generated/index.akash.escrow.ts +++ b/ts/src/generated/index.akash.escrow.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.escrow.v1beta3'; +export * as v1beta3 from "./index.akash.escrow.v1beta3"; diff --git a/ts/src/generated/index.akash.escrow.v1beta1.ts b/ts/src/generated/index.akash.escrow.v1beta1.ts index 7d8f486c..210052b4 100644 --- a/ts/src/generated/index.akash.escrow.v1beta1.ts +++ b/ts/src/generated/index.akash.escrow.v1beta1.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/escrow/v1beta1/types'; -export * from './akash/escrow/v1beta1/query'; -export * from './akash/escrow/v1beta1/genesis'; +export * from "./akash/escrow/v1beta1/types"; +export * from "./akash/escrow/v1beta1/query"; +export * from "./akash/escrow/v1beta1/genesis"; diff --git a/ts/src/generated/index.akash.escrow.v1beta2.ts b/ts/src/generated/index.akash.escrow.v1beta2.ts index 3bd20f91..62742fb3 100644 --- a/ts/src/generated/index.akash.escrow.v1beta2.ts +++ b/ts/src/generated/index.akash.escrow.v1beta2.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/escrow/v1beta2/types'; +export * from "./akash/escrow/v1beta2/types"; diff --git a/ts/src/generated/index.akash.escrow.v1beta3.ts b/ts/src/generated/index.akash.escrow.v1beta3.ts index f59c8375..cc6790cb 100644 --- a/ts/src/generated/index.akash.escrow.v1beta3.ts +++ b/ts/src/generated/index.akash.escrow.v1beta3.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/escrow/v1beta3/types'; +export * from "./akash/escrow/v1beta3/types"; diff --git a/ts/src/generated/index.akash.gov.ts b/ts/src/generated/index.akash.gov.ts index 2c6447d0..37710fa3 100644 --- a/ts/src/generated/index.akash.gov.ts +++ b/ts/src/generated/index.akash.gov.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.gov.v1beta3'; +export * as v1beta3 from "./index.akash.gov.v1beta3"; diff --git a/ts/src/generated/index.akash.gov.v1beta3.ts b/ts/src/generated/index.akash.gov.v1beta3.ts index c28e1215..1cd9917e 100644 --- a/ts/src/generated/index.akash.gov.v1beta3.ts +++ b/ts/src/generated/index.akash.gov.v1beta3.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/gov/v1beta3/params'; -export * from './akash/gov/v1beta3/genesis'; +export * from "./akash/gov/v1beta3/params"; +export * from "./akash/gov/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.inflation.ts b/ts/src/generated/index.akash.inflation.ts index 0170272b..2915a4da 100644 --- a/ts/src/generated/index.akash.inflation.ts +++ b/ts/src/generated/index.akash.inflation.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.inflation.v1beta3'; +export * as v1beta3 from "./index.akash.inflation.v1beta3"; diff --git a/ts/src/generated/index.akash.inflation.v1beta2.ts b/ts/src/generated/index.akash.inflation.v1beta2.ts index bc6bca94..5677f2ef 100644 --- a/ts/src/generated/index.akash.inflation.v1beta2.ts +++ b/ts/src/generated/index.akash.inflation.v1beta2.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/inflation/v1beta2/params'; -export * from './akash/inflation/v1beta2/genesis'; +export * from "./akash/inflation/v1beta2/params"; +export * from "./akash/inflation/v1beta2/genesis"; diff --git a/ts/src/generated/index.akash.inflation.v1beta3.ts b/ts/src/generated/index.akash.inflation.v1beta3.ts index 84098421..e0db2869 100644 --- a/ts/src/generated/index.akash.inflation.v1beta3.ts +++ b/ts/src/generated/index.akash.inflation.v1beta3.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/inflation/v1beta3/params'; -export * from './akash/inflation/v1beta3/genesis'; +export * from "./akash/inflation/v1beta3/params"; +export * from "./akash/inflation/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.inventory.ts b/ts/src/generated/index.akash.inventory.ts index ea6bc292..750ed3b8 100644 --- a/ts/src/generated/index.akash.inventory.ts +++ b/ts/src/generated/index.akash.inventory.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1 from './index.akash.inventory.v1'; +export * as v1 from "./index.akash.inventory.v1"; diff --git a/ts/src/generated/index.akash.inventory.v1.ts b/ts/src/generated/index.akash.inventory.v1.ts index ad2128e6..ca2226ce 100644 --- a/ts/src/generated/index.akash.inventory.v1.ts +++ b/ts/src/generated/index.akash.inventory.v1.ts @@ -1,10 +1,10 @@ /* eslint-disable */ -export * from './akash/inventory/v1/resourcepair'; -export * from './akash/inventory/v1/cpu'; -export * from './akash/inventory/v1/gpu'; -export * from './akash/inventory/v1/memory'; -export * from './akash/inventory/v1/resources'; -export * from './akash/inventory/v1/node'; -export * from './akash/inventory/v1/storage'; -export * from './akash/inventory/v1/cluster'; +export * from "./akash/inventory/v1/resourcepair"; +export * from "./akash/inventory/v1/cpu"; +export * from "./akash/inventory/v1/gpu"; +export * from "./akash/inventory/v1/memory"; +export * from "./akash/inventory/v1/resources"; +export * from "./akash/inventory/v1/node"; +export * from "./akash/inventory/v1/storage"; +export * from "./akash/inventory/v1/cluster"; diff --git a/ts/src/generated/index.akash.manifest.ts b/ts/src/generated/index.akash.manifest.ts index 2a11f395..05e87bdb 100644 --- a/ts/src/generated/index.akash.manifest.ts +++ b/ts/src/generated/index.akash.manifest.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v2beta2 from './index.akash.manifest.v2beta2'; +export * as v2beta2 from "./index.akash.manifest.v2beta2"; diff --git a/ts/src/generated/index.akash.manifest.v2beta1.ts b/ts/src/generated/index.akash.manifest.v2beta1.ts index 808eaca1..2871a316 100644 --- a/ts/src/generated/index.akash.manifest.v2beta1.ts +++ b/ts/src/generated/index.akash.manifest.v2beta1.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export * from './akash/manifest/v2beta1/httpoptions'; -export * from './akash/manifest/v2beta1/serviceexpose'; -export * from './akash/manifest/v2beta1/service'; -export * from './akash/manifest/v2beta1/group'; +export * from "./akash/manifest/v2beta1/httpoptions"; +export * from "./akash/manifest/v2beta1/serviceexpose"; +export * from "./akash/manifest/v2beta1/service"; +export * from "./akash/manifest/v2beta1/group"; diff --git a/ts/src/generated/index.akash.manifest.v2beta2.ts b/ts/src/generated/index.akash.manifest.v2beta2.ts index 52183d23..3c915f3c 100644 --- a/ts/src/generated/index.akash.manifest.v2beta2.ts +++ b/ts/src/generated/index.akash.manifest.v2beta2.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export * from './akash/manifest/v2beta2/httpoptions'; -export * from './akash/manifest/v2beta2/serviceexpose'; -export * from './akash/manifest/v2beta2/service'; -export * from './akash/manifest/v2beta2/group'; +export * from "./akash/manifest/v2beta2/httpoptions"; +export * from "./akash/manifest/v2beta2/serviceexpose"; +export * from "./akash/manifest/v2beta2/service"; +export * from "./akash/manifest/v2beta2/group"; diff --git a/ts/src/generated/index.akash.market.ts b/ts/src/generated/index.akash.market.ts index f1a6e476..d700a988 100644 --- a/ts/src/generated/index.akash.market.ts +++ b/ts/src/generated/index.akash.market.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta4 from './index.akash.market.v1beta4'; +export * as v1beta4 from "./index.akash.market.v1beta4"; diff --git a/ts/src/generated/index.akash.market.v1beta2.ts b/ts/src/generated/index.akash.market.v1beta2.ts index 7b4c3037..58a2bee2 100644 --- a/ts/src/generated/index.akash.market.v1beta2.ts +++ b/ts/src/generated/index.akash.market.v1beta2.ts @@ -1,9 +1,9 @@ /* eslint-disable */ -export * from './akash/market/v1beta2/order'; -export * from './akash/market/v1beta2/bid'; -export * from './akash/market/v1beta2/lease'; -export * from './akash/market/v1beta2/query'; -export * from './akash/market/v1beta2/service'; -export * from './akash/market/v1beta2/params'; -export * from './akash/market/v1beta2/genesis'; +export * from "./akash/market/v1beta2/order"; +export * from "./akash/market/v1beta2/bid"; +export * from "./akash/market/v1beta2/lease"; +export * from "./akash/market/v1beta2/query"; +export * from "./akash/market/v1beta2/service"; +export * from "./akash/market/v1beta2/params"; +export * from "./akash/market/v1beta2/genesis"; diff --git a/ts/src/generated/index.akash.market.v1beta3.ts b/ts/src/generated/index.akash.market.v1beta3.ts index d73e0677..aafe5c7f 100644 --- a/ts/src/generated/index.akash.market.v1beta3.ts +++ b/ts/src/generated/index.akash.market.v1beta3.ts @@ -1,9 +1,9 @@ /* eslint-disable */ -export * from './akash/market/v1beta3/order'; -export * from './akash/market/v1beta3/bid'; -export * from './akash/market/v1beta3/lease'; -export * from './akash/market/v1beta3/query'; -export * from './akash/market/v1beta3/service'; -export * from './akash/market/v1beta3/params'; -export * from './akash/market/v1beta3/genesis'; +export * from "./akash/market/v1beta3/order"; +export * from "./akash/market/v1beta3/bid"; +export * from "./akash/market/v1beta3/lease"; +export * from "./akash/market/v1beta3/query"; +export * from "./akash/market/v1beta3/service"; +export * from "./akash/market/v1beta3/params"; +export * from "./akash/market/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.market.v1beta4.ts b/ts/src/generated/index.akash.market.v1beta4.ts index ef2704c6..08971ecc 100644 --- a/ts/src/generated/index.akash.market.v1beta4.ts +++ b/ts/src/generated/index.akash.market.v1beta4.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/market/v1beta4/order'; -export * from './akash/market/v1beta4/bid'; -export * from './akash/market/v1beta4/lease'; +export * from "./akash/market/v1beta4/order"; +export * from "./akash/market/v1beta4/bid"; +export * from "./akash/market/v1beta4/lease"; diff --git a/ts/src/generated/index.akash.provider.lease.ts b/ts/src/generated/index.akash.provider.lease.ts index 50450842..b24a6a2a 100644 --- a/ts/src/generated/index.akash.provider.lease.ts +++ b/ts/src/generated/index.akash.provider.lease.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1 from './index.akash.provider.lease.v1'; +export * as v1 from "./index.akash.provider.lease.v1"; diff --git a/ts/src/generated/index.akash.provider.lease.v1.ts b/ts/src/generated/index.akash.provider.lease.v1.ts index 2dbd09a1..2346ab99 100644 --- a/ts/src/generated/index.akash.provider.lease.v1.ts +++ b/ts/src/generated/index.akash.provider.lease.v1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/provider/lease/v1/service'; +export * from "./akash/provider/lease/v1/service"; diff --git a/ts/src/generated/index.akash.provider.ts b/ts/src/generated/index.akash.provider.ts index 198b8082..1e96ea30 100644 --- a/ts/src/generated/index.akash.provider.ts +++ b/ts/src/generated/index.akash.provider.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1 from './index.akash.provider.v1'; +export * as v1 from "./index.akash.provider.v1"; diff --git a/ts/src/generated/index.akash.provider.v1.ts b/ts/src/generated/index.akash.provider.v1.ts index 126071f4..3e17ac05 100644 --- a/ts/src/generated/index.akash.provider.v1.ts +++ b/ts/src/generated/index.akash.provider.v1.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/provider/v1/status'; -export * from './akash/provider/v1/service'; +export * from "./akash/provider/v1/status"; +export * from "./akash/provider/v1/service"; diff --git a/ts/src/generated/index.akash.provider.v1beta1.ts b/ts/src/generated/index.akash.provider.v1beta1.ts index 22299afe..75847877 100644 --- a/ts/src/generated/index.akash.provider.v1beta1.ts +++ b/ts/src/generated/index.akash.provider.v1beta1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './akash/provider/v1beta1/provider'; +export * from "./akash/provider/v1beta1/provider"; diff --git a/ts/src/generated/index.akash.provider.v1beta2.ts b/ts/src/generated/index.akash.provider.v1beta2.ts index 2e438380..4e755b71 100644 --- a/ts/src/generated/index.akash.provider.v1beta2.ts +++ b/ts/src/generated/index.akash.provider.v1beta2.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/provider/v1beta2/provider'; -export * from './akash/provider/v1beta2/query'; -export * from './akash/provider/v1beta2/genesis'; +export * from "./akash/provider/v1beta2/provider"; +export * from "./akash/provider/v1beta2/query"; +export * from "./akash/provider/v1beta2/genesis"; diff --git a/ts/src/generated/index.akash.provider.v1beta3.ts b/ts/src/generated/index.akash.provider.v1beta3.ts index a314cafe..1b43afa9 100644 --- a/ts/src/generated/index.akash.provider.v1beta3.ts +++ b/ts/src/generated/index.akash.provider.v1beta3.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/provider/v1beta3/provider'; -export * from './akash/provider/v1beta3/query'; -export * from './akash/provider/v1beta3/genesis'; +export * from "./akash/provider/v1beta3/provider"; +export * from "./akash/provider/v1beta3/query"; +export * from "./akash/provider/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.staking.ts b/ts/src/generated/index.akash.staking.ts index be6b24a4..4117c58f 100644 --- a/ts/src/generated/index.akash.staking.ts +++ b/ts/src/generated/index.akash.staking.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.staking.v1beta3'; +export * as v1beta3 from "./index.akash.staking.v1beta3"; diff --git a/ts/src/generated/index.akash.staking.v1beta3.ts b/ts/src/generated/index.akash.staking.v1beta3.ts index 7af44e48..30f96858 100644 --- a/ts/src/generated/index.akash.staking.v1beta3.ts +++ b/ts/src/generated/index.akash.staking.v1beta3.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './akash/staking/v1beta3/params'; -export * from './akash/staking/v1beta3/genesis'; +export * from "./akash/staking/v1beta3/params"; +export * from "./akash/staking/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.take.ts b/ts/src/generated/index.akash.take.ts index aace7c32..672b6a9a 100644 --- a/ts/src/generated/index.akash.take.ts +++ b/ts/src/generated/index.akash.take.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta3 from './index.akash.take.v1beta3'; +export * as v1beta3 from "./index.akash.take.v1beta3"; diff --git a/ts/src/generated/index.akash.take.v1beta3.ts b/ts/src/generated/index.akash.take.v1beta3.ts index 2f2e8d4e..9143e17e 100644 --- a/ts/src/generated/index.akash.take.v1beta3.ts +++ b/ts/src/generated/index.akash.take.v1beta3.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './akash/take/v1beta3/query'; -export * from './akash/take/v1beta3/params'; -export * from './akash/take/v1beta3/genesis'; +export * from "./akash/take/v1beta3/query"; +export * from "./akash/take/v1beta3/params"; +export * from "./akash/take/v1beta3/genesis"; diff --git a/ts/src/generated/index.akash.ts b/ts/src/generated/index.akash.ts index aaf6fb13..f680aefc 100644 --- a/ts/src/generated/index.akash.ts +++ b/ts/src/generated/index.akash.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * as base from './index.akash.base'; -export * as inventory from './index.akash.inventory'; -export * as provider from './index.akash.provider'; +export * as base from "./index.akash.base"; +export * as inventory from "./index.akash.inventory"; +export * as provider from "./index.akash.provider"; diff --git a/ts/src/generated/index.cosmos.base.query.ts b/ts/src/generated/index.cosmos.base.query.ts index 7689cb7e..e68b936a 100644 --- a/ts/src/generated/index.cosmos.base.query.ts +++ b/ts/src/generated/index.cosmos.base.query.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta1 from './index.cosmos.base.query.v1beta1'; +export * as v1beta1 from "./index.cosmos.base.query.v1beta1"; diff --git a/ts/src/generated/index.cosmos.base.query.v1beta1.ts b/ts/src/generated/index.cosmos.base.query.v1beta1.ts index e023736f..e4d63a35 100644 --- a/ts/src/generated/index.cosmos.base.query.v1beta1.ts +++ b/ts/src/generated/index.cosmos.base.query.v1beta1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './cosmos/base/query/v1beta1/pagination'; +export * from "./cosmos/base/query/v1beta1/pagination"; diff --git a/ts/src/generated/index.cosmos.base.ts b/ts/src/generated/index.cosmos.base.ts index b6bf0117..897dbd1c 100644 --- a/ts/src/generated/index.cosmos.base.ts +++ b/ts/src/generated/index.cosmos.base.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as v1beta1 from './index.cosmos.base.v1beta1'; +export * as v1beta1 from "./index.cosmos.base.v1beta1"; diff --git a/ts/src/generated/index.cosmos.base.v1beta1.ts b/ts/src/generated/index.cosmos.base.v1beta1.ts index d7fa83fc..ea5040f3 100644 --- a/ts/src/generated/index.cosmos.base.v1beta1.ts +++ b/ts/src/generated/index.cosmos.base.v1beta1.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './cosmos/base/v1beta1/coin'; +export * from "./cosmos/base/v1beta1/coin"; diff --git a/ts/src/generated/index.cosmos.ts b/ts/src/generated/index.cosmos.ts index a42041df..23e88326 100644 --- a/ts/src/generated/index.cosmos.ts +++ b/ts/src/generated/index.cosmos.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as base from './index.cosmos.base'; +export * as base from "./index.cosmos.base"; diff --git a/ts/src/generated/index.cosmos_proto.ts b/ts/src/generated/index.cosmos_proto.ts index 2b35f928..74998ca7 100644 --- a/ts/src/generated/index.cosmos_proto.ts +++ b/ts/src/generated/index.cosmos_proto.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './cosmos_proto/cosmos'; +export * from "./cosmos_proto/cosmos"; diff --git a/ts/src/generated/index.gogoproto.ts b/ts/src/generated/index.gogoproto.ts index 1ce9f31f..87f6077e 100644 --- a/ts/src/generated/index.gogoproto.ts +++ b/ts/src/generated/index.gogoproto.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './gogoproto/gogo'; +export * from "./gogoproto/gogo"; diff --git a/ts/src/generated/index.google.api.ts b/ts/src/generated/index.google.api.ts index 795ac652..b1551d1a 100644 --- a/ts/src/generated/index.google.api.ts +++ b/ts/src/generated/index.google.api.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * from './google/api/http'; -export * from './google/api/annotations'; +export * from "./google/api/http"; +export * from "./google/api/annotations"; diff --git a/ts/src/generated/index.google.protobuf.ts b/ts/src/generated/index.google.protobuf.ts index e6dce13c..6a64e501 100644 --- a/ts/src/generated/index.google.protobuf.ts +++ b/ts/src/generated/index.google.protobuf.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -export * from './google/protobuf/timestamp'; -export * from './google/protobuf/descriptor'; -export * from './google/protobuf/empty'; +export * from "./google/protobuf/timestamp"; +export * from "./google/protobuf/descriptor"; +export * from "./google/protobuf/empty"; diff --git a/ts/src/generated/index.google.ts b/ts/src/generated/index.google.ts index a9d1a309..074cb468 100644 --- a/ts/src/generated/index.google.ts +++ b/ts/src/generated/index.google.ts @@ -1,4 +1,4 @@ /* eslint-disable */ -export * as protobuf from './index.google.protobuf'; -export * as api from './index.google.api'; +export * as protobuf from "./index.google.protobuf"; +export * as api from "./index.google.api"; diff --git a/ts/src/generated/index.k8s.io.apimachinery.pkg.api.resource.ts b/ts/src/generated/index.k8s.io.apimachinery.pkg.api.resource.ts index f334f735..80d7b3c8 100644 --- a/ts/src/generated/index.k8s.io.apimachinery.pkg.api.resource.ts +++ b/ts/src/generated/index.k8s.io.apimachinery.pkg.api.resource.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * from './k8s.io/apimachinery/pkg/api/resource/generated'; +export * from "./k8s.io/apimachinery/pkg/api/resource/generated"; diff --git a/ts/src/generated/index.k8s.io.apimachinery.pkg.api.ts b/ts/src/generated/index.k8s.io.apimachinery.pkg.api.ts index 67571a05..7ca1ac32 100644 --- a/ts/src/generated/index.k8s.io.apimachinery.pkg.api.ts +++ b/ts/src/generated/index.k8s.io.apimachinery.pkg.api.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as resource from './index.k8s.io.apimachinery.pkg.api.resource'; +export * as resource from "./index.k8s.io.apimachinery.pkg.api.resource"; diff --git a/ts/src/generated/index.k8s.io.apimachinery.pkg.ts b/ts/src/generated/index.k8s.io.apimachinery.pkg.ts index e0bb7725..132a6a60 100644 --- a/ts/src/generated/index.k8s.io.apimachinery.pkg.ts +++ b/ts/src/generated/index.k8s.io.apimachinery.pkg.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as api from './index.k8s.io.apimachinery.pkg.api'; +export * as api from "./index.k8s.io.apimachinery.pkg.api"; diff --git a/ts/src/generated/index.k8s.io.apimachinery.ts b/ts/src/generated/index.k8s.io.apimachinery.ts index ed2be4a7..123796f7 100644 --- a/ts/src/generated/index.k8s.io.apimachinery.ts +++ b/ts/src/generated/index.k8s.io.apimachinery.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as pkg from './index.k8s.io.apimachinery.pkg'; +export * as pkg from "./index.k8s.io.apimachinery.pkg"; diff --git a/ts/src/generated/index.k8s.io.ts b/ts/src/generated/index.k8s.io.ts index 2d9294a7..3b8034f0 100644 --- a/ts/src/generated/index.k8s.io.ts +++ b/ts/src/generated/index.k8s.io.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as apimachinery from './index.k8s.io.apimachinery'; +export * as apimachinery from "./index.k8s.io.apimachinery"; diff --git a/ts/src/generated/index.k8s.ts b/ts/src/generated/index.k8s.ts index 49e6dfe3..64fa0f3c 100644 --- a/ts/src/generated/index.k8s.ts +++ b/ts/src/generated/index.k8s.ts @@ -1,3 +1,3 @@ /* eslint-disable */ -export * as io from './index.k8s.io'; +export * as io from "./index.k8s.io"; diff --git a/ts/src/generated/index.ts b/ts/src/generated/index.ts index a51552b0..30153d27 100644 --- a/ts/src/generated/index.ts +++ b/ts/src/generated/index.ts @@ -1,6 +1,6 @@ /* eslint-disable */ -export * as google from './index.google'; -export * as gogoproto from './index.gogoproto'; -export * as akash from './index.akash'; -export * as k8s from './index.k8s'; +export * as google from "./index.google"; +export * as gogoproto from "./index.gogoproto"; +export * as akash from "./index.akash"; +export * as k8s from "./index.k8s"; diff --git a/ts/src/generated/k8s.io/apimachinery/pkg/api/resource/generated.ts b/ts/src/generated/k8s.io/apimachinery/pkg/api/resource/generated.ts index 813bbab9..5464eebd 100644 --- a/ts/src/generated/k8s.io/apimachinery/pkg/api/resource/generated.ts +++ b/ts/src/generated/k8s.io/apimachinery/pkg/api/resource/generated.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; -import { messageTypeRegistry } from '../../../../../typeRegistry'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; +import { messageTypeRegistry } from "../../../../../typeRegistry"; /** * Quantity is a fixed-point representation of a number. @@ -75,7 +75,7 @@ import { messageTypeRegistry } from '../../../../../typeRegistry'; * +k8s:openapi-gen=true */ export interface Quantity { - $type: 'k8s.io.apimachinery.pkg.api.resource.Quantity'; + $type: "k8s.io.apimachinery.pkg.api.resource.Quantity"; string?: string | undefined; } @@ -90,30 +90,26 @@ export interface Quantity { * +k8s:deepcopy-gen=true */ export interface QuantityValue { - $type: 'k8s.io.apimachinery.pkg.api.resource.QuantityValue'; + $type: "k8s.io.apimachinery.pkg.api.resource.QuantityValue"; string?: string | undefined; } function createBaseQuantity(): Quantity { - return { $type: 'k8s.io.apimachinery.pkg.api.resource.Quantity', string: '' }; + return { $type: "k8s.io.apimachinery.pkg.api.resource.Quantity", string: "" }; } export const Quantity = { - $type: 'k8s.io.apimachinery.pkg.api.resource.Quantity' as const, + $type: "k8s.io.apimachinery.pkg.api.resource.Quantity" as const, - encode( - message: Quantity, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.string !== undefined && message.string !== '') { + encode(message: Quantity, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.string !== undefined && message.string !== "") { writer.uint32(10).string(message.string); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): Quantity { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuantity(); while (reader.pos < end) { @@ -136,15 +132,12 @@ export const Quantity = { }, fromJSON(object: any): Quantity { - return { - $type: Quantity.$type, - string: isSet(object.string) ? globalThis.String(object.string) : '', - }; + return { $type: Quantity.$type, string: isSet(object.string) ? globalThis.String(object.string) : "" }; }, toJSON(message: Quantity): unknown { const obj: any = {}; - if (message.string !== undefined && message.string !== '') { + if (message.string !== undefined && message.string !== "") { obj.string = message.string; } return obj; @@ -155,7 +148,7 @@ export const Quantity = { }, fromPartial(object: DeepPartial): Quantity { const message = createBaseQuantity(); - message.string = object.string ?? ''; + message.string = object.string ?? ""; return message; }, }; @@ -163,28 +156,21 @@ export const Quantity = { messageTypeRegistry.set(Quantity.$type, Quantity); function createBaseQuantityValue(): QuantityValue { - return { - $type: 'k8s.io.apimachinery.pkg.api.resource.QuantityValue', - string: '', - }; + return { $type: "k8s.io.apimachinery.pkg.api.resource.QuantityValue", string: "" }; } export const QuantityValue = { - $type: 'k8s.io.apimachinery.pkg.api.resource.QuantityValue' as const, + $type: "k8s.io.apimachinery.pkg.api.resource.QuantityValue" as const, - encode( - message: QuantityValue, - writer: _m0.Writer = _m0.Writer.create(), - ): _m0.Writer { - if (message.string !== undefined && message.string !== '') { + encode(message: QuantityValue, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer { + if (message.string !== undefined && message.string !== "") { writer.uint32(10).string(message.string); } return writer; }, decode(input: _m0.Reader | Uint8Array, length?: number): QuantityValue { - const reader = - input instanceof _m0.Reader ? input : _m0.Reader.create(input); + const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input); let end = length === undefined ? reader.len : reader.pos + length; const message = createBaseQuantityValue(); while (reader.pos < end) { @@ -207,15 +193,12 @@ export const QuantityValue = { }, fromJSON(object: any): QuantityValue { - return { - $type: QuantityValue.$type, - string: isSet(object.string) ? globalThis.String(object.string) : '', - }; + return { $type: QuantityValue.$type, string: isSet(object.string) ? globalThis.String(object.string) : "" }; }, toJSON(message: QuantityValue): unknown { const obj: any = {}; - if (message.string !== undefined && message.string !== '') { + if (message.string !== undefined && message.string !== "") { obj.string = message.string; } return obj; @@ -226,33 +209,20 @@ export const QuantityValue = { }, fromPartial(object: DeepPartial): QuantityValue { const message = createBaseQuantityValue(); - message.string = object.string ?? ''; + message.string = object.string ?? ""; return message; }, }; messageTypeRegistry.set(QuantityValue.$type, QuantityValue); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial; if (_m0.util.Long !== Long) { _m0.util.Long = Long as any; diff --git a/ts/src/generated/typeRegistry.ts b/ts/src/generated/typeRegistry.ts index 28106cb0..af71a708 100644 --- a/ts/src/generated/typeRegistry.ts +++ b/ts/src/generated/typeRegistry.ts @@ -1,9 +1,9 @@ /* eslint-disable */ -import Long from 'long'; -import _m0 from 'protobufjs/minimal'; +import Long from "long"; +import _m0 from "protobufjs/minimal"; export interface MessageType { - $type: Message['$type']; + $type: Message["$type"]; encode(message: Message, writer?: _m0.Writer): _m0.Writer; decode(input: _m0.Reader | Uint8Array, length?: number): Message; fromJSON(object: any): Message; @@ -15,22 +15,9 @@ export type UnknownMessage = { $type: string }; export const messageTypeRegistry = new Map(); -type Builtin = - | Date - | Function - | Uint8Array - | string - | number - | boolean - | undefined; -type DeepPartial = T extends Builtin - ? T - : T extends Long - ? string | number | Long - : T extends globalThis.Array - ? globalThis.Array> - : T extends ReadonlyArray - ? ReadonlyArray> - : T extends {} - ? { [K in Exclude]?: DeepPartial } - : Partial; +type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; +type DeepPartial = T extends Builtin ? T + : T extends Long ? string | number | Long : T extends globalThis.Array ? globalThis.Array> + : T extends ReadonlyArray ? ReadonlyArray> + : T extends {} ? { [K in Exclude]?: DeepPartial } + : Partial;