diff --git a/packages/client-payments/src/gen-proto/nillion/meta/v1/msg_pay_for_pb.ts b/packages/client-payments/src/gen-proto/nillion/meta/v1/msg_pay_for_pb.ts new file mode 100644 index 0000000..1dba447 --- /dev/null +++ b/packages/client-payments/src/gen-proto/nillion/meta/v1/msg_pay_for_pb.ts @@ -0,0 +1,63 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/meta/v1/msg_pay_for.proto (package nillion.meta.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/meta/v1/msg_pay_for.proto. + */ +export const file_nillion_meta_v1_msg_pay_for: GenFile = /*@__PURE__*/ + fileDesc("CiFuaWxsaW9uL21ldGEvdjEvbXNnX3BheV9mb3IucHJvdG8SD25pbGxpb24ubWV0YS52MSJcCglNc2dQYXlGb3ISEAoIcmVzb3VyY2UYASABKAwSFAoMZnJvbV9hZGRyZXNzGAIgASgJEicKBmFtb3VudBgDIAMoCzIXLm5pbGxpb24ubWV0YS52MS5BbW91bnQiJwoGQW1vdW50Eg0KBWRlbm9tGAEgASgJEg4KBmFtb3VudBgCIAEoCUKDAQoTY29tLm5pbGxpb24ubWV0YS52MUIOTXNnUGF5Rm9yUHJvdG9QAaICA05NWKoCD05pbGxpb24uTWV0YS5WMcoCD05pbGxpb25cTWV0YVxWMeICG05pbGxpb25cTWV0YVxWMVxHUEJNZXRhZGF0YeoCEU5pbGxpb246Ok1ldGE6OlYxYgZwcm90bzM"); + +/** + * @generated from message nillion.meta.v1.MsgPayFor + */ +export type MsgPayFor = Message<"nillion.meta.v1.MsgPayFor"> & { + /** + * @generated from field: bytes resource = 1; + */ + resource: Uint8Array; + + /** + * @generated from field: string from_address = 2; + */ + fromAddress: string; + + /** + * @generated from field: repeated nillion.meta.v1.Amount amount = 3; + */ + amount: Amount[]; +}; + +/** + * Describes the message nillion.meta.v1.MsgPayFor. + * Use `create(MsgPayForSchema)` to create a new message. + */ +export const MsgPayForSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_meta_v1_msg_pay_for, 0); + +/** + * @generated from message nillion.meta.v1.Amount + */ +export type Amount = Message<"nillion.meta.v1.Amount"> & { + /** + * @generated from field: string denom = 1; + */ + denom: string; + + /** + * @generated from field: string amount = 2; + */ + amount: string; +}; + +/** + * Describes the message nillion.meta.v1.Amount. + * Use `create(AmountSchema)` to create a new message. + */ +export const AmountSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_meta_v1_msg_pay_for, 1); + diff --git a/packages/client-vms/src/gen-proto/nillion/auth/v1/public_key_pb.ts b/packages/client-vms/src/gen-proto/nillion/auth/v1/public_key_pb.ts new file mode 100644 index 0000000..6f6128b --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/auth/v1/public_key_pb.ts @@ -0,0 +1,77 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/auth/v1/public_key.proto (package nillion.auth.v1.public_key, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/auth/v1/public_key.proto. + */ +export const file_nillion_auth_v1_public_key: GenFile = /*@__PURE__*/ + fileDesc("CiBuaWxsaW9uL2F1dGgvdjEvcHVibGljX2tleS5wcm90bxIabmlsbGlvbi5hdXRoLnYxLnB1YmxpY19rZXkiWgoJUHVibGljS2V5EjsKCGtleV90eXBlGAEgASgOMikubmlsbGlvbi5hdXRoLnYxLnB1YmxpY19rZXkuUHVibGljS2V5VHlwZRIQCghjb250ZW50cxgCIAEoDCorCg1QdWJsaWNLZXlUeXBlEgsKB0VEMjU1MTkQABINCglTRUNQMjU2SzEQAUK4AQoeY29tLm5pbGxpb24uYXV0aC52MS5wdWJsaWNfa2V5Qg5QdWJsaWNLZXlQcm90b1ABogIETkFWUKoCGU5pbGxpb24uQXV0aC5WMS5QdWJsaWNLZXnKAhlOaWxsaW9uXEF1dGhcVjFcUHVibGljS2V54gIlTmlsbGlvblxBdXRoXFYxXFB1YmxpY0tleVxHUEJNZXRhZGF0YeoCHE5pbGxpb246OkF1dGg6OlYxOjpQdWJsaWNLZXliBnByb3RvMw"); + +/** + * A public key. + * + * Signatures associated to this public key must be a 64 bytes long sequence which is the result of the + * concatenation of the `r` and `s` scalars in the signature, each encoded in big endian. + * + * @generated from message nillion.auth.v1.public_key.PublicKey + */ +export type PublicKey = Message<"nillion.auth.v1.public_key.PublicKey"> & { + /** + * The type of this public key. + * + * @generated from field: nillion.auth.v1.public_key.PublicKeyType key_type = 1; + */ + keyType: PublicKeyType; + + /** + * The contents of this key. + * + * This is dependent on the `key_type` in this key: + * + * * For ED25519 it should be the curve point in its 32 byte compressed form. + * * For SECP256K1 it should be the curve point in its 33 byte compressed form. + * + * @generated from field: bytes contents = 2; + */ + contents: Uint8Array; +}; + +/** + * Describes the message nillion.auth.v1.public_key.PublicKey. + * Use `create(PublicKeySchema)` to create a new message. + */ +export const PublicKeySchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_auth_v1_public_key, 0); + +/** + * A public key type. + * + * @generated from enum nillion.auth.v1.public_key.PublicKeyType + */ +export enum PublicKeyType { + /** + * An ED25519 public key. + * + * @generated from enum value: ED25519 = 0; + */ + ED25519 = 0, + + /** + * A SECP256K1 public key. + * + * @generated from enum value: SECP256K1 = 1; + */ + SECP256K1 = 1, +} + +/** + * Describes the enum nillion.auth.v1.public_key.PublicKeyType. + */ +export const PublicKeyTypeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_nillion_auth_v1_public_key, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/auth/v1/token_pb.ts b/packages/client-vms/src/gen-proto/nillion/auth/v1/token_pb.ts new file mode 100644 index 0000000..da82839 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/auth/v1/token_pb.ts @@ -0,0 +1,96 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/auth/v1/token.proto (package nillion.auth.v1.token, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { PublicKey } from "./public_key_pb"; +import { file_nillion_auth_v1_public_key } from "./public_key_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/auth/v1/token.proto. + */ +export const file_nillion_auth_v1_token: GenFile = /*@__PURE__*/ + fileDesc("ChtuaWxsaW9uL2F1dGgvdjEvdG9rZW4ucHJvdG8SFW5pbGxpb24uYXV0aC52MS50b2tlbiJ1CgtTaWduZWRUb2tlbhIYChBzZXJpYWxpemVkX3Rva2VuGAEgASgMEjkKCnB1YmxpY19rZXkYAiABKAsyJS5uaWxsaW9uLmF1dGgudjEucHVibGljX2tleS5QdWJsaWNLZXkSEQoJc2lnbmF0dXJlGAMgASgMIl8KBVRva2VuEg0KBW5vbmNlGAEgASgMEhcKD3RhcmdldF9pZGVudGl0eRgCIAEoDBIuCgpleHBpcmVzX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcEKfAQoZY29tLm5pbGxpb24uYXV0aC52MS50b2tlbkIKVG9rZW5Qcm90b1ABogIETkFWVKoCFU5pbGxpb24uQXV0aC5WMS5Ub2tlbsoCFU5pbGxpb25cQXV0aFxWMVxUb2tlbuICIU5pbGxpb25cQXV0aFxWMVxUb2tlblxHUEJNZXRhZGF0YeoCGE5pbGxpb246OkF1dGg6OlYxOjpUb2tlbmIGcHJvdG8z", [file_google_protobuf_timestamp, file_nillion_auth_v1_public_key]); + +/** + * A signed authentication token. + * + * @generated from message nillion.auth.v1.token.SignedToken + */ +export type SignedToken = Message<"nillion.auth.v1.token.SignedToken"> & { + /** + * A `Token` serialized into bytes. + * + * @generated from field: bytes serialized_token = 1; + */ + serializedToken: Uint8Array; + + /** + * The public key for the private key this token is signed with. + * + * @generated from field: nillion.auth.v1.public_key.PublicKey public_key = 2; + */ + publicKey?: PublicKey; + + /** + * The serialized token signature. + * + * The signature must be generated using the private key corresponding to the `public_key` field + * over `sha256(serialized_token)`. + * + * @generated from field: bytes signature = 3; + */ + signature: Uint8Array; +}; + +/** + * Describes the message nillion.auth.v1.token.SignedToken. + * Use `create(SignedTokenSchema)` to create a new message. + */ +export const SignedTokenSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_auth_v1_token, 0); + +/** + * A token. + * + * @generated from message nillion.auth.v1.token.Token + */ +export type Token = Message<"nillion.auth.v1.token.Token"> & { + /** + * A nonce that adds entropy to this token. + * + * The nonce must be 32 bytes long and will be considered invalid otherwise. + * + * @generated from field: bytes nonce = 1; + */ + nonce: Uint8Array; + + /** + * The identifier of the node this token is meant to be used against. + * + * This needs to match the target node's identity for the token to be considered valid, and is used to prevent + * a node from taking the token and impersonating the user. + * + * @generated from field: bytes target_identity = 2; + */ + targetIdentity: Uint8Array; + + /** + * The timestamp at which this token expires. + * + * @generated from field: google.protobuf.Timestamp expires_at = 3; + */ + expiresAt?: Timestamp; +}; + +/** + * Describes the message nillion.auth.v1.token.Token. + * Use `create(TokenSchema)` to create a new message. + */ +export const TokenSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_auth_v1_token, 1); + diff --git a/packages/client-vms/src/gen-proto/nillion/compute/v1/invoke_pb.ts b/packages/client-vms/src/gen-proto/nillion/compute/v1/invoke_pb.ts new file mode 100644 index 0000000..60e96a2 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/compute/v1/invoke_pb.ts @@ -0,0 +1,144 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/compute/v1/invoke.proto (package nillion.compute.v1.invoke, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/compute/v1/invoke.proto. + */ +export const file_nillion_compute_v1_invoke: GenFile = /*@__PURE__*/ + fileDesc("Ch9uaWxsaW9uL2NvbXB1dGUvdjEvaW52b2tlLnByb3RvEhluaWxsaW9uLmNvbXB1dGUudjEuaW52b2tlIpMCChRJbnZva2VDb21wdXRlUmVxdWVzdBJCCg5zaWduZWRfcmVjZWlwdBgBIAEoCzIqLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5TaWduZWRSZWNlaXB0EhEKCXZhbHVlX2lkcxgCIAMoDBIWCg5iaW5jb2RlX3ZhbHVlcxgDIAEoDBJECg5pbnB1dF9iaW5kaW5ncxgEIAMoCzIsLm5pbGxpb24uY29tcHV0ZS52MS5pbnZva2UuSW5wdXRQYXJ0eUJpbmRpbmcSRgoPb3V0cHV0X2JpbmRpbmdzGAUgAygLMi0ubmlsbGlvbi5jb21wdXRlLnYxLmludm9rZS5PdXRwdXRQYXJ0eUJpbmRpbmciKwoVSW52b2tlQ29tcHV0ZVJlc3BvbnNlEhIKCmNvbXB1dGVfaWQYASABKAwiOAoRSW5wdXRQYXJ0eUJpbmRpbmcSEgoKcGFydHlfbmFtZRgBIAEoCRIPCgd1c2VyX2lkGAIgASgJIjoKEk91dHB1dFBhcnR5QmluZGluZxISCgpwYXJ0eV9uYW1lGAEgASgJEhAKCHVzZXJfaWRzGAIgAygJQrQBCh1jb20ubmlsbGlvbi5jb21wdXRlLnYxLmludm9rZUILSW52b2tlUHJvdG9QAaICBE5DVkmqAhlOaWxsaW9uLkNvbXB1dGUuVjEuSW52b2tlygIZTmlsbGlvblxDb21wdXRlXFYxXEludm9rZeICJU5pbGxpb25cQ29tcHV0ZVxWMVxJbnZva2VcR1BCTWV0YWRhdGHqAhxOaWxsaW9uOjpDb21wdXRlOjpWMTo6SW52b2tlYgZwcm90bzM", [file_nillion_payments_v1_receipt]); + +/** + * A request to invoke a computation. + * + * @generated from message nillion.compute.v1.invoke.InvokeComputeRequest + */ +export type InvokeComputeRequest = Message<"nillion.compute.v1.invoke.InvokeComputeRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `InvokeCompute` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; + + /** + * The value ids for previously stored values being used as parameters to this compute operation. + * + * @generated from field: repeated bytes value_ids = 2; + */ + valueIds: Uint8Array[]; + + /** + * The values being used as compute-time parameters, encoded in bincode format. + * + * @generated from field: bytes bincode_values = 3; + */ + bincodeValues: Uint8Array; + + /** + * The bindings that define which input party in the program is which user in the network. + * + * @generated from field: repeated nillion.compute.v1.invoke.InputPartyBinding input_bindings = 4; + */ + inputBindings: InputPartyBinding[]; + + /** + * The bindings that define which output party in the program is which users in the network. + * + * @generated from field: repeated nillion.compute.v1.invoke.OutputPartyBinding output_bindings = 5; + */ + outputBindings: OutputPartyBinding[]; +}; + +/** + * Describes the message nillion.compute.v1.invoke.InvokeComputeRequest. + * Use `create(InvokeComputeRequestSchema)` to create a new message. + */ +export const InvokeComputeRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_invoke, 0); + +/** + * A response to a request to invoke a computation. + * + * @generated from message nillion.compute.v1.invoke.InvokeComputeResponse + */ +export type InvokeComputeResponse = Message<"nillion.compute.v1.invoke.InvokeComputeResponse"> & { + /** + * An identifier for the execution of the computation. + * + * @generated from field: bytes compute_id = 1; + */ + computeId: Uint8Array; +}; + +/** + * Describes the message nillion.compute.v1.invoke.InvokeComputeResponse. + * Use `create(InvokeComputeResponseSchema)` to create a new message. + */ +export const InvokeComputeResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_invoke, 1); + +/** + * The bindings for input parties in this program. + * + * @generated from message nillion.compute.v1.invoke.InputPartyBinding + */ +export type InputPartyBinding = Message<"nillion.compute.v1.invoke.InputPartyBinding"> & { + /** + * The name of the party as defined in the program. + * + * @generated from field: string party_name = 1; + */ + partyName: string; + + /** + * The user identity this party is being bound to. + * + * @generated from field: string user_id = 2; + */ + userId: string; +}; + +/** + * Describes the message nillion.compute.v1.invoke.InputPartyBinding. + * Use `create(InputPartyBindingSchema)` to create a new message. + */ +export const InputPartyBindingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_invoke, 2); + +/** + * The bindings for output parties in this program. + * + * @generated from message nillion.compute.v1.invoke.OutputPartyBinding + */ +export type OutputPartyBinding = Message<"nillion.compute.v1.invoke.OutputPartyBinding"> & { + /** + * The name of the party as defined in the program. + * + * @generated from field: string party_name = 1; + */ + partyName: string; + + /** + * The user identities this party is being bound to. + * + * @generated from field: repeated string user_ids = 2; + */ + userIds: string[]; +}; + +/** + * Describes the message nillion.compute.v1.invoke.OutputPartyBinding. + * Use `create(OutputPartyBindingSchema)` to create a new message. + */ +export const OutputPartyBindingSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_invoke, 3); + diff --git a/packages/client-vms/src/gen-proto/nillion/compute/v1/retrieve_pb.ts b/packages/client-vms/src/gen-proto/nillion/compute/v1/retrieve_pb.ts new file mode 100644 index 0000000..0dc8872 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/compute/v1/retrieve_pb.ts @@ -0,0 +1,103 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/compute/v1/retrieve.proto (package nillion.compute.v1.retrieve, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Empty } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/compute/v1/retrieve.proto. + */ +export const file_nillion_compute_v1_retrieve: GenFile = /*@__PURE__*/ + fileDesc("CiFuaWxsaW9uL2NvbXB1dGUvdjEvcmV0cmlldmUucHJvdG8SG25pbGxpb24uY29tcHV0ZS52MS5yZXRyaWV2ZSIsChZSZXRyaWV2ZVJlc3VsdHNSZXF1ZXN0EhIKCmNvbXB1dGVfaWQYASABKAwirQEKF1JldHJpZXZlUmVzdWx0c1Jlc3BvbnNlEjUKE3dhaXRpbmdfY29tcHV0YXRpb24YASABKAsyFi5nb29nbGUucHJvdG9idWYuRW1wdHlIABJBCgdzdWNjZXNzGAIgASgLMi4ubmlsbGlvbi5jb21wdXRlLnYxLnJldHJpZXZlLkNvbXB1dGF0aW9uUmVzdWx0SAASDwoFZXJyb3IYAyABKAlIAEIHCgVzdGF0ZSIrChFDb21wdXRhdGlvblJlc3VsdBIWCg5iaW5jb2RlX3ZhbHVlcxgBIAEoDELAAQofY29tLm5pbGxpb24uY29tcHV0ZS52MS5yZXRyaWV2ZUINUmV0cmlldmVQcm90b1ABogIETkNWUqoCG05pbGxpb24uQ29tcHV0ZS5WMS5SZXRyaWV2ZcoCG05pbGxpb25cQ29tcHV0ZVxWMVxSZXRyaWV2ZeICJ05pbGxpb25cQ29tcHV0ZVxWMVxSZXRyaWV2ZVxHUEJNZXRhZGF0YeoCHk5pbGxpb246OkNvbXB1dGU6OlYxOjpSZXRyaWV2ZWIGcHJvdG8z", [file_google_protobuf_empty]); + +/** + * A request to retrieve the results of a computation. + * + * @generated from message nillion.compute.v1.retrieve.RetrieveResultsRequest + */ +export type RetrieveResultsRequest = Message<"nillion.compute.v1.retrieve.RetrieveResultsRequest"> & { + /** + * The instance of the computation to retrieve results for. + * + * @generated from field: bytes compute_id = 1; + */ + computeId: Uint8Array; +}; + +/** + * Describes the message nillion.compute.v1.retrieve.RetrieveResultsRequest. + * Use `create(RetrieveResultsRequestSchema)` to create a new message. + */ +export const RetrieveResultsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_retrieve, 0); + +/** + * The response to a request to retrieve the results of a computation. + * + * @generated from message nillion.compute.v1.retrieve.RetrieveResultsResponse + */ +export type RetrieveResultsResponse = Message<"nillion.compute.v1.retrieve.RetrieveResultsResponse"> & { + /** + * @generated from oneof nillion.compute.v1.retrieve.RetrieveResultsResponse.state + */ + state: { + /** + * The node is waiting for the computation to end. + * + * This message may be sent 0+ times in a row until a `result` is sent. + * + * @generated from field: google.protobuf.Empty waiting_computation = 1; + */ + value: Empty; + case: "waitingComputation"; + } | { + /** + * The computation finished successfully and yielded these results. + * + * @generated from field: nillion.compute.v1.retrieve.ComputationResult success = 2; + */ + value: ComputationResult; + case: "success"; + } | { + /** + * The error message if any. + * + * @generated from field: string error = 3; + */ + value: string; + case: "error"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message nillion.compute.v1.retrieve.RetrieveResultsResponse. + * Use `create(RetrieveResultsResponseSchema)` to create a new message. + */ +export const RetrieveResultsResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_retrieve, 1); + +/** + * The result of a computation. + * + * @generated from message nillion.compute.v1.retrieve.ComputationResult + */ +export type ComputationResult = Message<"nillion.compute.v1.retrieve.ComputationResult"> & { + /** + * The computation results, encoded in bincode. + * + * @generated from field: bytes bincode_values = 1; + */ + bincodeValues: Uint8Array; +}; + +/** + * Describes the message nillion.compute.v1.retrieve.ComputationResult. + * Use `create(ComputationResultSchema)` to create a new message. + */ +export const ComputationResultSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_retrieve, 2); + diff --git a/packages/client-vms/src/gen-proto/nillion/compute/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/compute/v1/service_pb.ts new file mode 100644 index 0000000..09f1e8a --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/compute/v1/service_pb.ts @@ -0,0 +1,69 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/compute/v1/service.proto (package nillion.compute.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { InvokeComputeRequestSchema, InvokeComputeResponseSchema } from "./invoke_pb"; +import { file_nillion_compute_v1_invoke } from "./invoke_pb"; +import type { ComputeStreamMessageSchema } from "./stream_pb"; +import { file_nillion_compute_v1_stream } from "./stream_pb"; +import type { RetrieveResultsRequestSchema, RetrieveResultsResponseSchema } from "./retrieve_pb"; +import { file_nillion_compute_v1_retrieve } from "./retrieve_pb"; + +/** + * Describes the file nillion/compute/v1/service.proto. + */ +export const file_nillion_compute_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiBuaWxsaW9uL2NvbXB1dGUvdjEvc2VydmljZS5wcm90bxISbmlsbGlvbi5jb21wdXRlLnYxMtkCCgdDb21wdXRlEnIKDUludm9rZUNvbXB1dGUSLy5uaWxsaW9uLmNvbXB1dGUudjEuaW52b2tlLkludm9rZUNvbXB1dGVSZXF1ZXN0GjAubmlsbGlvbi5jb21wdXRlLnYxLmludm9rZS5JbnZva2VDb21wdXRlUmVzcG9uc2USWgoNU3RyZWFtQ29tcHV0ZRIvLm5pbGxpb24uY29tcHV0ZS52MS5zdHJlYW0uQ29tcHV0ZVN0cmVhbU1lc3NhZ2UaFi5nb29nbGUucHJvdG9idWYuRW1wdHkoARJ+Cg9SZXRyaWV2ZVJlc3VsdHMSMy5uaWxsaW9uLmNvbXB1dGUudjEucmV0cmlldmUuUmV0cmlldmVSZXN1bHRzUmVxdWVzdBo0Lm5pbGxpb24uY29tcHV0ZS52MS5yZXRyaWV2ZS5SZXRyaWV2ZVJlc3VsdHNSZXNwb25zZTABQpABChZjb20ubmlsbGlvbi5jb21wdXRlLnYxQgxTZXJ2aWNlUHJvdG9QAaICA05DWKoCEk5pbGxpb24uQ29tcHV0ZS5WMcoCEk5pbGxpb25cQ29tcHV0ZVxWMeICHk5pbGxpb25cQ29tcHV0ZVxWMVxHUEJNZXRhZGF0YeoCFE5pbGxpb246OkNvbXB1dGU6OlYxYgZwcm90bzM", [file_google_protobuf_empty, file_nillion_compute_v1_invoke, file_nillion_compute_v1_stream, file_nillion_compute_v1_retrieve]); + +/** + * A service to perform compute operations. + * + * @generated from service nillion.compute.v1.Compute + */ +export const Compute: GenService<{ + /** + * Invoke a computation. + * + * @generated from rpc nillion.compute.v1.Compute.InvokeCompute + */ + invokeCompute: { + methodKind: "unary"; + input: typeof InvokeComputeRequestSchema; + output: typeof InvokeComputeResponseSchema; + }, + /** + * Start a stream of message for a specific instance of a computation. + * + * This is meant to be used internally by nodes in the network. + * + * @generated from rpc nillion.compute.v1.Compute.StreamCompute + */ + streamCompute: { + methodKind: "client_streaming"; + input: typeof ComputeStreamMessageSchema; + output: typeof EmptySchema; + }, + /** + * Retrieve the result of a computation. + * + * The user invoking this operation must have been defined as an output party in the program + * the execution was tied to. + * + * This call will wait for the program execution to end if it hasn't done so already. Clients must + * wait until either a result or failure message is sent, ignoring any `Waiting` messages sent until + * that happens. + * + * @generated from rpc nillion.compute.v1.Compute.RetrieveResults + */ + retrieveResults: { + methodKind: "server_streaming"; + input: typeof RetrieveResultsRequestSchema; + output: typeof RetrieveResultsResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_compute_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/compute/v1/stream_pb.ts b/packages/client-vms/src/gen-proto/nillion/compute/v1/stream_pb.ts new file mode 100644 index 0000000..6f70a47 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/compute/v1/stream_pb.ts @@ -0,0 +1,45 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/compute/v1/stream.proto (package nillion.compute.v1.stream, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/compute/v1/stream.proto. + */ +export const file_nillion_compute_v1_stream: GenFile = /*@__PURE__*/ + fileDesc("Ch9uaWxsaW9uL2NvbXB1dGUvdjEvc3RyZWFtLnByb3RvEhluaWxsaW9uLmNvbXB1dGUudjEuc3RyZWFtIkMKFENvbXB1dGVTdHJlYW1NZXNzYWdlEhIKCmNvbXB1dGVfaWQYASABKAwSFwoPYmluY29kZV9tZXNzYWdlGAIgASgMQrQBCh1jb20ubmlsbGlvbi5jb21wdXRlLnYxLnN0cmVhbUILU3RyZWFtUHJvdG9QAaICBE5DVlOqAhlOaWxsaW9uLkNvbXB1dGUuVjEuU3RyZWFtygIZTmlsbGlvblxDb21wdXRlXFYxXFN0cmVhbeICJU5pbGxpb25cQ29tcHV0ZVxWMVxTdHJlYW1cR1BCTWV0YWRhdGHqAhxOaWxsaW9uOjpDb21wdXRlOjpWMTo6U3RyZWFtYgZwcm90bzM"); + +/** + * A message for a compute stream. + * + * @generated from message nillion.compute.v1.stream.ComputeStreamMessage + */ +export type ComputeStreamMessage = Message<"nillion.compute.v1.stream.ComputeStreamMessage"> & { + /** + * An identifier for the computation instance. + * + * Only the first ever message on the stream requires having this attribute set. Any subsequent message will + * have this field ignored. + * + * @generated from field: bytes compute_id = 1; + */ + computeId: Uint8Array; + + /** + * The VM message in bincode format. + * + * @generated from field: bytes bincode_message = 2; + */ + bincodeMessage: Uint8Array; +}; + +/** + * Describes the message nillion.compute.v1.stream.ComputeStreamMessage. + * Use `create(ComputeStreamMessageSchema)` to create a new message. + */ +export const ComputeStreamMessageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_compute_v1_stream, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/pool_status_pb.ts b/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/pool_status_pb.ts new file mode 100644 index 0000000..45c4809 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/pool_status_pb.ts @@ -0,0 +1,106 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/leader_queries/v1/pool_status.proto (package nillion.leader_queries.v1.pool_status, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PreprocessingElement } from "../../preprocessing/v1/element_pb"; +import { file_nillion_preprocessing_v1_element } from "../../preprocessing/v1/element_pb"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/leader_queries/v1/pool_status.proto. + */ +export const file_nillion_leader_queries_v1_pool_status: GenFile = /*@__PURE__*/ + fileDesc("CituaWxsaW9uL2xlYWRlcl9xdWVyaWVzL3YxL3Bvb2xfc3RhdHVzLnByb3RvEiVuaWxsaW9uLmxlYWRlcl9xdWVyaWVzLnYxLnBvb2xfc3RhdHVzIlcKEVBvb2xTdGF0dXNSZXF1ZXN0EkIKDnNpZ25lZF9yZWNlaXB0GAEgASgLMioubmlsbGlvbi5wYXltZW50cy52MS5yZWNlaXB0LlNpZ25lZFJlY2VpcHQigAEKElBvb2xTdGF0dXNSZXNwb25zZRJMCgdvZmZzZXRzGAEgAygLMjsubmlsbGlvbi5sZWFkZXJfcXVlcmllcy52MS5wb29sX3N0YXR1cy5QcmVwcm9jZXNzaW5nT2Zmc2V0cxIcChRwcmVwcm9jZXNzaW5nX2FjdGl2ZRgCIAEoCCJ7ChRQcmVwcm9jZXNzaW5nT2Zmc2V0cxJHCgdlbGVtZW50GAEgASgOMjYubmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmVsZW1lbnQuUHJlcHJvY2Vzc2luZ0VsZW1lbnQSDQoFc3RhcnQYAiABKAQSCwoDZW5kGAMgASgEQuwBCiljb20ubmlsbGlvbi5sZWFkZXJfcXVlcmllcy52MS5wb29sX3N0YXR1c0IPUG9vbFN0YXR1c1Byb3RvUAGiAgROTFZQqgIjTmlsbGlvbi5MZWFkZXJRdWVyaWVzLlYxLlBvb2xTdGF0dXPKAiNOaWxsaW9uXExlYWRlclF1ZXJpZXNcVjFcUG9vbFN0YXR1c+ICL05pbGxpb25cTGVhZGVyUXVlcmllc1xWMVxQb29sU3RhdHVzXEdQQk1ldGFkYXRh6gImTmlsbGlvbjo6TGVhZGVyUXVlcmllczo6VjE6OlBvb2xTdGF0dXNiBnByb3RvMw", [file_nillion_preprocessing_v1_element, file_nillion_payments_v1_receipt]); + +/** + * A request to get the preprocessing pool status. + * + * @generated from message nillion.leader_queries.v1.pool_status.PoolStatusRequest + */ +export type PoolStatusRequest = Message<"nillion.leader_queries.v1.pool_status.PoolStatusRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `PoolStatus` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; +}; + +/** + * Describes the message nillion.leader_queries.v1.pool_status.PoolStatusRequest. + * Use `create(PoolStatusRequestSchema)` to create a new message. + */ +export const PoolStatusRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_leader_queries_v1_pool_status, 0); + +/** + * A response for the request to get the status of the preprocessing pool. + * + * @generated from message nillion.leader_queries.v1.pool_status.PoolStatusResponse + */ +export type PoolStatusResponse = Message<"nillion.leader_queries.v1.pool_status.PoolStatusResponse"> & { + /** + * The offset ranges for each preprocessing element. + * + * @generated from field: repeated nillion.leader_queries.v1.pool_status.PreprocessingOffsets offsets = 1; + */ + offsets: PreprocessingOffsets[]; + + /** + * Whether preprocessing is active (at least one element type is being generated). + * + * @generated from field: bool preprocessing_active = 2; + */ + preprocessingActive: boolean; +}; + +/** + * Describes the message nillion.leader_queries.v1.pool_status.PoolStatusResponse. + * Use `create(PoolStatusResponseSchema)` to create a new message. + */ +export const PoolStatusResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_leader_queries_v1_pool_status, 1); + +/** + * The offsets for a preprocessing element. + * + * This is closed-open set, e.g. [start, end) + * + * @generated from message nillion.leader_queries.v1.pool_status.PreprocessingOffsets + */ +export type PreprocessingOffsets = Message<"nillion.leader_queries.v1.pool_status.PreprocessingOffsets"> & { + /** + * The preprocessing element. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 1; + */ + element: PreprocessingElement; + + /** + * The first offset in the range. + * + * @generated from field: uint64 start = 2; + */ + start: bigint; + + /** + * The one-past-the-end offset in this range. + * + * @generated from field: uint64 end = 3; + */ + end: bigint; +}; + +/** + * Describes the message nillion.leader_queries.v1.pool_status.PreprocessingOffsets. + * Use `create(PreprocessingOffsetsSchema)` to create a new message. + */ +export const PreprocessingOffsetsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_leader_queries_v1_pool_status, 2); + diff --git a/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/service_pb.ts new file mode 100644 index 0000000..21b039c --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/leader_queries/v1/service_pb.ts @@ -0,0 +1,34 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/leader_queries/v1/service.proto (package nillion.leader_queries.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PoolStatusRequestSchema, PoolStatusResponseSchema } from "./pool_status_pb"; +import { file_nillion_leader_queries_v1_pool_status } from "./pool_status_pb"; + +/** + * Describes the file nillion/leader_queries/v1/service.proto. + */ +export const file_nillion_leader_queries_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiduaWxsaW9uL2xlYWRlcl9xdWVyaWVzL3YxL3NlcnZpY2UucHJvdG8SGW5pbGxpb24ubGVhZGVyX3F1ZXJpZXMudjEykwEKDUxlYWRlclF1ZXJpZXMSgQEKClBvb2xTdGF0dXMSOC5uaWxsaW9uLmxlYWRlcl9xdWVyaWVzLnYxLnBvb2xfc3RhdHVzLlBvb2xTdGF0dXNSZXF1ZXN0GjkubmlsbGlvbi5sZWFkZXJfcXVlcmllcy52MS5wb29sX3N0YXR1cy5Qb29sU3RhdHVzUmVzcG9uc2VCrwEKHWNvbS5uaWxsaW9uLmxlYWRlcl9xdWVyaWVzLnYxQgxTZXJ2aWNlUHJvdG9QAaICA05MWKoCGE5pbGxpb24uTGVhZGVyUXVlcmllcy5WMcoCGE5pbGxpb25cTGVhZGVyUXVlcmllc1xWMeICJE5pbGxpb25cTGVhZGVyUXVlcmllc1xWMVxHUEJNZXRhZGF0YeoCGk5pbGxpb246OkxlYWRlclF1ZXJpZXM6OlYxYgZwcm90bzM", [file_nillion_leader_queries_v1_pool_status]); + +/** + * A service that allows performing queries against the leader of the cluster. + * + * @generated from service nillion.leader_queries.v1.LeaderQueries + */ +export const LeaderQueries: GenService<{ + /** + * Get the status of the preprocessing pool. + * + * @generated from rpc nillion.leader_queries.v1.LeaderQueries.PoolStatus + */ + poolStatus: { + methodKind: "unary"; + input: typeof PoolStatusRequestSchema; + output: typeof PoolStatusResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_leader_queries_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/membership/v1/cluster_pb.ts b/packages/client-vms/src/gen-proto/nillion/membership/v1/cluster_pb.ts new file mode 100644 index 0000000..c53fcd3 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/membership/v1/cluster_pb.ts @@ -0,0 +1,172 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/membership/v1/cluster.proto (package nillion.membership.v1.cluster, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PublicKey } from "../../auth/v1/public_key_pb"; +import { file_nillion_auth_v1_public_key } from "../../auth/v1/public_key_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/membership/v1/cluster.proto. + */ +export const file_nillion_membership_v1_cluster: GenFile = /*@__PURE__*/ + fileDesc("CiNuaWxsaW9uL21lbWJlcnNoaXAvdjEvY2x1c3Rlci5wcm90bxIdbmlsbGlvbi5tZW1iZXJzaGlwLnYxLmNsdXN0ZXIi5QEKB0NsdXN0ZXISPQoHbWVtYmVycxgBIAMoCzIsLm5pbGxpb24ubWVtYmVyc2hpcC52MS5jbHVzdGVyLkNsdXN0ZXJNZW1iZXISPAoGbGVhZGVyGAIgASgLMiwubmlsbGlvbi5tZW1iZXJzaGlwLnYxLmNsdXN0ZXIuQ2x1c3Rlck1lbWJlchIzCgVwcmltZRgDIAEoDjIkLm5pbGxpb24ubWVtYmVyc2hpcC52MS5jbHVzdGVyLlByaW1lEhkKEXBvbHlub21pYWxfZGVncmVlGAQgASgNEg0KBWthcHBhGAUgASgNIrMBCg1DbHVzdGVyTWVtYmVyEhAKCGlkZW50aXR5GAEgASgMEjkKCnB1YmxpY19rZXkYAiABKAsyJS5uaWxsaW9uLmF1dGgudjEucHVibGljX2tleS5QdWJsaWNLZXkSFQoNZ3JwY19lbmRwb2ludBgDIAEoCRI+CgtwdWJsaWNfa2V5cxgEIAEoCzIpLm5pbGxpb24ubWVtYmVyc2hpcC52MS5jbHVzdGVyLlB1YmxpY0tleXMiSwoKUHVibGljS2V5cxI9Cg5hdXRoZW50aWNhdGlvbhgBIAEoCzIlLm5pbGxpb24uYXV0aC52MS5wdWJsaWNfa2V5LlB1YmxpY0tleSo/CgVQcmltZRIQCgxTQUZFXzY0X0JJVFMQABIRCg1TQUZFXzEyOF9CSVRTEAESEQoNU0FGRV8yNTZfQklUUxACQskBCiFjb20ubmlsbGlvbi5tZW1iZXJzaGlwLnYxLmNsdXN0ZXJCDENsdXN0ZXJQcm90b1ABogIETk1WQ6oCHU5pbGxpb24uTWVtYmVyc2hpcC5WMS5DbHVzdGVyygIdTmlsbGlvblxNZW1iZXJzaGlwXFYxXENsdXN0ZXLiAilOaWxsaW9uXE1lbWJlcnNoaXBcVjFcQ2x1c3RlclxHUEJNZXRhZGF0YeoCIE5pbGxpb246Ok1lbWJlcnNoaXA6OlYxOjpDbHVzdGVyYgZwcm90bzM", [file_nillion_auth_v1_public_key]); + +/** + * The definition of a cluster. + * + * @generated from message nillion.membership.v1.cluster.Cluster + */ +export type Cluster = Message<"nillion.membership.v1.cluster.Cluster"> & { + /** + * The members of this cluster. + * + * @generated from field: repeated nillion.membership.v1.cluster.ClusterMember members = 1; + */ + members: ClusterMember[]; + + /** + * The leader of this cluster. + * + * @generated from field: nillion.membership.v1.cluster.ClusterMember leader = 2; + */ + leader?: ClusterMember; + + /** + * The prime number this cluster uses. + * + * @generated from field: nillion.membership.v1.cluster.Prime prime = 3; + */ + prime: Prime; + + /** + * The polynomial degree used in this cluster. + * + * @generated from field: uint32 polynomial_degree = 4; + */ + polynomialDegree: number; + + /** + * The security parameter kappa used in this cluster. + * + * @generated from field: uint32 kappa = 5; + */ + kappa: number; +}; + +/** + * Describes the message nillion.membership.v1.cluster.Cluster. + * Use `create(ClusterSchema)` to create a new message. + */ +export const ClusterSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_membership_v1_cluster, 0); + +/** + * A cluster member. + * + * @generated from message nillion.membership.v1.cluster.ClusterMember + */ +export type ClusterMember = Message<"nillion.membership.v1.cluster.ClusterMember"> & { + /** + * The identity for this member. + * + * This is a unique identifier derived from the public key. + * + * @generated from field: bytes identity = 1; + */ + identity: Uint8Array; + + /** + * The public key for this member. + * + * **This field is deprecated**. `public_keys.authentication` should be used instead. + * + * @generated from field: nillion.auth.v1.public_key.PublicKey public_key = 2; + */ + publicKey?: PublicKey; + + /** + * The gRPC endpoint this member can be reached at. + * + * @generated from field: string grpc_endpoint = 3; + */ + grpcEndpoint: string; + + /** + * The public keys for a cluster member. + * + * @generated from field: nillion.membership.v1.cluster.PublicKeys public_keys = 4; + */ + publicKeys?: PublicKeys; +}; + +/** + * Describes the message nillion.membership.v1.cluster.ClusterMember. + * Use `create(ClusterMemberSchema)` to create a new message. + */ +export const ClusterMemberSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_membership_v1_cluster, 1); + +/** + * The public keys for a cluster member. + * + * @generated from message nillion.membership.v1.cluster.PublicKeys + */ +export type PublicKeys = Message<"nillion.membership.v1.cluster.PublicKeys"> & { + /** + * The authentication public key for this member. + * + * @generated from field: nillion.auth.v1.public_key.PublicKey authentication = 1; + */ + authentication?: PublicKey; +}; + +/** + * Describes the message nillion.membership.v1.cluster.PublicKeys. + * Use `create(PublicKeysSchema)` to create a new message. + */ +export const PublicKeysSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_membership_v1_cluster, 2); + +/** + * A prime number. + * + * @generated from enum nillion.membership.v1.cluster.Prime + */ +export enum Prime { + /** + * A safe 64 bit prime number. + * + * This is prime number 18446744072637906947. + * + * @generated from enum value: SAFE_64_BITS = 0; + */ + SAFE_64_BITS = 0, + + /** + * A safe 128 bit prime number. + * + * This is prime number 340282366920938463463374607429104828419. + * + * @generated from enum value: SAFE_128_BITS = 1; + */ + SAFE_128_BITS = 1, + + /** + * A safe 256 bit prime number. + * + * This is prime number 115792089237316195423570985008687907853269984665640564039457584007911397392387. + * + * @generated from enum value: SAFE_256_BITS = 2; + */ + SAFE_256_BITS = 2, +} + +/** + * Describes the enum nillion.membership.v1.cluster.Prime. + */ +export const PrimeSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_nillion_membership_v1_cluster, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/membership/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/membership/v1/service_pb.ts new file mode 100644 index 0000000..11b7ff2 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/membership/v1/service_pb.ts @@ -0,0 +1,36 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/membership/v1/service.proto (package nillion.membership.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { ClusterSchema } from "./cluster_pb"; +import { file_nillion_membership_v1_cluster } from "./cluster_pb"; + +/** + * Describes the file nillion/membership/v1/service.proto. + */ +export const file_nillion_membership_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiNuaWxsaW9uL21lbWJlcnNoaXAvdjEvc2VydmljZS5wcm90bxIVbmlsbGlvbi5tZW1iZXJzaGlwLnYxMlcKCk1lbWJlcnNoaXASSQoHQ2x1c3RlchIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eRomLm5pbGxpb24ubWVtYmVyc2hpcC52MS5jbHVzdGVyLkNsdXN0ZXJCnwEKGWNvbS5uaWxsaW9uLm1lbWJlcnNoaXAudjFCDFNlcnZpY2VQcm90b1ABogIDTk1YqgIVTmlsbGlvbi5NZW1iZXJzaGlwLlYxygIVTmlsbGlvblxNZW1iZXJzaGlwXFYx4gIhTmlsbGlvblxNZW1iZXJzaGlwXFYxXEdQQk1ldGFkYXRh6gIXTmlsbGlvbjo6TWVtYmVyc2hpcDo6VjFiBnByb3RvMw", [file_google_protobuf_empty, file_nillion_membership_v1_cluster]); + +/** + * Exposes information about a node's membership. + * + * @generated from service nillion.membership.v1.Membership + */ +export const Membership: GenService<{ + /** + * Get the definition of the cluster the node queried is part of. + * + * @generated from rpc nillion.membership.v1.Membership.Cluster + */ + cluster: { + methodKind: "unary"; + input: typeof EmptySchema; + output: typeof ClusterSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_membership_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/payments/v1/quote_pb.ts b/packages/client-vms/src/gen-proto/nillion/payments/v1/quote_pb.ts new file mode 100644 index 0000000..8f0bbcb --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/payments/v1/quote_pb.ts @@ -0,0 +1,495 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/payments/v1/quote.proto (package nillion.payments.v1.quote, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Empty, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { PreprocessingElement } from "../../preprocessing/v1/element_pb"; +import { file_nillion_preprocessing_v1_element } from "../../preprocessing/v1/element_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/payments/v1/quote.proto. + */ +export const file_nillion_payments_v1_quote: GenFile = /*@__PURE__*/ + fileDesc("Ch9uaWxsaW9uL3BheW1lbnRzL3YxL3F1b3RlLnByb3RvEhluaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlIvcDChFQcmljZVF1b3RlUmVxdWVzdBItCgtwb29sX3N0YXR1cxgBIAEoCzIWLmdvb2dsZS5wcm90b2J1Zi5FbXB0eUgAEkAKDXN0b3JlX3Byb2dyYW0YAiABKAsyJy5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlN0b3JlUHJvZ3JhbUgAEkQKD3JldHJpZXZlX3ZhbHVlcxgDIAEoCzIpLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuUmV0cmlldmVWYWx1ZXNIABJOChRyZXRyaWV2ZV9wZXJtaXNzaW9ucxgEIAEoCzIuLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuUmV0cmlldmVQZXJtaXNzaW9uc0gAEj4KDHN0b3JlX3ZhbHVlcxgFIAEoCzImLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuU3RvcmVWYWx1ZXNIABJCCg5pbnZva2VfY29tcHV0ZRgGIAEoCzIoLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuSW52b2tlQ29tcHV0ZUgAEkoKEnVwZGF0ZV9wZXJtaXNzaW9ucxgHIAEoCzIsLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuVXBkYXRlUGVybWlzc2lvbnNIAEILCglvcGVyYXRpb24iLwoLU2lnbmVkUXVvdGUSDQoFcXVvdGUYASABKAwSEQoJc2lnbmF0dXJlGAIgASgMIpcCCgpQcmljZVF1b3RlEg0KBW5vbmNlGAEgASgMEjIKBGZlZXMYAiABKAsyJC5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlF1b3RlRmVlcxI9CgdyZXF1ZXN0GAMgASgLMiwubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5QcmljZVF1b3RlUmVxdWVzdBIuCgpleHBpcmVzX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBJXChpwcmVwcm9jZXNzaW5nX3JlcXVpcmVtZW50cxgFIAMoCzIzLm5pbGxpb24ucGF5bWVudHMudjEucXVvdGUuUHJlcHJvY2Vzc2luZ1JlcXVpcmVtZW50InUKCVF1b3RlRmVlcxINCgV0b3RhbBgBIAEoBBIMCgRiYXNlGAIgASgEEhIKCmNvbmdlc3Rpb24YAyABKAQSDwoHc3RvcmFnZRgEIAEoBBIVCg1wcmVwcm9jZXNzaW5nGAUgASgEEg8KB2NvbXB1dGUYBiABKAQicwoMU3RvcmVQcm9ncmFtEjwKCG1ldGFkYXRhGAEgASgLMioubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5Qcm9ncmFtTWV0YWRhdGESFwoPY29udGVudHNfc2hhMjU2GAIgASgMEgwKBG5hbWUYAyABKAkiuQIKD1Byb2dyYW1NZXRhZGF0YRIUCgxwcm9ncmFtX3NpemUYASABKAQSEwoLbWVtb3J5X3NpemUYAiABKAQSGQoRaW5zdHJ1Y3Rpb25fY291bnQYAyABKAQSUgoMaW5zdHJ1Y3Rpb25zGAQgAygLMjwubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5Qcm9ncmFtTWV0YWRhdGEuSW5zdHJ1Y3Rpb25zRW50cnkSVwoacHJlcHJvY2Vzc2luZ19yZXF1aXJlbWVudHMYBSADKAsyMy5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlByZXByb2Nlc3NpbmdSZXF1aXJlbWVudBozChFJbnN0cnVjdGlvbnNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAQ6AjgBInIKGFByZXByb2Nlc3NpbmdSZXF1aXJlbWVudBJHCgdlbGVtZW50GAEgASgOMjYubmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmVsZW1lbnQuUHJlcHJvY2Vzc2luZ0VsZW1lbnQSDQoFY291bnQYAiABKAQiIwoOUmV0cmlldmVWYWx1ZXMSEQoJdmFsdWVzX2lkGAEgASgMIigKE1JldHJpZXZlUGVybWlzc2lvbnMSEQoJdmFsdWVzX2lkGAEgASgMIiYKEVVwZGF0ZVBlcm1pc3Npb25zEhEKCXZhbHVlc19pZBgBIAEoDCKIAQoLU3RvcmVWYWx1ZXMSFwoPcGFydGljbGVzX2NvdW50GAEgASgEEhsKE3NlY3JldF9zaGFyZWRfY291bnQYAiABKAQSGwoTcHVibGljX3ZhbHVlc19jb3VudBgDIAEoBBIQCgh0dGxfZGF5cxgEIAEoDRIUCgxwYXlsb2FkX3NpemUYBSABKAQiQAoNSW52b2tlQ29tcHV0ZRISCgpwcm9ncmFtX2lkGAEgASgJEhsKE3ZhbHVlc19wYXlsb2FkX3NpemUYAiABKARCswEKHWNvbS5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlQgpRdW90ZVByb3RvUAGiAgROUFZRqgIZTmlsbGlvbi5QYXltZW50cy5WMS5RdW90ZcoCGU5pbGxpb25cUGF5bWVudHNcVjFcUXVvdGXiAiVOaWxsaW9uXFBheW1lbnRzXFYxXFF1b3RlXEdQQk1ldGFkYXRh6gIcTmlsbGlvbjo6UGF5bWVudHM6OlYxOjpRdW90ZWIGcHJvdG8z", [file_google_protobuf_empty, file_google_protobuf_timestamp, file_nillion_preprocessing_v1_element]); + +/** + * A price quote request. + * + * @generated from message nillion.payments.v1.quote.PriceQuoteRequest + */ +export type PriceQuoteRequest = Message<"nillion.payments.v1.quote.PriceQuoteRequest"> & { + /** + * @generated from oneof nillion.payments.v1.quote.PriceQuoteRequest.operation + */ + operation: { + /** + * A pool status operation. + * + * @generated from field: google.protobuf.Empty pool_status = 1; + */ + value: Empty; + case: "poolStatus"; + } | { + /** + * A store program operation. + * + * @generated from field: nillion.payments.v1.quote.StoreProgram store_program = 2; + */ + value: StoreProgram; + case: "storeProgram"; + } | { + /** + * A retrieve values operation. + * + * @generated from field: nillion.payments.v1.quote.RetrieveValues retrieve_values = 3; + */ + value: RetrieveValues; + case: "retrieveValues"; + } | { + /** + * A retrieve permissions operation. + * + * @generated from field: nillion.payments.v1.quote.RetrievePermissions retrieve_permissions = 4; + */ + value: RetrievePermissions; + case: "retrievePermissions"; + } | { + /** + * A store values operation. + * + * @generated from field: nillion.payments.v1.quote.StoreValues store_values = 5; + */ + value: StoreValues; + case: "storeValues"; + } | { + /** + * A invoke compute operation. + * + * @generated from field: nillion.payments.v1.quote.InvokeCompute invoke_compute = 6; + */ + value: InvokeCompute; + case: "invokeCompute"; + } | { + /** + * A retrieve permissions operation. + * + * @generated from field: nillion.payments.v1.quote.UpdatePermissions update_permissions = 7; + */ + value: UpdatePermissions; + case: "updatePermissions"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message nillion.payments.v1.quote.PriceQuoteRequest. + * Use `create(PriceQuoteRequestSchema)` to create a new message. + */ +export const PriceQuoteRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 0); + +/** + * A quote signed by the node that generated it. + * + * @generated from message nillion.payments.v1.quote.SignedQuote + */ +export type SignedQuote = Message<"nillion.payments.v1.quote.SignedQuote"> & { + /** + * The serialized `PriceQuote`. + * + * @generated from field: bytes quote = 1; + */ + quote: Uint8Array; + + /** + * The signature for this quote. + * + * @generated from field: bytes signature = 2; + */ + signature: Uint8Array; +}; + +/** + * Describes the message nillion.payments.v1.quote.SignedQuote. + * Use `create(SignedQuoteSchema)` to create a new message. + */ +export const SignedQuoteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 1); + +/** + * A price quote. + * + * @generated from message nillion.payments.v1.quote.PriceQuote + */ +export type PriceQuote = Message<"nillion.payments.v1.quote.PriceQuote"> & { + /** + * A nonce that uniquely identifies this quote. + * + * @generated from field: bytes nonce = 1; + */ + nonce: Uint8Array; + + /** + * The fees for this quote. + * + * @generated from field: nillion.payments.v1.quote.QuoteFees fees = 2; + */ + fees?: QuoteFees; + + /** + * The request that this quote is for. + * + * @generated from field: nillion.payments.v1.quote.PriceQuoteRequest request = 3; + */ + request?: PriceQuoteRequest; + + /** + * The point in time at which this quote is no longer valid. + * + * @generated from field: google.protobuf.Timestamp expires_at = 4; + */ + expiresAt?: Timestamp; + + /** + * The preprocessing requirements for this operation. + * + * @generated from field: repeated nillion.payments.v1.quote.PreprocessingRequirement preprocessing_requirements = 5; + */ + preprocessingRequirements: PreprocessingRequirement[]; +}; + +/** + * Describes the message nillion.payments.v1.quote.PriceQuote. + * Use `create(PriceQuoteSchema)` to create a new message. + */ +export const PriceQuoteSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 2); + +/** + * The fees associated with a quote. + * + * All fees are in "unil" units. + * + * @generated from message nillion.payments.v1.quote.QuoteFees + */ +export type QuoteFees = Message<"nillion.payments.v1.quote.QuoteFees"> & { + /** + * The sum of all the fees. + * + * @generated from field: uint64 total = 1; + */ + total: bigint; + + /** + * The base fee. + * + * This is a flat fee based on the operation being ran. + * + * @generated from field: uint64 base = 2; + */ + base: bigint; + + /** + * The congestion fee. + * + * This depends on how congested the network is. + * + * @generated from field: uint64 congestion = 3; + */ + congestion: bigint; + + /** + * The storage fee. + * + * This depends on how much data is being stored, in case the operation being quoted stores data. + * + * @generated from field: uint64 storage = 4; + */ + storage: bigint; + + /** + * The preprocessing fee. + * + * This is only valid for compute operations and accounts for any preprocessing material needed + * to execute the program being invoked. + * + * @generated from field: uint64 preprocessing = 5; + */ + preprocessing: bigint; + + /** + * The compute fee. + * + * This fee is only valid for compute operations and depends on the complexity of the program + * being invoked. + * + * @generated from field: uint64 compute = 6; + */ + compute: bigint; +}; + +/** + * Describes the message nillion.payments.v1.quote.QuoteFees. + * Use `create(QuoteFeesSchema)` to create a new message. + */ +export const QuoteFeesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 3); + +/** + * A store program operation. + * + * @generated from message nillion.payments.v1.quote.StoreProgram + */ +export type StoreProgram = Message<"nillion.payments.v1.quote.StoreProgram"> & { + /** + * The program's metadata. + * + * @generated from field: nillion.payments.v1.quote.ProgramMetadata metadata = 1; + */ + metadata?: ProgramMetadata; + + /** + * A sha256 hash of the compiled program. + * + * @generated from field: bytes contents_sha256 = 2; + */ + contentsSha256: Uint8Array; + + /** + * The program's name. + * + * @generated from field: string name = 3; + */ + name: string; +}; + +/** + * Describes the message nillion.payments.v1.quote.StoreProgram. + * Use `create(StoreProgramSchema)` to create a new message. + */ +export const StoreProgramSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 4); + +/** + * The metadata about a program being stored. + * + * @generated from message nillion.payments.v1.quote.ProgramMetadata + */ +export type ProgramMetadata = Message<"nillion.payments.v1.quote.ProgramMetadata"> & { + /** + * The size of the program in bytes. + * + * @generated from field: uint64 program_size = 1; + */ + programSize: bigint; + + /** + * The amount of memory needed by the program. + * + * @generated from field: uint64 memory_size = 2; + */ + memorySize: bigint; + + /** + * The total number of instructions in the program. + * + * @generated from field: uint64 instruction_count = 3; + */ + instructionCount: bigint; + + /** + * The number of instructions per type. + * + * @generated from field: map instructions = 4; + */ + instructions: { [key: string]: bigint }; + + /** + * The preprocessing requirements. + * + * @generated from field: repeated nillion.payments.v1.quote.PreprocessingRequirement preprocessing_requirements = 5; + */ + preprocessingRequirements: PreprocessingRequirement[]; +}; + +/** + * Describes the message nillion.payments.v1.quote.ProgramMetadata. + * Use `create(ProgramMetadataSchema)` to create a new message. + */ +export const ProgramMetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 5); + +/** + * A number of preprocessing elements required for a program. + * + * @generated from message nillion.payments.v1.quote.PreprocessingRequirement + */ +export type PreprocessingRequirement = Message<"nillion.payments.v1.quote.PreprocessingRequirement"> & { + /** + * The preprocessing element. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 1; + */ + element: PreprocessingElement; + + /** + * The total number of elements of this type needed. + * + * @generated from field: uint64 count = 2; + */ + count: bigint; +}; + +/** + * Describes the message nillion.payments.v1.quote.PreprocessingRequirement. + * Use `create(PreprocessingRequirementSchema)` to create a new message. + */ +export const PreprocessingRequirementSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 6); + +/** + * A retrieve values operation. + * + * @generated from message nillion.payments.v1.quote.RetrieveValues + */ +export type RetrieveValues = Message<"nillion.payments.v1.quote.RetrieveValues"> & { + /** + * The identifier to be retrieved. + * + * @generated from field: bytes values_id = 1; + */ + valuesId: Uint8Array; +}; + +/** + * Describes the message nillion.payments.v1.quote.RetrieveValues. + * Use `create(RetrieveValuesSchema)` to create a new message. + */ +export const RetrieveValuesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 7); + +/** + * A retrieve permissions operation. + * + * @generated from message nillion.payments.v1.quote.RetrievePermissions + */ +export type RetrievePermissions = Message<"nillion.payments.v1.quote.RetrievePermissions"> & { + /** + * The identifier of the values entity to be retrieved. + * + * @generated from field: bytes values_id = 1; + */ + valuesId: Uint8Array; +}; + +/** + * Describes the message nillion.payments.v1.quote.RetrievePermissions. + * Use `create(RetrievePermissionsSchema)` to create a new message. + */ +export const RetrievePermissionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 8); + +/** + * An update permissions operation. + * + * @generated from message nillion.payments.v1.quote.UpdatePermissions + */ +export type UpdatePermissions = Message<"nillion.payments.v1.quote.UpdatePermissions"> & { + /** + * The identifier of the values entity whose permissions are to be updated. + * + * @generated from field: bytes values_id = 1; + */ + valuesId: Uint8Array; +}; + +/** + * Describes the message nillion.payments.v1.quote.UpdatePermissions. + * Use `create(UpdatePermissionsSchema)` to create a new message. + */ +export const UpdatePermissionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 9); + +/** + * A store values operation. + * + * @generated from message nillion.payments.v1.quote.StoreValues + */ +export type StoreValues = Message<"nillion.payments.v1.quote.StoreValues"> & { + /** + * The number of particles being stored. + * + * @generated from field: uint64 particles_count = 1; + */ + particlesCount: bigint; + + /** + * The number of secret shared secrets being stored. + * + * This is the number of secrets in secret shared form being stored, not the total number of shares. e.g. + * for a 5 node network a single secret shared secret requires value `1` here rather than `5`. + * + * @generated from field: uint64 secret_shared_count = 2; + */ + secretSharedCount: bigint; + + /** + * The number of public values being stored. + * + * @generated from field: uint64 public_values_count = 3; + */ + publicValuesCount: bigint; + + /** + * The number of days to persist these secrets for. + * + * @generated from field: uint32 ttl_days = 4; + */ + ttlDays: number; + + /** + * The size of the payload to be stored. + * + * @generated from field: uint64 payload_size = 5; + */ + payloadSize: bigint; +}; + +/** + * Describes the message nillion.payments.v1.quote.StoreValues. + * Use `create(StoreValuesSchema)` to create a new message. + */ +export const StoreValuesSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 10); + +/** + * An invoke compute operation. + * + * @generated from message nillion.payments.v1.quote.InvokeCompute + */ +export type InvokeCompute = Message<"nillion.payments.v1.quote.InvokeCompute"> & { + /** + * The program to be invoked. + * + * @generated from field: string program_id = 1; + */ + programId: string; + + /** + * The size of the compute time values being sent as part of this operation. + * + * @generated from field: uint64 values_payload_size = 2; + */ + valuesPayloadSize: bigint; +}; + +/** + * Describes the message nillion.payments.v1.quote.InvokeCompute. + * Use `create(InvokeComputeSchema)` to create a new message. + */ +export const InvokeComputeSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_quote, 11); + diff --git a/packages/client-vms/src/gen-proto/nillion/payments/v1/receipt_pb.ts b/packages/client-vms/src/gen-proto/nillion/payments/v1/receipt_pb.ts new file mode 100644 index 0000000..2f20c57 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/payments/v1/receipt_pb.ts @@ -0,0 +1,261 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/payments/v1/receipt.proto (package nillion.payments.v1.receipt, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Empty, Timestamp } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt"; +import type { InvokeCompute, RetrievePermissions, RetrieveValues, SignedQuote, StoreProgram, StoreValues, UpdatePermissions } from "./quote_pb"; +import { file_nillion_payments_v1_quote } from "./quote_pb"; +import type { PreprocessingElement } from "../../preprocessing/v1/element_pb"; +import { file_nillion_preprocessing_v1_element } from "../../preprocessing/v1/element_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/payments/v1/receipt.proto. + */ +export const file_nillion_payments_v1_receipt: GenFile = /*@__PURE__*/ + fileDesc("CiFuaWxsaW9uL3BheW1lbnRzL3YxL3JlY2VpcHQucHJvdG8SG25pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdCJmChVQYXltZW50UmVjZWlwdFJlcXVlc3QSPAoMc2lnbmVkX3F1b3RlGAEgASgLMiYubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5TaWduZWRRdW90ZRIPCgd0eF9oYXNoGAIgASgJIjMKDVNpZ25lZFJlY2VpcHQSDwoHcmVjZWlwdBgBIAEoDBIRCglzaWduYXR1cmUYAiABKAwijwEKB1JlY2VpcHQSEgoKaWRlbnRpZmllchgBIAEoDBJACghtZXRhZGF0YRgCIAEoCzIuLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5PcGVyYXRpb25NZXRhZGF0YRIuCgpleHBpcmVzX2F0GAMgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcCKBBAoRT3BlcmF0aW9uTWV0YWRhdGESLQoLcG9vbF9zdGF0dXMYASABKAsyFi5nb29nbGUucHJvdG9idWYuRW1wdHlIABJACg1zdG9yZV9wcm9ncmFtGAIgASgLMicubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5TdG9yZVByb2dyYW1IABJECg9yZXRyaWV2ZV92YWx1ZXMYAyABKAsyKS5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlJldHJpZXZlVmFsdWVzSAASTgoUcmV0cmlldmVfcGVybWlzc2lvbnMYBCABKAsyLi5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlJldHJpZXZlUGVybWlzc2lvbnNIABI+CgxzdG9yZV92YWx1ZXMYBSABKAsyJi5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlN0b3JlVmFsdWVzSAASTAoOaW52b2tlX2NvbXB1dGUYBiABKAsyMi5uaWxsaW9uLnBheW1lbnRzLnYxLnJlY2VpcHQuSW52b2tlQ29tcHV0ZU1ldGFkYXRhSAASSgoSdXBkYXRlX3Blcm1pc3Npb25zGAcgASgLMiwubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5VcGRhdGVQZXJtaXNzaW9uc0gAQgsKCW9wZXJhdGlvbiKcAQoVSW52b2tlQ29tcHV0ZU1ldGFkYXRhEjcKBXF1b3RlGAEgASgLMigubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5JbnZva2VDb21wdXRlEkoKB29mZnNldHMYAiADKAsyOS5uaWxsaW9uLnBheW1lbnRzLnYxLnJlY2VpcHQuU2VsZWN0ZWRQcmVwcm9jZXNzaW5nT2Zmc2V0cyKXAQocU2VsZWN0ZWRQcmVwcm9jZXNzaW5nT2Zmc2V0cxJHCgdlbGVtZW50GAEgASgOMjYubmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmVsZW1lbnQuUHJlcHJvY2Vzc2luZ0VsZW1lbnQSDQoFc3RhcnQYAiABKAQSCwoDZW5kGAMgASgEEhIKCmJhdGNoX3NpemUYBCABKARCvwEKH2NvbS5uaWxsaW9uLnBheW1lbnRzLnYxLnJlY2VpcHRCDFJlY2VpcHRQcm90b1ABogIETlBWUqoCG05pbGxpb24uUGF5bWVudHMuVjEuUmVjZWlwdMoCG05pbGxpb25cUGF5bWVudHNcVjFcUmVjZWlwdOICJ05pbGxpb25cUGF5bWVudHNcVjFcUmVjZWlwdFxHUEJNZXRhZGF0YeoCHk5pbGxpb246OlBheW1lbnRzOjpWMTo6UmVjZWlwdGIGcHJvdG8z", [file_google_protobuf_timestamp, file_google_protobuf_empty, file_nillion_payments_v1_quote, file_nillion_preprocessing_v1_element]); + +/** + * A request to get a payment receipt for a paid operation. + * + * @generated from message nillion.payments.v1.receipt.PaymentReceiptRequest + */ +export type PaymentReceiptRequest = Message<"nillion.payments.v1.receipt.PaymentReceiptRequest"> & { + /** + * The quote that the user paid for. + * + * @generated from field: nillion.payments.v1.quote.SignedQuote signed_quote = 1; + */ + signedQuote?: SignedQuote; + + /** + * The nilchain transaction hash that proves this payment was made. + * + * @generated from field: string tx_hash = 2; + */ + txHash: string; +}; + +/** + * Describes the message nillion.payments.v1.receipt.PaymentReceiptRequest. + * Use `create(PaymentReceiptRequestSchema)` to create a new message. + */ +export const PaymentReceiptRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 0); + +/** + * A signed receipt that indicates the user paid. + * + * @generated from message nillion.payments.v1.receipt.SignedReceipt + */ +export type SignedReceipt = Message<"nillion.payments.v1.receipt.SignedReceipt"> & { + /** + * The serialized `Receipt`. + * + * @generated from field: bytes receipt = 1; + */ + receipt: Uint8Array; + + /** + * The signature for this receipt. + * + * @generated from field: bytes signature = 2; + */ + signature: Uint8Array; +}; + +/** + * Describes the message nillion.payments.v1.receipt.SignedReceipt. + * Use `create(SignedReceiptSchema)` to create a new message. + */ +export const SignedReceiptSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 1); + +/** + * A receipt for an operation that the user paid for. + * + * @generated from message nillion.payments.v1.receipt.Receipt + */ +export type Receipt = Message<"nillion.payments.v1.receipt.Receipt"> & { + /** + * A unique identifier for this operation. + * + * This allows nodes to independently identify this operation and ensure no receipt is used more than once. + * + * @generated from field: bytes identifier = 1; + */ + identifier: Uint8Array; + + /** + * The metadata for this receipt; + * + * @generated from field: nillion.payments.v1.receipt.OperationMetadata metadata = 2; + */ + metadata?: OperationMetadata; + + /** + * The point in time at which this receipt expires and can no longer be used to invoke the associated + * operation in the network. + * + * @generated from field: google.protobuf.Timestamp expires_at = 3; + */ + expiresAt?: Timestamp; +}; + +/** + * Describes the message nillion.payments.v1.receipt.Receipt. + * Use `create(ReceiptSchema)` to create a new message. + */ +export const ReceiptSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 2); + +/** + * The metadata associated with the operation this receipt is for. + * + * @generated from message nillion.payments.v1.receipt.OperationMetadata + */ +export type OperationMetadata = Message<"nillion.payments.v1.receipt.OperationMetadata"> & { + /** + * @generated from oneof nillion.payments.v1.receipt.OperationMetadata.operation + */ + operation: { + /** + * A preprocessing pool status operation. + * + * @generated from field: google.protobuf.Empty pool_status = 1; + */ + value: Empty; + case: "poolStatus"; + } | { + /** + * A store program operation. + * + * @generated from field: nillion.payments.v1.quote.StoreProgram store_program = 2; + */ + value: StoreProgram; + case: "storeProgram"; + } | { + /** + * A retrieve values operation. + * + * @generated from field: nillion.payments.v1.quote.RetrieveValues retrieve_values = 3; + */ + value: RetrieveValues; + case: "retrieveValues"; + } | { + /** + * A retrieve permissions operation. + * + * @generated from field: nillion.payments.v1.quote.RetrievePermissions retrieve_permissions = 4; + */ + value: RetrievePermissions; + case: "retrievePermissions"; + } | { + /** + * A store values operation. + * + * @generated from field: nillion.payments.v1.quote.StoreValues store_values = 5; + */ + value: StoreValues; + case: "storeValues"; + } | { + /** + * An invoke compute operation. + * + * @generated from field: nillion.payments.v1.receipt.InvokeComputeMetadata invoke_compute = 6; + */ + value: InvokeComputeMetadata; + case: "invokeCompute"; + } | { + /** + * An update permissions operation. + * + * @generated from field: nillion.payments.v1.quote.UpdatePermissions update_permissions = 7; + */ + value: UpdatePermissions; + case: "updatePermissions"; + } | { case: undefined; value?: undefined }; +}; + +/** + * Describes the message nillion.payments.v1.receipt.OperationMetadata. + * Use `create(OperationMetadataSchema)` to create a new message. + */ +export const OperationMetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 3); + +/** + * The metadata for an invoke compute operation. + * + * @generated from message nillion.payments.v1.receipt.InvokeComputeMetadata + */ +export type InvokeComputeMetadata = Message<"nillion.payments.v1.receipt.InvokeComputeMetadata"> & { + /** + * The invoke compute quote. + * + * @generated from field: nillion.payments.v1.quote.InvokeCompute quote = 1; + */ + quote?: InvokeCompute; + + /** + * The selected preprocessing offsets for this operation. + * + * @generated from field: repeated nillion.payments.v1.receipt.SelectedPreprocessingOffsets offsets = 2; + */ + offsets: SelectedPreprocessingOffsets[]; +}; + +/** + * Describes the message nillion.payments.v1.receipt.InvokeComputeMetadata. + * Use `create(InvokeComputeMetadataSchema)` to create a new message. + */ +export const InvokeComputeMetadataSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 4); + +/** + * The selected offsets for a preprocessing element. + * + * This is closed-open set, e.g. [start, end) + * + * @generated from message nillion.payments.v1.receipt.SelectedPreprocessingOffsets + */ +export type SelectedPreprocessingOffsets = Message<"nillion.payments.v1.receipt.SelectedPreprocessingOffsets"> & { + /** + * The preprocessing element. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 1; + */ + element: PreprocessingElement; + + /** + * The first offset in the range. + * + * @generated from field: uint64 start = 2; + */ + start: bigint; + + /** + * The one-past-the-end offset in this range. + * + * @generated from field: uint64 end = 3; + */ + end: bigint; + + /** + * The size of all batches involved in the selected range. + * + * @generated from field: uint64 batch_size = 4; + */ + batchSize: bigint; +}; + +/** + * Describes the message nillion.payments.v1.receipt.SelectedPreprocessingOffsets. + * Use `create(SelectedPreprocessingOffsetsSchema)` to create a new message. + */ +export const SelectedPreprocessingOffsetsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_payments_v1_receipt, 5); + diff --git a/packages/client-vms/src/gen-proto/nillion/payments/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/payments/v1/service_pb.ts new file mode 100644 index 0000000..b62491b --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/payments/v1/service_pb.ts @@ -0,0 +1,46 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/payments/v1/service.proto (package nillion.payments.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PriceQuoteRequestSchema, SignedQuoteSchema } from "./quote_pb"; +import { file_nillion_payments_v1_quote } from "./quote_pb"; +import type { PaymentReceiptRequestSchema, SignedReceiptSchema } from "./receipt_pb"; +import { file_nillion_payments_v1_receipt } from "./receipt_pb"; + +/** + * Describes the file nillion/payments/v1/service.proto. + */ +export const file_nillion_payments_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiFuaWxsaW9uL3BheW1lbnRzL3YxL3NlcnZpY2UucHJvdG8SE25pbGxpb24ucGF5bWVudHMudjEy4AEKCFBheW1lbnRzEmIKClByaWNlUXVvdGUSLC5uaWxsaW9uLnBheW1lbnRzLnYxLnF1b3RlLlByaWNlUXVvdGVSZXF1ZXN0GiYubmlsbGlvbi5wYXltZW50cy52MS5xdW90ZS5TaWduZWRRdW90ZRJwCg5QYXltZW50UmVjZWlwdBIyLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5QYXltZW50UmVjZWlwdFJlcXVlc3QaKi5uaWxsaW9uLnBheW1lbnRzLnYxLnJlY2VpcHQuU2lnbmVkUmVjZWlwdEKVAQoXY29tLm5pbGxpb24ucGF5bWVudHMudjFCDFNlcnZpY2VQcm90b1ABogIDTlBYqgITTmlsbGlvbi5QYXltZW50cy5WMcoCE05pbGxpb25cUGF5bWVudHNcVjHiAh9OaWxsaW9uXFBheW1lbnRzXFYxXEdQQk1ldGFkYXRh6gIVTmlsbGlvbjo6UGF5bWVudHM6OlYxYgZwcm90bzM", [file_nillion_payments_v1_quote, file_nillion_payments_v1_receipt]); + +/** + * Payments API. + * + * @generated from service nillion.payments.v1.Payments + */ +export const Payments: GenService<{ + /** + * Generate a price quote for an operation. + * + * @generated from rpc nillion.payments.v1.Payments.PriceQuote + */ + priceQuote: { + methodKind: "unary"; + input: typeof PriceQuoteRequestSchema; + output: typeof SignedQuoteSchema; + }, + /** + * Get a payment receipt for a paid operation. + * + * @generated from rpc nillion.payments.v1.Payments.PaymentReceipt + */ + paymentReceipt: { + methodKind: "unary"; + input: typeof PaymentReceiptRequestSchema; + output: typeof SignedReceiptSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_payments_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/permissions/v1/permissions_pb.ts b/packages/client-vms/src/gen-proto/nillion/permissions/v1/permissions_pb.ts new file mode 100644 index 0000000..31a2e8c --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/permissions/v1/permissions_pb.ts @@ -0,0 +1,91 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/permissions/v1/permissions.proto (package nillion.permissions.v1.permissions, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/permissions/v1/permissions.proto. + */ +export const file_nillion_permissions_v1_permissions: GenFile = /*@__PURE__*/ + fileDesc("CihuaWxsaW9uL3Blcm1pc3Npb25zL3YxL3Blcm1pc3Npb25zLnByb3RvEiJuaWxsaW9uLnBlcm1pc3Npb25zLnYxLnBlcm1pc3Npb25zIt4BCgtQZXJtaXNzaW9ucxIVCg1vd25lcl91c2VyX2lkGAEgASgJEiEKGXJldHJpZXZlX2FsbG93ZWRfdXNlcl9pZHMYAiADKAkSHwoXdXBkYXRlX2FsbG93ZWRfdXNlcl9pZHMYAyADKAkSHwoXZGVsZXRlX2FsbG93ZWRfdXNlcl9pZHMYBCADKAkSUwoTY29tcHV0ZV9wZXJtaXNzaW9ucxgFIAMoCzI2Lm5pbGxpb24ucGVybWlzc2lvbnMudjEucGVybWlzc2lvbnMuQ29tcHV0ZVBlcm1pc3Npb25zIjoKEkNvbXB1dGVQZXJtaXNzaW9ucxIPCgd1c2VyX2lkGAEgASgJEhMKC3Byb2dyYW1faWRzGAIgAygJQuYBCiZjb20ubmlsbGlvbi5wZXJtaXNzaW9ucy52MS5wZXJtaXNzaW9uc0IQUGVybWlzc2lvbnNQcm90b1ABogIETlBWUKoCIk5pbGxpb24uUGVybWlzc2lvbnMuVjEuUGVybWlzc2lvbnPKAiJOaWxsaW9uXFBlcm1pc3Npb25zXFYxXFBlcm1pc3Npb25z4gIuTmlsbGlvblxQZXJtaXNzaW9uc1xWMVxQZXJtaXNzaW9uc1xHUEJNZXRhZGF0YeoCJU5pbGxpb246OlBlcm1pc3Npb25zOjpWMTo6UGVybWlzc2lvbnNiBnByb3RvMw"); + +/** + * The permissions for a set of stored values. + * + * @generated from message nillion.permissions.v1.permissions.Permissions + */ +export type Permissions = Message<"nillion.permissions.v1.permissions.Permissions"> & { + /** + * The user id for the owner of these values. + * + * @generated from field: string owner_user_id = 1; + */ + ownerUserId: string; + + /** + * The list of user ids that are allowed to retrieve the stored values. + * + * @generated from field: repeated string retrieve_allowed_user_ids = 2; + */ + retrieveAllowedUserIds: string[]; + + /** + * The list of user ids that are allowed to update the stored values. + * + * @generated from field: repeated string update_allowed_user_ids = 3; + */ + updateAllowedUserIds: string[]; + + /** + * The list of user ids that are allowed to delete the stored values. + * + * @generated from field: repeated string delete_allowed_user_ids = 4; + */ + deleteAllowedUserIds: string[]; + + /** + * The list of compute permissions. + * + * @generated from field: repeated nillion.permissions.v1.permissions.ComputePermissions compute_permissions = 5; + */ + computePermissions: ComputePermissions[]; +}; + +/** + * Describes the message nillion.permissions.v1.permissions.Permissions. + * Use `create(PermissionsSchema)` to create a new message. + */ +export const PermissionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_permissions_v1_permissions, 0); + +/** + * The permissions to execute a program. + * + * @generated from message nillion.permissions.v1.permissions.ComputePermissions + */ +export type ComputePermissions = Message<"nillion.permissions.v1.permissions.ComputePermissions"> & { + /** + * The user id we're granting permissions to. + * + * @generated from field: string user_id = 1; + */ + userId: string; + + /** + * The program ids this user is allowed to use the stored values in. + * + * @generated from field: repeated string program_ids = 2; + */ + programIds: string[]; +}; + +/** + * Describes the message nillion.permissions.v1.permissions.ComputePermissions. + * Use `create(ComputePermissionsSchema)` to create a new message. + */ +export const ComputePermissionsSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_permissions_v1_permissions, 1); + diff --git a/packages/client-vms/src/gen-proto/nillion/permissions/v1/retrieve_pb.ts b/packages/client-vms/src/gen-proto/nillion/permissions/v1/retrieve_pb.ts new file mode 100644 index 0000000..790e9e0 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/permissions/v1/retrieve_pb.ts @@ -0,0 +1,39 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/permissions/v1/retrieve.proto (package nillion.permissions.v1.retrieve, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/permissions/v1/retrieve.proto. + */ +export const file_nillion_permissions_v1_retrieve: GenFile = /*@__PURE__*/ + fileDesc("CiVuaWxsaW9uL3Blcm1pc3Npb25zL3YxL3JldHJpZXZlLnByb3RvEh9uaWxsaW9uLnBlcm1pc3Npb25zLnYxLnJldHJpZXZlImAKGlJldHJpZXZlUGVybWlzc2lvbnNSZXF1ZXN0EkIKDnNpZ25lZF9yZWNlaXB0GAEgASgLMioubmlsbGlvbi5wYXltZW50cy52MS5yZWNlaXB0LlNpZ25lZFJlY2VpcHRC1AEKI2NvbS5uaWxsaW9uLnBlcm1pc3Npb25zLnYxLnJldHJpZXZlQg1SZXRyaWV2ZVByb3RvUAGiAgROUFZSqgIfTmlsbGlvbi5QZXJtaXNzaW9ucy5WMS5SZXRyaWV2ZcoCH05pbGxpb25cUGVybWlzc2lvbnNcVjFcUmV0cmlldmXiAitOaWxsaW9uXFBlcm1pc3Npb25zXFYxXFJldHJpZXZlXEdQQk1ldGFkYXRh6gIiTmlsbGlvbjo6UGVybWlzc2lvbnM6OlYxOjpSZXRyaWV2ZWIGcHJvdG8z", [file_nillion_payments_v1_receipt]); + +/** + * A request to retrieve the permissions associated with a set of previously stored values. + * + * @generated from message nillion.permissions.v1.retrieve.RetrievePermissionsRequest + */ +export type RetrievePermissionsRequest = Message<"nillion.permissions.v1.retrieve.RetrievePermissionsRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `RetrievePermissions` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; +}; + +/** + * Describes the message nillion.permissions.v1.retrieve.RetrievePermissionsRequest. + * Use `create(RetrievePermissionsRequestSchema)` to create a new message. + */ +export const RetrievePermissionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_permissions_v1_retrieve, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/permissions/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/permissions/v1/service_pb.ts new file mode 100644 index 0000000..05047cc --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/permissions/v1/service_pb.ts @@ -0,0 +1,50 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/permissions/v1/service.proto (package nillion.permissions.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { PermissionsSchema } from "./permissions_pb"; +import { file_nillion_permissions_v1_permissions } from "./permissions_pb"; +import type { RetrievePermissionsRequestSchema } from "./retrieve_pb"; +import { file_nillion_permissions_v1_retrieve } from "./retrieve_pb"; +import type { UpdatePermissionsRequestSchema } from "./update_pb"; +import { file_nillion_permissions_v1_update } from "./update_pb"; + +/** + * Describes the file nillion/permissions/v1/service.proto. + */ +export const file_nillion_permissions_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiRuaWxsaW9uL3Blcm1pc3Npb25zL3YxL3NlcnZpY2UucHJvdG8SFm5pbGxpb24ucGVybWlzc2lvbnMudjEy+QEKC1Blcm1pc3Npb25zEoMBChNSZXRyaWV2ZVBlcm1pc3Npb25zEjsubmlsbGlvbi5wZXJtaXNzaW9ucy52MS5yZXRyaWV2ZS5SZXRyaWV2ZVBlcm1pc3Npb25zUmVxdWVzdBovLm5pbGxpb24ucGVybWlzc2lvbnMudjEucGVybWlzc2lvbnMuUGVybWlzc2lvbnMSZAoRVXBkYXRlUGVybWlzc2lvbnMSNy5uaWxsaW9uLnBlcm1pc3Npb25zLnYxLnVwZGF0ZS5VcGRhdGVQZXJtaXNzaW9uc1JlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHlCpAEKGmNvbS5uaWxsaW9uLnBlcm1pc3Npb25zLnYxQgxTZXJ2aWNlUHJvdG9QAaICA05QWKoCFk5pbGxpb24uUGVybWlzc2lvbnMuVjHKAhZOaWxsaW9uXFBlcm1pc3Npb25zXFYx4gIiTmlsbGlvblxQZXJtaXNzaW9uc1xWMVxHUEJNZXRhZGF0YeoCGE5pbGxpb246OlBlcm1pc3Npb25zOjpWMWIGcHJvdG8z", [file_google_protobuf_empty, file_nillion_permissions_v1_permissions, file_nillion_permissions_v1_retrieve, file_nillion_permissions_v1_update]); + +/** + * A service to interact with permissions. + * + * @generated from service nillion.permissions.v1.Permissions + */ +export const Permissions: GenService<{ + /** + * Retrieve the permissions for a set of values. + * + * @generated from rpc nillion.permissions.v1.Permissions.RetrievePermissions + */ + retrievePermissions: { + methodKind: "unary"; + input: typeof RetrievePermissionsRequestSchema; + output: typeof PermissionsSchema; + }, + /** + * Update the permissions for a set of values. + * + * @generated from rpc nillion.permissions.v1.Permissions.UpdatePermissions + */ + updatePermissions: { + methodKind: "unary"; + input: typeof UpdatePermissionsRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_permissions_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/permissions/v1/update_pb.ts b/packages/client-vms/src/gen-proto/nillion/permissions/v1/update_pb.ts new file mode 100644 index 0000000..8ecefd8 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/permissions/v1/update_pb.ts @@ -0,0 +1,46 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/permissions/v1/update.proto (package nillion.permissions.v1.update, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Permissions } from "./permissions_pb"; +import { file_nillion_permissions_v1_permissions } from "./permissions_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/permissions/v1/update.proto. + */ +export const file_nillion_permissions_v1_update: GenFile = /*@__PURE__*/ + fileDesc("CiNuaWxsaW9uL3Blcm1pc3Npb25zL3YxL3VwZGF0ZS5wcm90bxIdbmlsbGlvbi5wZXJtaXNzaW9ucy52MS51cGRhdGUipAEKGFVwZGF0ZVBlcm1pc3Npb25zUmVxdWVzdBJCCg5zaWduZWRfcmVjZWlwdBgBIAEoCzIqLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5TaWduZWRSZWNlaXB0EkQKC3Blcm1pc3Npb25zGAIgASgLMi8ubmlsbGlvbi5wZXJtaXNzaW9ucy52MS5wZXJtaXNzaW9ucy5QZXJtaXNzaW9uc0LIAQohY29tLm5pbGxpb24ucGVybWlzc2lvbnMudjEudXBkYXRlQgtVcGRhdGVQcm90b1ABogIETlBWVaoCHU5pbGxpb24uUGVybWlzc2lvbnMuVjEuVXBkYXRlygIdTmlsbGlvblxQZXJtaXNzaW9uc1xWMVxVcGRhdGXiAilOaWxsaW9uXFBlcm1pc3Npb25zXFYxXFVwZGF0ZVxHUEJNZXRhZGF0YeoCIE5pbGxpb246OlBlcm1pc3Npb25zOjpWMTo6VXBkYXRlYgZwcm90bzM", [file_nillion_payments_v1_receipt, file_nillion_permissions_v1_permissions]); + +/** + * A request to update the permissions associated with a set of previously stored values. + * + * @generated from message nillion.permissions.v1.update.UpdatePermissionsRequest + */ +export type UpdatePermissionsRequest = Message<"nillion.permissions.v1.update.UpdatePermissionsRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `UpdatePermissions` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; + + /** + * @generated from field: nillion.permissions.v1.permissions.Permissions permissions = 2; + */ + permissions?: Permissions; +}; + +/** + * Describes the message nillion.permissions.v1.update.UpdatePermissionsRequest. + * Use `create(UpdatePermissionsRequestSchema)` to create a new message. + */ +export const UpdatePermissionsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_permissions_v1_update, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/cleanup_pb.ts b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/cleanup_pb.ts new file mode 100644 index 0000000..1199e7f --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/cleanup_pb.ts @@ -0,0 +1,51 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/preprocessing/v1/cleanup.proto (package nillion.preprocessing.v1.cleanup, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PreprocessingElement } from "./element_pb"; +import { file_nillion_preprocessing_v1_element } from "./element_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/preprocessing/v1/cleanup.proto. + */ +export const file_nillion_preprocessing_v1_cleanup: GenFile = /*@__PURE__*/ + fileDesc("CiZuaWxsaW9uL3ByZXByb2Nlc3NpbmcvdjEvY2xlYW51cC5wcm90bxIgbmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmNsZWFudXAijQEKGkNsZWFudXBVc2VkRWxlbWVudHNSZXF1ZXN0EkcKB2VsZW1lbnQYASABKA4yNi5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuZWxlbWVudC5QcmVwcm9jZXNzaW5nRWxlbWVudBITCgtzdGFydF9jaHVuaxgCIAEoBBIRCgllbmRfY2h1bmsYAyABKARC2AEKJGNvbS5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuY2xlYW51cEIMQ2xlYW51cFByb3RvUAGiAgROUFZDqgIgTmlsbGlvbi5QcmVwcm9jZXNzaW5nLlYxLkNsZWFudXDKAiBOaWxsaW9uXFByZXByb2Nlc3NpbmdcVjFcQ2xlYW51cOICLE5pbGxpb25cUHJlcHJvY2Vzc2luZ1xWMVxDbGVhbnVwXEdQQk1ldGFkYXRh6gIjTmlsbGlvbjo6UHJlcHJvY2Vzc2luZzo6VjE6OkNsZWFudXBiBnByb3RvMw", [file_nillion_preprocessing_v1_element]); + +/** + * A request to cleanup used preprocessing elements. + * + * @generated from message nillion.preprocessing.v1.cleanup.CleanupUsedElementsRequest + */ +export type CleanupUsedElementsRequest = Message<"nillion.preprocessing.v1.cleanup.CleanupUsedElementsRequest"> & { + /** + * The element to be cleanedup. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 1; + */ + element: PreprocessingElement; + + /** + * The first chunk to be deleted. + * + * @generated from field: uint64 start_chunk = 2; + */ + startChunk: bigint; + + /** + * The one-past-the-end chunk index to be deleted. + * + * @generated from field: uint64 end_chunk = 3; + */ + endChunk: bigint; +}; + +/** + * Describes the message nillion.preprocessing.v1.cleanup.CleanupUsedElementsRequest. + * Use `create(CleanupUsedElementsRequestSchema)` to create a new message. + */ +export const CleanupUsedElementsRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_preprocessing_v1_cleanup, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/element_pb.ts b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/element_pb.ts new file mode 100644 index 0000000..172f3a8 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/element_pb.ts @@ -0,0 +1,76 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/preprocessing/v1/element.proto (package nillion.preprocessing.v1.element, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc } from "@bufbuild/protobuf/codegenv1"; + +/** + * Describes the file nillion/preprocessing/v1/element.proto. + */ +export const file_nillion_preprocessing_v1_element: GenFile = /*@__PURE__*/ + fileDesc("CiZuaWxsaW9uL3ByZXByb2Nlc3NpbmcvdjEvZWxlbWVudC5wcm90bxIgbmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmVsZW1lbnQqywEKFFByZXByb2Nlc3NpbmdFbGVtZW50EgkKBUFMUEhBEAASCgoGTEFNQkRBEAESCwoHQ09NUEFSRRACEhsKF0RJVklTSU9OX1NFQ1JFVF9ESVZJU09SEAMSGgoWRVFVQUxJVFlfU0VDUkVUX09VVFBVVBAEEhoKFkVRVUFMSVRZX1BVQkxJQ19PVVRQVVQQBRIVChFTSEFSRV9UT19QQVJUSUNMRRAGEgoKBk1PRFVMTxAHEgkKBVRSVU5DEAgSDAoIVFJVTkNfUFIQCULYAQokY29tLm5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5lbGVtZW50QgxFbGVtZW50UHJvdG9QAaICBE5QVkWqAiBOaWxsaW9uLlByZXByb2Nlc3NpbmcuVjEuRWxlbWVudMoCIE5pbGxpb25cUHJlcHJvY2Vzc2luZ1xWMVxFbGVtZW504gIsTmlsbGlvblxQcmVwcm9jZXNzaW5nXFYxXEVsZW1lbnRcR1BCTWV0YWRhdGHqAiNOaWxsaW9uOjpQcmVwcm9jZXNzaW5nOjpWMTo6RWxlbWVudGIGcHJvdG8z"); + +/** + * A preprocessing element. + * + * @generated from enum nillion.preprocessing.v1.element.PreprocessingElement + */ +export enum PreprocessingElement { + /** + * @generated from enum value: ALPHA = 0; + */ + ALPHA = 0, + + /** + * @generated from enum value: LAMBDA = 1; + */ + LAMBDA = 1, + + /** + * @generated from enum value: COMPARE = 2; + */ + COMPARE = 2, + + /** + * @generated from enum value: DIVISION_SECRET_DIVISOR = 3; + */ + DIVISION_SECRET_DIVISOR = 3, + + /** + * @generated from enum value: EQUALITY_SECRET_OUTPUT = 4; + */ + EQUALITY_SECRET_OUTPUT = 4, + + /** + * @generated from enum value: EQUALITY_PUBLIC_OUTPUT = 5; + */ + EQUALITY_PUBLIC_OUTPUT = 5, + + /** + * @generated from enum value: SHARE_TO_PARTICLE = 6; + */ + SHARE_TO_PARTICLE = 6, + + /** + * @generated from enum value: MODULO = 7; + */ + MODULO = 7, + + /** + * @generated from enum value: TRUNC = 8; + */ + TRUNC = 8, + + /** + * @generated from enum value: TRUNC_PR = 9; + */ + TRUNC_PR = 9, +} + +/** + * Describes the enum nillion.preprocessing.v1.element.PreprocessingElement. + */ +export const PreprocessingElementSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_nillion_preprocessing_v1_element, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/generate_pb.ts b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/generate_pb.ts new file mode 100644 index 0000000..213ab9d --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/generate_pb.ts @@ -0,0 +1,115 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/preprocessing/v1/generate.proto (package nillion.preprocessing.v1.generate, syntax proto3) +/* eslint-disable */ + +import type { GenEnum, GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { enumDesc, fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PreprocessingElement } from "./element_pb"; +import { file_nillion_preprocessing_v1_element } from "./element_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/preprocessing/v1/generate.proto. + */ +export const file_nillion_preprocessing_v1_generate: GenFile = /*@__PURE__*/ + fileDesc("CiduaWxsaW9uL3ByZXByb2Nlc3NpbmcvdjEvZ2VuZXJhdGUucHJvdG8SIW5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5nZW5lcmF0ZSKkAQocR2VuZXJhdGVQcmVwcm9jZXNzaW5nUmVxdWVzdBIVCg1nZW5lcmF0aW9uX2lkGAEgASgMEhAKCGJhdGNoX2lkGAIgASgEEhIKCmJhdGNoX3NpemUYAyABKA0SRwoHZWxlbWVudBgEIAEoDjI2Lm5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5lbGVtZW50LlByZXByb2Nlc3NpbmdFbGVtZW50Im8KHUdlbmVyYXRlUHJlcHJvY2Vzc2luZ1Jlc3BvbnNlEk4KBnN0YXR1cxgBIAEoDjI+Lm5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5nZW5lcmF0ZS5QcmVwcm9jZXNzaW5nUHJvdG9jb2xTdGF0dXMqXAobUHJlcHJvY2Vzc2luZ1Byb3RvY29sU3RhdHVzEhEKDVdBSVRJTkdfUEVFUlMQABIUChBGSU5JU0hFRF9TVUNDRVNTEAESFAoQRklOSVNIRURfRkFJTFVSRRACQt4BCiVjb20ubmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxLmdlbmVyYXRlQg1HZW5lcmF0ZVByb3RvUAGiAgROUFZHqgIhTmlsbGlvbi5QcmVwcm9jZXNzaW5nLlYxLkdlbmVyYXRlygIhTmlsbGlvblxQcmVwcm9jZXNzaW5nXFYxXEdlbmVyYXRl4gItTmlsbGlvblxQcmVwcm9jZXNzaW5nXFYxXEdlbmVyYXRlXEdQQk1ldGFkYXRh6gIkTmlsbGlvbjo6UHJlcHJvY2Vzc2luZzo6VjE6OkdlbmVyYXRlYgZwcm90bzM", [file_nillion_preprocessing_v1_element]); + +/** + * A request to generate preprocessing material. + * + * @generated from message nillion.preprocessing.v1.generate.GeneratePreprocessingRequest + */ +export type GeneratePreprocessingRequest = Message<"nillion.preprocessing.v1.generate.GeneratePreprocessingRequest"> & { + /** + * An identifier for this generation instance. + * + * @generated from field: bytes generation_id = 1; + */ + generationId: Uint8Array; + + /** + * The batch id that is being generated. + * + * This is a sequential number per preprocessing element. + * + * @generated from field: uint64 batch_id = 2; + */ + batchId: bigint; + + /** + * The number of elements being generated. + * + * @generated from field: uint32 batch_size = 3; + */ + batchSize: number; + + /** + * The preprocessing element being generated. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 4; + */ + element: PreprocessingElement; +}; + +/** + * Describes the message nillion.preprocessing.v1.generate.GeneratePreprocessingRequest. + * Use `create(GeneratePreprocessingRequestSchema)` to create a new message. + */ +export const GeneratePreprocessingRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_preprocessing_v1_generate, 0); + +/** + * A response to a request to generate preprocessing material. + * + * @generated from message nillion.preprocessing.v1.generate.GeneratePreprocessingResponse + */ +export type GeneratePreprocessingResponse = Message<"nillion.preprocessing.v1.generate.GeneratePreprocessingResponse"> & { + /** + * The status of the preprocessing protocol. + * + * @generated from field: nillion.preprocessing.v1.generate.PreprocessingProtocolStatus status = 1; + */ + status: PreprocessingProtocolStatus; +}; + +/** + * Describes the message nillion.preprocessing.v1.generate.GeneratePreprocessingResponse. + * Use `create(GeneratePreprocessingResponseSchema)` to create a new message. + */ +export const GeneratePreprocessingResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_preprocessing_v1_generate, 1); + +/** + * The status of a preprocessing protocol execution. + * + * @generated from enum nillion.preprocessing.v1.generate.PreprocessingProtocolStatus + */ +export enum PreprocessingProtocolStatus { + /** + * The protocol is waiting for peer initialization. + * + * @generated from enum value: WAITING_PEERS = 0; + */ + WAITING_PEERS = 0, + + /** + * The protocol finished successfully. + * + * @generated from enum value: FINISHED_SUCCESS = 1; + */ + FINISHED_SUCCESS = 1, + + /** + * The protocol finished with an error. + * + * @generated from enum value: FINISHED_FAILURE = 2; + */ + FINISHED_FAILURE = 2, +} + +/** + * Describes the enum nillion.preprocessing.v1.generate.PreprocessingProtocolStatus. + */ +export const PreprocessingProtocolStatusSchema: GenEnum = /*@__PURE__*/ + enumDesc(file_nillion_preprocessing_v1_generate, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/service_pb.ts new file mode 100644 index 0000000..75bdccf --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/service_pb.ts @@ -0,0 +1,60 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/preprocessing/v1/service.proto (package nillion.preprocessing.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { GeneratePreprocessingRequestSchema, GeneratePreprocessingResponseSchema } from "./generate_pb"; +import { file_nillion_preprocessing_v1_generate } from "./generate_pb"; +import type { PreprocessingStreamMessageSchema } from "./stream_pb"; +import { file_nillion_preprocessing_v1_stream } from "./stream_pb"; +import type { CleanupUsedElementsRequestSchema } from "./cleanup_pb"; +import { file_nillion_preprocessing_v1_cleanup } from "./cleanup_pb"; + +/** + * Describes the file nillion/preprocessing/v1/service.proto. + */ +export const file_nillion_preprocessing_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiZuaWxsaW9uL3ByZXByb2Nlc3NpbmcvdjEvc2VydmljZS5wcm90bxIYbmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxMokDCg1QcmVwcm9jZXNzaW5nEpwBChVHZW5lcmF0ZVByZXByb2Nlc3NpbmcSPy5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuZ2VuZXJhdGUuR2VuZXJhdGVQcmVwcm9jZXNzaW5nUmVxdWVzdBpALm5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5nZW5lcmF0ZS5HZW5lcmF0ZVByZXByb2Nlc3NpbmdSZXNwb25zZTABEmwKE1N0cmVhbVByZXByb2Nlc3NpbmcSOy5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuc3RyZWFtLlByZXByb2Nlc3NpbmdTdHJlYW1NZXNzYWdlGhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5KAESawoTQ2xlYW51cFVzZWRFbGVtZW50cxI8Lm5pbGxpb24ucHJlcHJvY2Vzc2luZy52MS5jbGVhbnVwLkNsZWFudXBVc2VkRWxlbWVudHNSZXF1ZXN0GhYuZ29vZ2xlLnByb3RvYnVmLkVtcHR5Qq4BChxjb20ubmlsbGlvbi5wcmVwcm9jZXNzaW5nLnYxQgxTZXJ2aWNlUHJvdG9QAaICA05QWKoCGE5pbGxpb24uUHJlcHJvY2Vzc2luZy5WMcoCGE5pbGxpb25cUHJlcHJvY2Vzc2luZ1xWMeICJE5pbGxpb25cUHJlcHJvY2Vzc2luZ1xWMVxHUEJNZXRhZGF0YeoCGk5pbGxpb246OlByZXByb2Nlc3Npbmc6OlYxYgZwcm90bzM", [file_google_protobuf_empty, file_nillion_preprocessing_v1_generate, file_nillion_preprocessing_v1_stream, file_nillion_preprocessing_v1_cleanup]); + +/** + * A service to run preprocessing related actions. + * + * @generated from service nillion.preprocessing.v1.Preprocessing + */ +export const Preprocessing: GenService<{ + /** + * Trigger the generation of preprocessing material. + * + * @generated from rpc nillion.preprocessing.v1.Preprocessing.GeneratePreprocessing + */ + generatePreprocessing: { + methodKind: "server_streaming"; + input: typeof GeneratePreprocessingRequestSchema; + output: typeof GeneratePreprocessingResponseSchema; + }, + /** + * Open a stream to generate a preprocessing element. + * + * @generated from rpc nillion.preprocessing.v1.Preprocessing.StreamPreprocessing + */ + streamPreprocessing: { + methodKind: "client_streaming"; + input: typeof PreprocessingStreamMessageSchema; + output: typeof EmptySchema; + }, + /** + * Cleanup used preprocessing chunks. + * + * @generated from rpc nillion.preprocessing.v1.Preprocessing.CleanupUsedElements + */ + cleanupUsedElements: { + methodKind: "unary"; + input: typeof CleanupUsedElementsRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_preprocessing_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/stream_pb.ts b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/stream_pb.ts new file mode 100644 index 0000000..8f943af --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/preprocessing/v1/stream_pb.ts @@ -0,0 +1,57 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/preprocessing/v1/stream.proto (package nillion.preprocessing.v1.stream, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { PreprocessingElement } from "./element_pb"; +import { file_nillion_preprocessing_v1_element } from "./element_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/preprocessing/v1/stream.proto. + */ +export const file_nillion_preprocessing_v1_stream: GenFile = /*@__PURE__*/ + fileDesc("CiVuaWxsaW9uL3ByZXByb2Nlc3NpbmcvdjEvc3RyZWFtLnByb3RvEh9uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuc3RyZWFtIpUBChpQcmVwcm9jZXNzaW5nU3RyZWFtTWVzc2FnZRIVCg1nZW5lcmF0aW9uX2lkGAEgASgMEkcKB2VsZW1lbnQYAiABKA4yNi5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuZWxlbWVudC5QcmVwcm9jZXNzaW5nRWxlbWVudBIXCg9iaW5jb2RlX21lc3NhZ2UYAyABKAxC0gEKI2NvbS5uaWxsaW9uLnByZXByb2Nlc3NpbmcudjEuc3RyZWFtQgtTdHJlYW1Qcm90b1ABogIETlBWU6oCH05pbGxpb24uUHJlcHJvY2Vzc2luZy5WMS5TdHJlYW3KAh9OaWxsaW9uXFByZXByb2Nlc3NpbmdcVjFcU3RyZWFt4gIrTmlsbGlvblxQcmVwcm9jZXNzaW5nXFYxXFN0cmVhbVxHUEJNZXRhZGF0YeoCIk5pbGxpb246OlByZXByb2Nlc3Npbmc6OlYxOjpTdHJlYW1iBnByb3RvMw", [file_nillion_preprocessing_v1_element]); + +/** + * A message sent between nodes during the execution of a preprocessing protocol. + * + * @generated from message nillion.preprocessing.v1.stream.PreprocessingStreamMessage + */ +export type PreprocessingStreamMessage = Message<"nillion.preprocessing.v1.stream.PreprocessingStreamMessage"> & { + /** + * An identifier for the instance of the generation being ran. + * + * Only the first ever message on the stream requires having this attribute set. Any subsequent message will + * have this field ignored. + * + * @generated from field: bytes generation_id = 1; + */ + generationId: Uint8Array; + + /** + * The element being generated. + * + * Only the first ever message on the stream requires having this attribute set. Any subsequent message will + * have this field ignored. + * + * @generated from field: nillion.preprocessing.v1.element.PreprocessingElement element = 2; + */ + element: PreprocessingElement; + + /** + * The preprocessing message in bincode format. + * + * @generated from field: bytes bincode_message = 3; + */ + bincodeMessage: Uint8Array; +}; + +/** + * Describes the message nillion.preprocessing.v1.stream.PreprocessingStreamMessage. + * Use `create(PreprocessingStreamMessageSchema)` to create a new message. + */ +export const PreprocessingStreamMessageSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_preprocessing_v1_stream, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/programs/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/programs/v1/service_pb.ts new file mode 100644 index 0000000..443263a --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/programs/v1/service_pb.ts @@ -0,0 +1,34 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/programs/v1/service.proto (package nillion.programs.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { StoreProgramRequestSchema, StoreProgramResponseSchema } from "./store_pb"; +import { file_nillion_programs_v1_store } from "./store_pb"; + +/** + * Describes the file nillion/programs/v1/service.proto. + */ +export const file_nillion_programs_v1_service: GenFile = /*@__PURE__*/ + fileDesc("CiFuaWxsaW9uL3Byb2dyYW1zL3YxL3NlcnZpY2UucHJvdG8SE25pbGxpb24ucHJvZ3JhbXMudjEyewoIUHJvZ3JhbXMSbwoMU3RvcmVQcm9ncmFtEi4ubmlsbGlvbi5wcm9ncmFtcy52MS5zdG9yZS5TdG9yZVByb2dyYW1SZXF1ZXN0Gi8ubmlsbGlvbi5wcm9ncmFtcy52MS5zdG9yZS5TdG9yZVByb2dyYW1SZXNwb25zZUKVAQoXY29tLm5pbGxpb24ucHJvZ3JhbXMudjFCDFNlcnZpY2VQcm90b1ABogIDTlBYqgITTmlsbGlvbi5Qcm9ncmFtcy5WMcoCE05pbGxpb25cUHJvZ3JhbXNcVjHiAh9OaWxsaW9uXFByb2dyYW1zXFYxXEdQQk1ldGFkYXRh6gIVTmlsbGlvbjo6UHJvZ3JhbXM6OlYxYgZwcm90bzM", [file_nillion_programs_v1_store]); + +/** + * A service to manage programs. + * + * @generated from service nillion.programs.v1.Programs + */ +export const Programs: GenService<{ + /** + * Store a program in the network. + * + * @generated from rpc nillion.programs.v1.Programs.StoreProgram + */ + storeProgram: { + methodKind: "unary"; + input: typeof StoreProgramRequestSchema; + output: typeof StoreProgramResponseSchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_programs_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/programs/v1/store_pb.ts b/packages/client-vms/src/gen-proto/nillion/programs/v1/store_pb.ts new file mode 100644 index 0000000..ecbda42 --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/programs/v1/store_pb.ts @@ -0,0 +1,67 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/programs/v1/store.proto (package nillion.programs.v1.store, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/programs/v1/store.proto. + */ +export const file_nillion_programs_v1_store: GenFile = /*@__PURE__*/ + fileDesc("Ch9uaWxsaW9uL3Byb2dyYW1zL3YxL3N0b3JlLnByb3RvEhluaWxsaW9uLnByb2dyYW1zLnYxLnN0b3JlImoKE1N0b3JlUHJvZ3JhbVJlcXVlc3QSDwoHcHJvZ3JhbRgBIAEoDBJCCg5zaWduZWRfcmVjZWlwdBgCIAEoCzIqLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5TaWduZWRSZWNlaXB0IioKFFN0b3JlUHJvZ3JhbVJlc3BvbnNlEhIKCnByb2dyYW1faWQYASABKAlCswEKHWNvbS5uaWxsaW9uLnByb2dyYW1zLnYxLnN0b3JlQgpTdG9yZVByb3RvUAGiAgROUFZTqgIZTmlsbGlvbi5Qcm9ncmFtcy5WMS5TdG9yZcoCGU5pbGxpb25cUHJvZ3JhbXNcVjFcU3RvcmXiAiVOaWxsaW9uXFByb2dyYW1zXFYxXFN0b3JlXEdQQk1ldGFkYXRh6gIcTmlsbGlvbjo6UHJvZ3JhbXM6OlYxOjpTdG9yZWIGcHJvdG8z", [file_nillion_payments_v1_receipt]); + +/** + * A request to store a program in the network. + * + * @generated from message nillion.programs.v1.store.StoreProgramRequest + */ +export type StoreProgramRequest = Message<"nillion.programs.v1.store.StoreProgramRequest"> & { + /** + * The contents of the program. + * + * @generated from field: bytes program = 1; + */ + program: Uint8Array; + + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `StoreProgram` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 2; + */ + signedReceipt?: SignedReceipt; +}; + +/** + * Describes the message nillion.programs.v1.store.StoreProgramRequest. + * Use `create(StoreProgramRequestSchema)` to create a new message. + */ +export const StoreProgramRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_programs_v1_store, 0); + +/** + * A response to a request to store a program in the network. + * + * @generated from message nillion.programs.v1.store.StoreProgramResponse + */ +export type StoreProgramResponse = Message<"nillion.programs.v1.store.StoreProgramResponse"> & { + /** + * The program identifier. + * + * @generated from field: string program_id = 1; + */ + programId: string; +}; + +/** + * Describes the message nillion.programs.v1.store.StoreProgramResponse. + * Use `create(StoreProgramResponseSchema)` to create a new message. + */ +export const StoreProgramResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_programs_v1_store, 1); + diff --git a/packages/client-vms/src/gen-proto/nillion/values/v1/delete_pb.ts b/packages/client-vms/src/gen-proto/nillion/values/v1/delete_pb.ts new file mode 100644 index 0000000..2e4ac4b --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/values/v1/delete_pb.ts @@ -0,0 +1,35 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/values/v1/delete.proto (package nillion.values.v1.delete, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/values/v1/delete.proto. + */ +export const file_nillion_values_v1_delete: GenFile = /*@__PURE__*/ + fileDesc("Ch5uaWxsaW9uL3ZhbHVlcy92MS9kZWxldGUucHJvdG8SGG5pbGxpb24udmFsdWVzLnYxLmRlbGV0ZSIoChNEZWxldGVWYWx1ZXNSZXF1ZXN0EhEKCXZhbHVlc19pZBgBIAEoDEKvAQocY29tLm5pbGxpb24udmFsdWVzLnYxLmRlbGV0ZUILRGVsZXRlUHJvdG9QAaICBE5WVkSqAhhOaWxsaW9uLlZhbHVlcy5WMS5EZWxldGXKAhhOaWxsaW9uXFZhbHVlc1xWMVxEZWxldGXiAiROaWxsaW9uXFZhbHVlc1xWMVxEZWxldGVcR1BCTWV0YWRhdGHqAhtOaWxsaW9uOjpWYWx1ZXM6OlYxOjpEZWxldGViBnByb3RvMw"); + +/** + * A request to delete a previously stored set of values. + * + * @generated from message nillion.values.v1.delete.DeleteValuesRequest + */ +export type DeleteValuesRequest = Message<"nillion.values.v1.delete.DeleteValuesRequest"> & { + /** + * The identifier of the values entity to be deleted. + * + * @generated from field: bytes values_id = 1; + */ + valuesId: Uint8Array; +}; + +/** + * Describes the message nillion.values.v1.delete.DeleteValuesRequest. + * Use `create(DeleteValuesRequestSchema)` to create a new message. + */ +export const DeleteValuesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_values_v1_delete, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/values/v1/retrieve_pb.ts b/packages/client-vms/src/gen-proto/nillion/values/v1/retrieve_pb.ts new file mode 100644 index 0000000..0867fec --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/values/v1/retrieve_pb.ts @@ -0,0 +1,60 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/values/v1/retrieve.proto (package nillion.values.v1.retrieve, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/values/v1/retrieve.proto. + */ +export const file_nillion_values_v1_retrieve: GenFile = /*@__PURE__*/ + fileDesc("CiBuaWxsaW9uL3ZhbHVlcy92MS9yZXRyaWV2ZS5wcm90bxIabmlsbGlvbi52YWx1ZXMudjEucmV0cmlldmUiWwoVUmV0cmlldmVWYWx1ZXNSZXF1ZXN0EkIKDnNpZ25lZF9yZWNlaXB0GAEgASgLMioubmlsbGlvbi5wYXltZW50cy52MS5yZWNlaXB0LlNpZ25lZFJlY2VpcHQiMAoWUmV0cmlldmVWYWx1ZXNSZXNwb25zZRIWCg5iaW5jb2RlX3ZhbHVlcxgBIAEoDEK7AQoeY29tLm5pbGxpb24udmFsdWVzLnYxLnJldHJpZXZlQg1SZXRyaWV2ZVByb3RvUAGiAgROVlZSqgIaTmlsbGlvbi5WYWx1ZXMuVjEuUmV0cmlldmXKAhpOaWxsaW9uXFZhbHVlc1xWMVxSZXRyaWV2ZeICJk5pbGxpb25cVmFsdWVzXFYxXFJldHJpZXZlXEdQQk1ldGFkYXRh6gIdTmlsbGlvbjo6VmFsdWVzOjpWMTo6UmV0cmlldmViBnByb3RvMw", [file_nillion_payments_v1_receipt]); + +/** + * A request to retrieve a set of stored values. + * + * @generated from message nillion.values.v1.retrieve.RetrieveValuesRequest + */ +export type RetrieveValuesRequest = Message<"nillion.values.v1.retrieve.RetrieveValuesRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `RetrieveValues` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; +}; + +/** + * Describes the message nillion.values.v1.retrieve.RetrieveValuesRequest. + * Use `create(RetrieveValuesRequestSchema)` to create a new message. + */ +export const RetrieveValuesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_values_v1_retrieve, 0); + +/** + * A response to a request to retrieve values stored in the network. + * + * @generated from message nillion.values.v1.retrieve.RetrieveValuesResponse + */ +export type RetrieveValuesResponse = Message<"nillion.values.v1.retrieve.RetrieveValuesResponse"> & { + /** + * The values encoded in bincode format. + * + * @generated from field: bytes bincode_values = 1; + */ + bincodeValues: Uint8Array; +}; + +/** + * Describes the message nillion.values.v1.retrieve.RetrieveValuesResponse. + * Use `create(RetrieveValuesResponseSchema)` to create a new message. + */ +export const RetrieveValuesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_values_v1_retrieve, 1); + diff --git a/packages/client-vms/src/gen-proto/nillion/values/v1/service_pb.ts b/packages/client-vms/src/gen-proto/nillion/values/v1/service_pb.ts new file mode 100644 index 0000000..f55214e --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/values/v1/service_pb.ts @@ -0,0 +1,60 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/values/v1/service.proto (package nillion.values.v1, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenService } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, serviceDesc } from "@bufbuild/protobuf/codegenv1"; +import type { EmptySchema } from "@bufbuild/protobuf/wkt"; +import { file_google_protobuf_empty } from "@bufbuild/protobuf/wkt"; +import type { DeleteValuesRequestSchema } from "./delete_pb"; +import { file_nillion_values_v1_delete } from "./delete_pb"; +import type { RetrieveValuesRequestSchema, RetrieveValuesResponseSchema } from "./retrieve_pb"; +import { file_nillion_values_v1_retrieve } from "./retrieve_pb"; +import type { StoreValuesRequestSchema, StoreValuesResponseSchema } from "./store_pb"; +import { file_nillion_values_v1_store } from "./store_pb"; + +/** + * Describes the file nillion/values/v1/service.proto. + */ +export const file_nillion_values_v1_service: GenFile = /*@__PURE__*/ + fileDesc("Ch9uaWxsaW9uL3ZhbHVlcy92MS9zZXJ2aWNlLnByb3RvEhFuaWxsaW9uLnZhbHVlcy52MTLCAgoGVmFsdWVzEmgKC1N0b3JlVmFsdWVzEisubmlsbGlvbi52YWx1ZXMudjEuc3RvcmUuU3RvcmVWYWx1ZXNSZXF1ZXN0GiwubmlsbGlvbi52YWx1ZXMudjEuc3RvcmUuU3RvcmVWYWx1ZXNSZXNwb25zZRJ3Cg5SZXRyaWV2ZVZhbHVlcxIxLm5pbGxpb24udmFsdWVzLnYxLnJldHJpZXZlLlJldHJpZXZlVmFsdWVzUmVxdWVzdBoyLm5pbGxpb24udmFsdWVzLnYxLnJldHJpZXZlLlJldHJpZXZlVmFsdWVzUmVzcG9uc2USVQoMRGVsZXRlVmFsdWVzEi0ubmlsbGlvbi52YWx1ZXMudjEuZGVsZXRlLkRlbGV0ZVZhbHVlc1JlcXVlc3QaFi5nb29nbGUucHJvdG9idWYuRW1wdHlCiwEKFWNvbS5uaWxsaW9uLnZhbHVlcy52MUIMU2VydmljZVByb3RvUAGiAgNOVliqAhFOaWxsaW9uLlZhbHVlcy5WMcoCEU5pbGxpb25cVmFsdWVzXFYx4gIdTmlsbGlvblxWYWx1ZXNcVjFcR1BCTWV0YWRhdGHqAhNOaWxsaW9uOjpWYWx1ZXM6OlYxYgZwcm90bzM", [file_google_protobuf_empty, file_nillion_values_v1_delete, file_nillion_values_v1_retrieve, file_nillion_values_v1_store]); + +/** + * A service to interact with values (secrets, public values, etc). + * + * @generated from service nillion.values.v1.Values + */ +export const Values: GenService<{ + /** + * Store values in the network. + * + * @generated from rpc nillion.values.v1.Values.StoreValues + */ + storeValues: { + methodKind: "unary"; + input: typeof StoreValuesRequestSchema; + output: typeof StoreValuesResponseSchema; + }, + /** + * Retrieve values from the network. + * + * @generated from rpc nillion.values.v1.Values.RetrieveValues + */ + retrieveValues: { + methodKind: "unary"; + input: typeof RetrieveValuesRequestSchema; + output: typeof RetrieveValuesResponseSchema; + }, + /** + * Delete values from the network. + * + * @generated from rpc nillion.values.v1.Values.DeleteValues + */ + deleteValues: { + methodKind: "unary"; + input: typeof DeleteValuesRequestSchema; + output: typeof EmptySchema; + }, +}> = /*@__PURE__*/ + serviceDesc(file_nillion_values_v1_service, 0); + diff --git a/packages/client-vms/src/gen-proto/nillion/values/v1/store_pb.ts b/packages/client-vms/src/gen-proto/nillion/values/v1/store_pb.ts new file mode 100644 index 0000000..2b116cf --- /dev/null +++ b/packages/client-vms/src/gen-proto/nillion/values/v1/store_pb.ts @@ -0,0 +1,92 @@ +// @generated by protoc-gen-es v2.1.0 with parameter "target=ts" +// @generated from file nillion/values/v1/store.proto (package nillion.values.v1.store, syntax proto3) +/* eslint-disable */ + +import type { GenFile, GenMessage } from "@bufbuild/protobuf/codegenv1"; +import { fileDesc, messageDesc } from "@bufbuild/protobuf/codegenv1"; +import type { SignedReceipt } from "../../payments/v1/receipt_pb"; +import { file_nillion_payments_v1_receipt } from "../../payments/v1/receipt_pb"; +import type { Permissions } from "../../permissions/v1/permissions_pb"; +import { file_nillion_permissions_v1_permissions } from "../../permissions/v1/permissions_pb"; +import type { Message } from "@bufbuild/protobuf"; + +/** + * Describes the file nillion/values/v1/store.proto. + */ +export const file_nillion_values_v1_store: GenFile = /*@__PURE__*/ + fileDesc("Ch1uaWxsaW9uL3ZhbHVlcy92MS9zdG9yZS5wcm90bxIXbmlsbGlvbi52YWx1ZXMudjEuc3RvcmUi0QEKElN0b3JlVmFsdWVzUmVxdWVzdBJCCg5zaWduZWRfcmVjZWlwdBgBIAEoCzIqLm5pbGxpb24ucGF5bWVudHMudjEucmVjZWlwdC5TaWduZWRSZWNlaXB0EhYKDmJpbmNvZGVfdmFsdWVzGAIgASgMEkQKC3Blcm1pc3Npb25zGAMgASgLMi8ubmlsbGlvbi5wZXJtaXNzaW9ucy52MS5wZXJtaXNzaW9ucy5QZXJtaXNzaW9ucxIZChF1cGRhdGVfaWRlbnRpZmllchgEIAEoDCIoChNTdG9yZVZhbHVlc1Jlc3BvbnNlEhEKCXZhbHVlc19pZBgBIAEoDEKpAQobY29tLm5pbGxpb24udmFsdWVzLnYxLnN0b3JlQgpTdG9yZVByb3RvUAGiAgROVlZTqgIXTmlsbGlvbi5WYWx1ZXMuVjEuU3RvcmXKAhdOaWxsaW9uXFZhbHVlc1xWMVxTdG9yZeICI05pbGxpb25cVmFsdWVzXFYxXFN0b3JlXEdQQk1ldGFkYXRh6gIaTmlsbGlvbjo6VmFsdWVzOjpWMTo6U3RvcmViBnByb3RvMw", [file_nillion_payments_v1_receipt, file_nillion_permissions_v1_permissions]); + +/** + * A request to store a set of values. + * + * @generated from message nillion.values.v1.store.StoreValuesRequest + */ +export type StoreValuesRequest = Message<"nillion.values.v1.store.StoreValuesRequest"> & { + /** + * The receipt that proves this operation was paid for. + * + * The receipt must be for a `StoreValues` operation. + * + * @generated from field: nillion.payments.v1.receipt.SignedReceipt signed_receipt = 1; + */ + signedReceipt?: SignedReceipt; + + /** + * The values encoded in bincode format. + * + * @generated from field: bytes bincode_values = 2; + */ + bincodeValues: Uint8Array; + + /** + * The permissions to set for these values. + * + * Permissions are required when storing values and optional when updating them. That is, + * if `update_identifier` is set then this attribute is optional. + * + * @generated from field: nillion.permissions.v1.permissions.Permissions permissions = 3; + */ + permissions?: Permissions; + + /** + * The optional values identifier to use when storing these values. + * + * The given identifier must be a valid values identifier that the invoking user has update permissions + * on for this operation to be considered valid. + * + * Setting this identifier will effectively turn this operation into an update for an existing set of + * values. + * + * @generated from field: bytes update_identifier = 4; + */ + updateIdentifier: Uint8Array; +}; + +/** + * Describes the message nillion.values.v1.store.StoreValuesRequest. + * Use `create(StoreValuesRequestSchema)` to create a new message. + */ +export const StoreValuesRequestSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_values_v1_store, 0); + +/** + * A response to a request to store values the network. + * + * @generated from message nillion.values.v1.store.StoreValuesResponse + */ +export type StoreValuesResponse = Message<"nillion.values.v1.store.StoreValuesResponse"> & { + /** + * The identifier of the store values. + * + * @generated from field: bytes values_id = 1; + */ + valuesId: Uint8Array; +}; + +/** + * Describes the message nillion.values.v1.store.StoreValuesResponse. + * Use `create(StoreValuesResponseSchema)` to create a new message. + */ +export const StoreValuesResponseSchema: GenMessage = /*@__PURE__*/ + messageDesc(file_nillion_values_v1_store, 1); + diff --git a/packages/client-vms/src/nilvm/client.ts b/packages/client-vms/src/nilvm/client.ts index 8ec0122..b448b7c 100644 --- a/packages/client-vms/src/nilvm/client.ts +++ b/packages/client-vms/src/nilvm/client.ts @@ -1,3 +1,5 @@ +import { createClient, Transport as GrpcTransport } from "@connectrpc/connect"; +import { createGrpcWebTransport } from "@connectrpc/connect-web"; import { Effect as E } from "effect"; import { UnknownException } from "effect/Cause"; import { z } from "zod"; @@ -28,6 +30,7 @@ import { StoreProgram, StoreValue, UpdateValue, + Url, UserId, } from "@nillion/client-core"; import * as Wasm from "@nillion/client-wasm"; @@ -39,6 +42,8 @@ export const NilVmClientConfig = z.object({ clusterId: ClusterId, userSeed: z.string(), nodeSeed: z.string(), + + leaderGrpcEndpoint: Url, }); export type NilVmClientConfig = z.infer; @@ -50,6 +55,8 @@ export class NilVmClient { // inside an async context. // @ts-expect-error lazily loaded on `connect()`, wrapped by `isReadyGuard()` and public access via getter private _client: Wasm.NillionClient; + // @ts-expect-error lazily configured on `connect()` since base url is required for instantiation + private _transport: GrpcTransport; private _ready = false; private constructor(private _config: NilVmClientConfig) {} @@ -82,13 +89,20 @@ export class NilVmClient { await init(); } - const { clusterId, userSeed, nodeSeed, bootnodes } = this._config; + const { clusterId, userSeed, nodeSeed, bootnodes, leaderGrpcEndpoint } = + this._config; const userKey = Wasm.UserKey.from_seed(userSeed); const nodeKey = Wasm.NodeKey.from_seed(nodeSeed); this._client = new Wasm.NillionClient(userKey, nodeKey, bootnodes); // TODO(tim): If this fails to connect a websocket.js error is logged and this method simply fails. // Its unclear which context the error occurs in so I haven't yet been able to handle it gracefully. const descriptor = await this._client.cluster_information(clusterId); + + this._transport = createGrpcWebTransport({ + baseUrl: leaderGrpcEndpoint, + useBinaryFormat: true, + }); + this._ready = true; Log("Connected to cluster: ", descriptor.id); @@ -131,6 +145,9 @@ export class NilVmClient { }): E.Effect { return E.tryPromise(async () => { const { operation } = args; + + // const client = createClient(Pay) + const response = await this.client.request_price_quote( this.clusterId, operation.intoQuotable(), diff --git a/packages/client-vms/tests/nilvm-client.test.ts b/packages/client-vms/tests/nilvm-client.test.ts index 5d34fcd..eb06295 100644 --- a/packages/client-vms/tests/nilvm-client.test.ts +++ b/packages/client-vms/tests/nilvm-client.test.ts @@ -21,7 +21,7 @@ import { const SUITE_NAME = `@nillion/client-vms > NilVmClient`; -describe(SUITE_NAME, () => { +fdescribe(SUITE_NAME, () => { const config = getVmClientEnvConfig(); const client = NilVmClient.create(config); diff --git a/packages/fixture/src/main.ts b/packages/fixture/src/main.ts index d57aa45..bbb042e 100644 --- a/packages/fixture/src/main.ts +++ b/packages/fixture/src/main.ts @@ -18,6 +18,7 @@ export const TestEnv = { NILLION_BOOTNODE_MULTIADDRESS: "", NILLION_BOOTNODE_WEBSOCKET: "", NILLION_CLUSTER_ID: "", + NILLION_LEADER_GRPC_ENDPOINT: "", NILLION_NILCHAIN_CHAIN_ID: "", NILLION_NILCHAIN_JSON_RPC: "", diff --git a/packages/resources/webpack.base.config.mjs b/packages/resources/webpack.base.config.mjs index 89f4c0b..a476aaa 100644 --- a/packages/resources/webpack.base.config.mjs +++ b/packages/resources/webpack.base.config.mjs @@ -46,6 +46,7 @@ export const buildWebpackBaseConfig = (packageBaseDir) => ({ "/ip4/127.0.0.1/tcp/56033/p2p/12D3KooWNQ3aNWQ4syzxrzZvC8PA2sH3DhYCfLePog2miw16UCA9", NILLION_BOOTNODE_WEBSOCKET: "/ip4/127.0.0.1/tcp/38874/ws/p2p/12D3KooWNQ3aNWQ4syzxrzZvC8PA2sH3DhYCfLePog2miw16UCA9", + NILLION_LEADER_GRPC_ENDPOINT: "localhost:64667", NILLION_NILCHAIN_CHAIN_ID: "nillion-chain-devnet", NILLION_NILCHAIN_JSON_RPC: "http://127.0.0.1:48102", NILLION_NILCHAIN_REST_API: "http://localhost:26650", diff --git a/packages/test-utils/src/client.ts b/packages/test-utils/src/client.ts index 15c0d0b..2ed1c1c 100644 --- a/packages/test-utils/src/client.ts +++ b/packages/test-utils/src/client.ts @@ -18,6 +18,7 @@ export const getVmClientEnvConfig = (): NilVmClientConfig => { bootnodes: TestEnv.bootnodesWebsocket, userSeed: TestEnv.userSeed, nodeSeed: window.crypto.randomUUID(), + leaderGrpcEndpoint: TestEnv.leaderGrpcEndpoint, }, { path: ["getVmClientEnvConfig", "NilVmClientConfig"] }, ); diff --git a/packages/test-utils/src/test-env.ts b/packages/test-utils/src/test-env.ts index 46301ff..cc6c3ee 100644 --- a/packages/test-utils/src/test-env.ts +++ b/packages/test-utils/src/test-env.ts @@ -2,6 +2,7 @@ export const TestEnv = { bootnodesWebsocket: [process.env.NILLION_BOOTNODE_WEBSOCKET ?? ""], bootnodesMultiAddr: [process.env.NILLION_BOOTNODE_MULTIADDRESS ?? ""], clusterId: process.env.NILLION_CLUSTER_ID ?? "", + leaderGrpcEndpoint: process.env.NILLION_LEADER_GRPC_ENDPOINT ?? "", chainId: process.env.NILLION_NILCHAIN_CHAIN_ID ?? "", nilChainJsonRpc: process.env.NILLION_NILCHAIN_JSON_RPC ?? "", nilChainRestApi: process.env.NILLION_NILCHAIN_REST_API ?? "",