diff --git a/.gitmodules b/.gitmodules index aad5d5e1..1220894b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,4 @@ [submodule "submodules/chainlink-protos"] path = submodules/chainlink-protos url = https://github.com/smartcontractkit/chainlink-protos.git + branch = rtinianov_tee diff --git a/packages/cre-sdk-javy-plugin/dist/javy-chainlink-sdk.plugin.wasm b/packages/cre-sdk-javy-plugin/dist/javy-chainlink-sdk.plugin.wasm index 69ebf940..96c388a5 100644 Binary files a/packages/cre-sdk-javy-plugin/dist/javy-chainlink-sdk.plugin.wasm and b/packages/cre-sdk-javy-plugin/dist/javy-chainlink-sdk.plugin.wasm differ diff --git a/packages/cre-sdk-javy-plugin/dist/javy_chainlink_sdk.wasm b/packages/cre-sdk-javy-plugin/dist/javy_chainlink_sdk.wasm index 9c25dce1..c6098a6d 100755 Binary files a/packages/cre-sdk-javy-plugin/dist/javy_chainlink_sdk.wasm and b/packages/cre-sdk-javy-plugin/dist/javy_chainlink_sdk.wasm differ diff --git a/packages/cre-sdk-javy-plugin/src/javy_chainlink_sdk/src/lib.rs b/packages/cre-sdk-javy-plugin/src/javy_chainlink_sdk/src/lib.rs index 97d312b2..05301289 100644 --- a/packages/cre-sdk-javy-plugin/src/javy_chainlink_sdk/src/lib.rs +++ b/packages/cre-sdk-javy-plugin/src/javy_chainlink_sdk/src/lib.rs @@ -229,7 +229,7 @@ fn modify_runtime(runtime: Runtime) -> Runtime { ) .expect("failed to set global function 'log'"); - // sendResponse(data: Uint8Array | ArrayBuffer | Base64 string) -> i32 (exits on rc==0) + // sendResponse(data: Uint8Array | ArrayBuffer) -> i32 (exits on rc==0) ctx.globals() .set( "sendResponse", @@ -257,6 +257,7 @@ fn modify_runtime(runtime: Runtime) -> Runtime { ) .expect("failed to set global function 'switchModes'"); + // versionV2(): void ctx.globals() .set( diff --git a/packages/cre-sdk/Makefile b/packages/cre-sdk/Makefile index c166c42b..3d801fa5 100644 --- a/packages/cre-sdk/Makefile +++ b/packages/cre-sdk/Makefile @@ -1,4 +1,4 @@ -COMMON_VERSION ?= cre-std-tests@0.6.0 +COMMON_VERSION ?= f0dfd6b71e78f7e21b85d55d7a858b02b7459024 MODULE := github.com/smartcontractkit/chainlink-common TEST_PATTERN ?= ^TestStandard diff --git a/packages/cre-sdk/src/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.ts b/packages/cre-sdk/src/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.ts index 110fc54b..80f36b41 100644 --- a/packages/cre-sdk/src/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.ts +++ b/packages/cre-sdk/src/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.ts @@ -6,7 +6,7 @@ import { type HTTPResponse, HTTPResponseSchema, } from '@cre/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb' -import type { Runtime } from '@cre/sdk' +import type { Runtime, TeeRuntime } from '@cre/sdk' import { Report } from '@cre/sdk/report' import { hexToBytes } from '@cre/sdk/utils/hex-utils' @@ -24,9 +24,17 @@ export class ClientCapability { static readonly CAPABILITY_NAME = 'confidential-http' static readonly CAPABILITY_VERSION = '1.0.0-alpha' + sendRequest( + runtime: TeeRuntime, + input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson, + ): { result: () => HTTPResponse } sendRequest( runtime: Runtime, input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson, + ): { result: () => HTTPResponse } + sendRequest( + runtime: Runtime | TeeRuntime, + input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson, ): { result: () => HTTPResponse } { // Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed let payload: ConfidentialHTTPRequest diff --git a/packages/cre-sdk/src/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.ts b/packages/cre-sdk/src/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.ts index 69beaf7b..e3445e57 100644 --- a/packages/cre-sdk/src/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.ts +++ b/packages/cre-sdk/src/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.ts @@ -6,7 +6,7 @@ import { type Response, ResponseSchema, } from '@cre/generated/capabilities/networking/http/v1alpha/client_pb' -import type { NodeRuntime, Runtime } from '@cre/sdk' +import type { NodeRuntime, Runtime, TeeRuntime } from '@cre/sdk' import { Report } from '@cre/sdk/report' import type { ConsensusAggregation, PrimitiveTypes, UnwrapOptions } from '@cre/sdk/utils' @@ -34,10 +34,18 @@ export class ClientCapability { static readonly CAPABILITY_NAME = 'http-actions' static readonly CAPABILITY_VERSION = '1.0.0-alpha' + sendRequest( + runtime: TeeRuntime, + input: Request | RequestJson, + ): { result: () => Response } sendRequest( runtime: NodeRuntime, input: Request | RequestJson, ): { result: () => Response } + sendRequest( + runtime: NodeRuntime | TeeRuntime, + input: Request | RequestJson, + ): { result: () => Response } sendRequest( runtime: Runtime, fn: (sendRequester: SendRequester, ...args: TArgs) => TOutput, @@ -56,11 +64,14 @@ export class ClientCapability { return this.sendRequestSugarHelper(runtime, fn, consensusAggregation, unwrapOptions) } // Otherwise, this is the basic call overload - const [runtime, input] = args as [NodeRuntime, Request | RequestJson] + const [runtime, input] = args as [ + NodeRuntime | TeeRuntime, + Request | RequestJson, + ] return this.sendRequestCallHelper(runtime, input) } private sendRequestCallHelper( - runtime: NodeRuntime, + runtime: NodeRuntime | TeeRuntime, input: Request | RequestJson, ): { result: () => Response } { // Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed diff --git a/packages/cre-sdk/src/generated/capabilities/blockchain/aptos/v1alpha/client_pb.ts b/packages/cre-sdk/src/generated/capabilities/blockchain/aptos/v1alpha/client_pb.ts index b5c67964..2bfac32b 100644 --- a/packages/cre-sdk/src/generated/capabilities/blockchain/aptos/v1alpha/client_pb.ts +++ b/packages/cre-sdk/src/generated/capabilities/blockchain/aptos/v1alpha/client_pb.ts @@ -15,7 +15,7 @@ import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/gen export const file_capabilities_blockchain_aptos_v1alpha_client: GenFile = /*@__PURE__*/ fileDesc( - 'CjJjYXBhYmlsaXRpZXMvYmxvY2tjaGFpbi9hcHRvcy92MWFscGhhL2NsaWVudC5wcm90bxIlY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uYXB0b3MudjFhbHBoYSIrChhBY2NvdW50QVBUQmFsYW5jZVJlcXVlc3QSDwoHYWRkcmVzcxgBIAEoDCIrChZBY2NvdW50QVBUQmFsYW5jZVJlcGx5EhEKBXZhbHVlGAEgASgEQgIwACKGAQoLVmlld1JlcXVlc3QSQwoHcGF5bG9hZBgBIAEoCzIyLmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLmFwdG9zLnYxYWxwaGEuVmlld1BheWxvYWQSHwoObGVkZ2VyX3ZlcnNpb24YAiABKARCAjAASACIAQFCEQoPX2xlZGdlcl92ZXJzaW9uIhkKCVZpZXdSZXBseRIMCgRkYXRhGAEgASgMIrEBCgtWaWV3UGF5bG9hZBI/CgZtb2R1bGUYASABKAsyLy5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5hcHRvcy52MWFscGhhLk1vZHVsZUlEEhAKCGZ1bmN0aW9uGAIgASgJEkEKCWFyZ190eXBlcxgDIAMoCzIuLmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLmFwdG9zLnYxYWxwaGEuVHlwZVRhZxIMCgRhcmdzGAQgAygMIikKCE1vZHVsZUlEEg8KB2FkZHJlc3MYASABKAwSDAoEbmFtZRgCIAEoCSKiAgoHVHlwZVRhZxJACgRraW5kGAEgASgOMjIuY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uYXB0b3MudjFhbHBoYS5UeXBlVGFnS2luZBJCCgZ2ZWN0b3IYAiABKAsyMC5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5hcHRvcy52MWFscGhhLlZlY3RvclRhZ0gAEkIKBnN0cnVjdBgDIAEoCzIwLmNhcGFiaWxpdGllcy5ibG9ja2No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b3NcVjFhbHBoYVxHUEJNZXRhZGF0YeoCKENhcGFiaWxpdGllczo6QmxvY2tjaGFpbjo6QXB0b3M6OlYxYWxwaGFiBnByb3RvMw', [file_sdk_v1alpha_sdk, file_tools_generator_v1alpha_cre_metadata], ) @@ -912,6 +912,11 @@ export type WriteReportReply = Message<'capabilities.blockchain.aptos.v1alpha.Wr * @generated from field: optional string error_message = 4; */ errorMessage?: string + + /** + * @generated from field: optional capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 5; + */ + receiverContractExecutionStatus?: ReceiverContractExecutionStatus } /** @@ -941,6 +946,11 @@ export type WriteReportReplyJson = { * @generated from field: optional string error_message = 4; */ errorMessage?: string + + /** + * @generated from field: optional capabilities.blockchain.aptos.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 5; + */ + receiverContractExecutionStatus?: ReceiverContractExecutionStatusJson } /** @@ -1148,6 +1158,36 @@ export const TransactionVariantSchema: GenEnum = /*@__PURE__*/ enumDesc(file_capabilities_blockchain_aptos_v1alpha_client, 3) + /** * @generated from service capabilities.blockchain.aptos.v1alpha.Client */ diff --git a/packages/cre-sdk/src/generated/capabilities/blockchain/solana/v1alpha/client_pb.ts b/packages/cre-sdk/src/generated/capabilities/blockchain/solana/v1alpha/client_pb.ts new file mode 100644 index 00000000..e767d926 --- /dev/null +++ b/packages/cre-sdk/src/generated/capabilities/blockchain/solana/v1alpha/client_pb.ts @@ -0,0 +1,3427 @@ +// @generated by protoc-gen-es v2.6.3 with parameter "target=ts,import_extension=none,json_types=true,keep_empty_files=false" +// @generated from file capabilities/blockchain/solana/v1alpha/client.proto (package capabilities.blockchain.solana.v1alpha, syntax proto3) +/* eslint-disable */ + +import type { Message } from '@bufbuild/protobuf' +import type { GenEnum, GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2' +import { enumDesc, fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2' +import type { ReportResponse, ReportResponseJson } from '../../../../sdk/v1alpha/sdk_pb' +import { file_sdk_v1alpha_sdk } from '../../../../sdk/v1alpha/sdk_pb' +import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/generator/v1alpha/cre_metadata_pb' +import type { BigInt, BigIntJson } from '../../../../values/v1/values_pb' +import { file_values_v1_values } from '../../../../values/v1/values_pb' + +/** + * Describes the file capabilities/blockchain/solana/v1alpha/client.proto. + */ +export const file_capabilities_blockchain_solana_v1alpha_client: GenFile = + /*@__PURE__*/ + fileDesc( + 'CjNjYXBhYmlsaXRpZXMvYmxvY2tjaGFpbi9zb2xhbmEvdjFhbHBoYS9jbGllbnQucHJvdG8SJmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhIsMBCgdBY2NvdW50EhQKCGxhbXBvcnRzGAEgASgEQgIwABINCgVvd25lchgCIAEoDBJFCgRkYXRhGAMgASgLMjcuY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uc29sYW5hLnYxYWxwaGEuRGF0YUJ5dGVzT3JKU09OEhIKCmV4ZWN1dGFibGUYBCABKAgSJQoKcmVudF9lcG9jaBgFIAEoCzIRLnZhbHVlcy52MS5CaWdJbnQSEQoFc3BhY2UYBiABKARCAjAAIkUKDUNvbXB1dGVDb25maWcSFQoNY29tcHV0ZV9saW1pdBgBIAEoDRIdChFjb21wdXRlX21heF9wcmljZRgCIAEoBEICMAAigAEKD0RhdGFCeXRlc09ySlNPThJGCghlbmNvZGluZxgBIAEoDjI0LmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhLkVuY29kaW5nVHlwZRINCgNyYXcYAiABKAxIABIOCgRqc29uGAMgASgMSABCBgoEYm9keSIzCglEYXRhU2xpY2USEgoGb2Zmc2V0GAEgASgEQgIwABISCgZsZW5ndGgYAiABKARCAjAAIo0CChJHZXRBY2NvdW50SW5mb09wdHMSRgoIZW5jb2RpbmcYASABKA4yNC5jYXBhYmlsaXRpZXMuYmxvY2tjaGF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nNhY3Rpb25SZXF1ZXN0GjsuY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uc29sYW5hLnYxYWxwaGEuR2V0VHJhbnNhY3Rpb25SZXBseRJ8CgpMb2dUcmlnZ2VyEj8uY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uc29sYW5hLnYxYWxwaGEuRmlsdGVyTG9nVHJpZ2dlclJlcXVlc3QaKy5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYS5Mb2cwARKDAQoLV3JpdGVSZXBvcnQSOi5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYS5Xcml0ZVJlcG9ydFJlcXVlc3QaOC5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYS5Xcml0ZVJlcG9ydFJlcGx5Gn2CtRh5CAESDHNvbGFuYUAxLjAuMBpnCg1DaGFpblNlbGVjdG9yElYSVAoaCg1zb2xhbmEtZGV2bmV0EN/vjKep/LH24wEKGgoOc29sYW5hLW1haW5uZXQQ55PfjLafrt0BChoKDnNvbGFuYS10ZXN0bmV0EK+a6tDFodO7V0L0AQoqY29tLmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhQgtDbGllbnRQcm90b1ABogIDQ0JTqgImQ2FwYWJpbGl0aWVzLkJsb2NrY2hhaW4uU29sYW5hLlYxYWxwaGHKAiZDYXBhYmlsaXRpZXNcQmxvY2tjaGFpblxTb2xhbmFcVjFhbHBoYeICMkNhcGFiaWxpdGllc1xCbG9ja2NoYWluXFNvbGFuYVxWMWFscGhhXEdQQk1ldGFkYXRh6gIpQ2FwYWJpbGl0aWVzOjpCbG9ja2NoYWluOjpTb2xhbmE6OlYxYWxwaGFiBnByb3RvMw', + [file_sdk_v1alpha_sdk, file_tools_generator_v1alpha_cre_metadata, file_values_v1_values], + ) + +/** + * On-chain account state. + * + * @generated from message capabilities.blockchain.solana.v1alpha.Account + */ +export type Account = Message<'capabilities.blockchain.solana.v1alpha.Account'> & { + /** + * balance in lamports (1e-9 SOL) + * + * @generated from field: uint64 lamports = 1 [jstype = JS_NORMAL]; + */ + lamports: bigint + + /** + * 32-byte program id (Pubkey) + * + * @generated from field: bytes owner = 2; + */ + owner: Uint8Array + + /** + * account data (encoded or JSON) + * + * @generated from field: capabilities.blockchain.solana.v1alpha.DataBytesOrJSON data = 3; + */ + data?: DataBytesOrJSON + + /** + * true if this is a program account + * + * @generated from field: bool executable = 4; + */ + executable: boolean + + /** + * next rent epoch + * + * @generated from field: values.v1.BigInt rent_epoch = 5; + */ + rentEpoch?: BigInt + + /** + * data length in bytes + * + * @generated from field: uint64 space = 6 [jstype = JS_NORMAL]; + */ + space: bigint +} + +/** + * On-chain account state. + * + * @generated from message capabilities.blockchain.solana.v1alpha.Account + */ +export type AccountJson = { + /** + * balance in lamports (1e-9 SOL) + * + * @generated from field: uint64 lamports = 1 [jstype = JS_NORMAL]; + */ + lamports?: string + + /** + * 32-byte program id (Pubkey) + * + * @generated from field: bytes owner = 2; + */ + owner?: string + + /** + * account data (encoded or JSON) + * + * @generated from field: capabilities.blockchain.solana.v1alpha.DataBytesOrJSON data = 3; + */ + data?: DataBytesOrJSONJson + + /** + * true if this is a program account + * + * @generated from field: bool executable = 4; + */ + executable?: boolean + + /** + * next rent epoch + * + * @generated from field: values.v1.BigInt rent_epoch = 5; + */ + rentEpoch?: BigIntJson + + /** + * data length in bytes + * + * @generated from field: uint64 space = 6 [jstype = JS_NORMAL]; + */ + space?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.Account. + * Use `create(AccountSchema)` to create a new message. + */ +export const AccountSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 0) + +/** + * Compute budget configuration when submitting txs. + * + * @generated from message capabilities.blockchain.solana.v1alpha.ComputeConfig + */ +export type ComputeConfig = Message<'capabilities.blockchain.solana.v1alpha.ComputeConfig'> & { + /** + * max CUs (approx per-tx limit) + * + * @generated from field: uint32 compute_limit = 1; + */ + computeLimit: number + + /** + * max lamports per CU + * + * @generated from field: uint64 compute_max_price = 2 [jstype = JS_NORMAL]; + */ + computeMaxPrice: bigint +} + +/** + * Compute budget configuration when submitting txs. + * + * @generated from message capabilities.blockchain.solana.v1alpha.ComputeConfig + */ +export type ComputeConfigJson = { + /** + * max CUs (approx per-tx limit) + * + * @generated from field: uint32 compute_limit = 1; + */ + computeLimit?: number + + /** + * max lamports per CU + * + * @generated from field: uint64 compute_max_price = 2 [jstype = JS_NORMAL]; + */ + computeMaxPrice?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.ComputeConfig. + * Use `create(ComputeConfigSchema)` to create a new message. + */ +export const ComputeConfigSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 1) + +/** + * Raw bytes vs parsed JSON (as returned by RPC). + * + * @generated from message capabilities.blockchain.solana.v1alpha.DataBytesOrJSON + */ +export type DataBytesOrJSON = Message<'capabilities.blockchain.solana.v1alpha.DataBytesOrJSON'> & { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding: EncodingType + + /** + * @generated from oneof capabilities.blockchain.solana.v1alpha.DataBytesOrJSON.body + */ + body: + | { + /** + * program data (node’s base64/base58 decoded) + * + * @generated from field: bytes raw = 2; + */ + value: Uint8Array + case: 'raw' + } + | { + /** + * json: UTF-8 bytes of the jsonParsed payload. + * + * @generated from field: bytes json = 3; + */ + value: Uint8Array + case: 'json' + } + | { case: undefined; value?: undefined } +} + +/** + * Raw bytes vs parsed JSON (as returned by RPC). + * + * @generated from message capabilities.blockchain.solana.v1alpha.DataBytesOrJSON + */ +export type DataBytesOrJSONJson = { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding?: EncodingTypeJson + + /** + * program data (node’s base64/base58 decoded) + * + * @generated from field: bytes raw = 2; + */ + raw?: string + + /** + * json: UTF-8 bytes of the jsonParsed payload. + * + * @generated from field: bytes json = 3; + */ + json?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.DataBytesOrJSON. + * Use `create(DataBytesOrJSONSchema)` to create a new message. + */ +export const DataBytesOrJSONSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 2) + +/** + * Return a slice of account data. + * + * @generated from message capabilities.blockchain.solana.v1alpha.DataSlice + */ +export type DataSlice = Message<'capabilities.blockchain.solana.v1alpha.DataSlice'> & { + /** + * start byte + * + * @generated from field: uint64 offset = 1 [jstype = JS_NORMAL]; + */ + offset: bigint + + /** + * number of bytes + * + * @generated from field: uint64 length = 2 [jstype = JS_NORMAL]; + */ + length: bigint +} + +/** + * Return a slice of account data. + * + * @generated from message capabilities.blockchain.solana.v1alpha.DataSlice + */ +export type DataSliceJson = { + /** + * start byte + * + * @generated from field: uint64 offset = 1 [jstype = JS_NORMAL]; + */ + offset?: string + + /** + * number of bytes + * + * @generated from field: uint64 length = 2 [jstype = JS_NORMAL]; + */ + length?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.DataSlice. + * Use `create(DataSliceSchema)` to create a new message. + */ +export const DataSliceSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 3) + +/** + * Options for GetAccountInfo. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts + */ +export type GetAccountInfoOpts = + Message<'capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts'> & { + /** + * data encoding + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding: EncodingType + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment: CommitmentType + + /** + * optional slice window + * + * @generated from field: capabilities.blockchain.solana.v1alpha.DataSlice data_slice = 3; + */ + dataSlice?: DataSlice + + /** + * lower bound slot + * + * @generated from field: uint64 min_context_slot = 4 [jstype = JS_NORMAL]; + */ + minContextSlot: bigint + } + +/** + * Options for GetAccountInfo. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts + */ +export type GetAccountInfoOptsJson = { + /** + * data encoding + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding?: EncodingTypeJson + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment?: CommitmentTypeJson + + /** + * optional slice window + * + * @generated from field: capabilities.blockchain.solana.v1alpha.DataSlice data_slice = 3; + */ + dataSlice?: DataSliceJson + + /** + * lower bound slot + * + * @generated from field: uint64 min_context_slot = 4 [jstype = JS_NORMAL]; + */ + minContextSlot?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts. + * Use `create(GetAccountInfoOptsSchema)` to create a new message. + */ +export const GetAccountInfoOptsSchema: GenMessage< + GetAccountInfoOpts, + { jsonType: GetAccountInfoOptsJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 4) + +/** + * Reply for GetAccountInfoWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply + */ +export type GetAccountInfoWithOptsReply = + Message<'capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply'> & { + /** + * read slot + * + * @generated from field: capabilities.blockchain.solana.v1alpha.RPCContext rpc_context = 1; + */ + rpcContext?: RPCContext + + /** + * account (may be empty) + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.Account value = 2; + */ + value?: Account + } + +/** + * Reply for GetAccountInfoWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply + */ +export type GetAccountInfoWithOptsReplyJson = { + /** + * read slot + * + * @generated from field: capabilities.blockchain.solana.v1alpha.RPCContext rpc_context = 1; + */ + rpcContext?: RPCContextJson + + /** + * account (may be empty) + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.Account value = 2; + */ + value?: AccountJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsReply. + * Use `create(GetAccountInfoWithOptsReplySchema)` to create a new message. + */ +export const GetAccountInfoWithOptsReplySchema: GenMessage< + GetAccountInfoWithOptsReply, + { jsonType: GetAccountInfoWithOptsReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 5) + +/** + * Request for GetAccountInfoWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest + */ +export type GetAccountInfoWithOptsRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest'> & { + /** + * 32-byte Pubkey + * + * @generated from field: bytes account = 1; + */ + account: Uint8Array + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts opts = 2; + */ + opts?: GetAccountInfoOpts + } + +/** + * Request for GetAccountInfoWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest + */ +export type GetAccountInfoWithOptsRequestJson = { + /** + * 32-byte Pubkey + * + * @generated from field: bytes account = 1; + */ + account?: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetAccountInfoOpts opts = 2; + */ + opts?: GetAccountInfoOptsJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetAccountInfoWithOptsRequest. + * Use `create(GetAccountInfoWithOptsRequestSchema)` to create a new message. + */ +export const GetAccountInfoWithOptsRequestSchema: GenMessage< + GetAccountInfoWithOptsRequest, + { jsonType: GetAccountInfoWithOptsRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 6) + +/** + * Reply for GetBalance. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBalanceReply + */ +export type GetBalanceReply = Message<'capabilities.blockchain.solana.v1alpha.GetBalanceReply'> & { + /** + * lamports + * + * @generated from field: uint64 value = 1 [jstype = JS_NORMAL]; + */ + value: bigint +} + +/** + * Reply for GetBalance. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBalanceReply + */ +export type GetBalanceReplyJson = { + /** + * lamports + * + * @generated from field: uint64 value = 1 [jstype = JS_NORMAL]; + */ + value?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetBalanceReply. + * Use `create(GetBalanceReplySchema)` to create a new message. + */ +export const GetBalanceReplySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 7) + +/** + * Request for GetBalance. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBalanceRequest + */ +export type GetBalanceRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetBalanceRequest'> & { + /** + * 32-byte Pubkey + * + * @generated from field: bytes addr = 1; + */ + addr: Uint8Array + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment: CommitmentType + } + +/** + * Request for GetBalance. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBalanceRequest + */ +export type GetBalanceRequestJson = { + /** + * 32-byte Pubkey + * + * @generated from field: bytes addr = 1; + */ + addr?: string + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment?: CommitmentTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetBalanceRequest. + * Use `create(GetBalanceRequestSchema)` to create a new message. + */ +export const GetBalanceRequestSchema: GenMessage< + GetBalanceRequest, + { jsonType: GetBalanceRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 8) + +/** + * Options for GetBlock. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockOpts + */ +export type GetBlockOpts = Message<'capabilities.blockchain.solana.v1alpha.GetBlockOpts'> & { + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 4; + */ + commitment: CommitmentType +} + +/** + * Options for GetBlock. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockOpts + */ +export type GetBlockOptsJson = { + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 4; + */ + commitment?: CommitmentTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetBlockOpts. + * Use `create(GetBlockOptsSchema)` to create a new message. + */ +export const GetBlockOptsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 9) + +/** + * Block response. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockReply + */ +export type GetBlockReply = Message<'capabilities.blockchain.solana.v1alpha.GetBlockReply'> & { + /** + * 32-byte block hash + * + * @generated from field: bytes blockhash = 1; + */ + blockhash: Uint8Array + + /** + * 32-byte parent hash + * + * @generated from field: bytes previous_blockhash = 2; + */ + previousBlockhash: Uint8Array + + /** + * @generated from field: uint64 parent_slot = 3 [jstype = JS_NORMAL]; + */ + parentSlot: bigint + + /** + * unix seconds, node may not report it + * + * @generated from field: optional int64 block_time = 4 [jstype = JS_NORMAL]; + */ + blockTime?: bigint + + /** + * chain height + * + * @generated from field: uint64 block_height = 5 [jstype = JS_NORMAL]; + */ + blockHeight: bigint +} + +/** + * Block response. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockReply + */ +export type GetBlockReplyJson = { + /** + * 32-byte block hash + * + * @generated from field: bytes blockhash = 1; + */ + blockhash?: string + + /** + * 32-byte parent hash + * + * @generated from field: bytes previous_blockhash = 2; + */ + previousBlockhash?: string + + /** + * @generated from field: uint64 parent_slot = 3 [jstype = JS_NORMAL]; + */ + parentSlot?: string + + /** + * unix seconds, node may not report it + * + * @generated from field: optional int64 block_time = 4 [jstype = JS_NORMAL]; + */ + blockTime?: string + + /** + * chain height + * + * @generated from field: uint64 block_height = 5 [jstype = JS_NORMAL]; + */ + blockHeight?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetBlockReply. + * Use `create(GetBlockReplySchema)` to create a new message. + */ +export const GetBlockReplySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 10) + +/** + * Request for GetBlock. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockRequest + */ +export type GetBlockRequest = Message<'capabilities.blockchain.solana.v1alpha.GetBlockRequest'> & { + /** + * target slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot: bigint + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetBlockOpts opts = 2; + */ + opts?: GetBlockOpts +} + +/** + * Request for GetBlock. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetBlockRequest + */ +export type GetBlockRequestJson = { + /** + * target slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot?: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetBlockOpts opts = 2; + */ + opts?: GetBlockOptsJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetBlockRequest. + * Use `create(GetBlockRequestSchema)` to create a new message. + */ +export const GetBlockRequestSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 11) + +/** + * Fee quote for a base58-encoded Message. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply + */ +export type GetFeeForMessageReply = + Message<'capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply'> & { + /** + * lamports + * + * @generated from field: uint64 fee = 1 [jstype = JS_NORMAL]; + */ + fee: bigint + } + +/** + * Fee quote for a base58-encoded Message. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply + */ +export type GetFeeForMessageReplyJson = { + /** + * lamports + * + * @generated from field: uint64 fee = 1 [jstype = JS_NORMAL]; + */ + fee?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetFeeForMessageReply. + * Use `create(GetFeeForMessageReplySchema)` to create a new message. + */ +export const GetFeeForMessageReplySchema: GenMessage< + GetFeeForMessageReply, + { jsonType: GetFeeForMessageReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 12) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest + */ +export type GetFeeForMessageRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest'> & { + /** + * must be base58-encoded Message + * + * @generated from field: string message = 1; + */ + message: string + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment: CommitmentType + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest + */ +export type GetFeeForMessageRequestJson = { + /** + * must be base58-encoded Message + * + * @generated from field: string message = 1; + */ + message?: string + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment?: CommitmentTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetFeeForMessageRequest. + * Use `create(GetFeeForMessageRequestSchema)` to create a new message. + */ +export const GetFeeForMessageRequestSchema: GenMessage< + GetFeeForMessageRequest, + { jsonType: GetFeeForMessageRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 13) + +/** + * Options for GetMultipleAccounts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts + */ +export type GetMultipleAccountsOpts = + Message<'capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts'> & { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding: EncodingType + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment: CommitmentType + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.DataSlice data_slice = 3; + */ + dataSlice?: DataSlice + + /** + * @generated from field: uint64 min_context_slot = 4 [jstype = JS_NORMAL]; + */ + minContextSlot: bigint + } + +/** + * Options for GetMultipleAccounts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts + */ +export type GetMultipleAccountsOptsJson = { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding?: EncodingTypeJson + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment?: CommitmentTypeJson + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.DataSlice data_slice = 3; + */ + dataSlice?: DataSliceJson + + /** + * @generated from field: uint64 min_context_slot = 4 [jstype = JS_NORMAL]; + */ + minContextSlot?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts. + * Use `create(GetMultipleAccountsOptsSchema)` to create a new message. + */ +export const GetMultipleAccountsOptsSchema: GenMessage< + GetMultipleAccountsOpts, + { jsonType: GetMultipleAccountsOptsJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 14) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper + */ +export type OptionalAccountWrapper = + Message<'capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper'> & { + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.Account account = 1; + */ + account?: Account + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper + */ +export type OptionalAccountWrapperJson = { + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.Account account = 1; + */ + account?: AccountJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper. + * Use `create(OptionalAccountWrapperSchema)` to create a new message. + */ +export const OptionalAccountWrapperSchema: GenMessage< + OptionalAccountWrapper, + { jsonType: OptionalAccountWrapperJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 15) + +/** + * Reply for GetMultipleAccountsWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply + */ +export type GetMultipleAccountsWithOptsReply = + Message<'capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply'> & { + /** + * read slot + * + * @generated from field: capabilities.blockchain.solana.v1alpha.RPCContext rpc_context = 1; + */ + rpcContext?: RPCContext + + /** + * accounts (nil entries allowed) + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper value = 2; + */ + value: OptionalAccountWrapper[] + } + +/** + * Reply for GetMultipleAccountsWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply + */ +export type GetMultipleAccountsWithOptsReplyJson = { + /** + * read slot + * + * @generated from field: capabilities.blockchain.solana.v1alpha.RPCContext rpc_context = 1; + */ + rpcContext?: RPCContextJson + + /** + * accounts (nil entries allowed) + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.OptionalAccountWrapper value = 2; + */ + value?: OptionalAccountWrapperJson[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsReply. + * Use `create(GetMultipleAccountsWithOptsReplySchema)` to create a new message. + */ +export const GetMultipleAccountsWithOptsReplySchema: GenMessage< + GetMultipleAccountsWithOptsReply, + { jsonType: GetMultipleAccountsWithOptsReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 16) + +/** + * Request for GetMultipleAccountsWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest + */ +export type GetMultipleAccountsWithOptsRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest'> & { + /** + * list of 32-byte Pubkeys + * + * @generated from field: repeated bytes accounts = 1; + */ + accounts: Uint8Array[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts opts = 2; + */ + opts?: GetMultipleAccountsOpts + } + +/** + * Request for GetMultipleAccountsWithOpts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest + */ +export type GetMultipleAccountsWithOptsRequestJson = { + /** + * list of 32-byte Pubkeys + * + * @generated from field: repeated bytes accounts = 1; + */ + accounts?: string[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.GetMultipleAccountsOpts opts = 2; + */ + opts?: GetMultipleAccountsOptsJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetMultipleAccountsWithOptsRequest. + * Use `create(GetMultipleAccountsWithOptsRequestSchema)` to create a new message. + */ +export const GetMultipleAccountsWithOptsRequestSchema: GenMessage< + GetMultipleAccountsWithOptsRequest, + { jsonType: GetMultipleAccountsWithOptsRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 17) + +/** + * Reply for GetSignatureStatuses. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply + */ +export type GetSignatureStatusesReply = + Message<'capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply'> & { + /** + * 1:1 with input + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult results = 1; + */ + results: GetSignatureStatusesResult[] + } + +/** + * Reply for GetSignatureStatuses. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply + */ +export type GetSignatureStatusesReplyJson = { + /** + * 1:1 with input + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult results = 1; + */ + results?: GetSignatureStatusesResultJson[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesReply. + * Use `create(GetSignatureStatusesReplySchema)` to create a new message. + */ +export const GetSignatureStatusesReplySchema: GenMessage< + GetSignatureStatusesReply, + { jsonType: GetSignatureStatusesReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 18) + +/** + * Request for GetSignatureStatuses. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest + */ +export type GetSignatureStatusesRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest'> & { + /** + * 64-byte signatures + * + * @generated from field: repeated bytes sigs = 1; + */ + sigs: Uint8Array[] + } + +/** + * Request for GetSignatureStatuses. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest + */ +export type GetSignatureStatusesRequestJson = { + /** + * 64-byte signatures + * + * @generated from field: repeated bytes sigs = 1; + */ + sigs?: string[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesRequest. + * Use `create(GetSignatureStatusesRequestSchema)` to create a new message. + */ +export const GetSignatureStatusesRequestSchema: GenMessage< + GetSignatureStatusesRequest, + { jsonType: GetSignatureStatusesRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 19) + +/** + * Per-signature status. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult + */ +export type GetSignatureStatusesResult = + Message<'capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult'> & { + /** + * processed slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot: bigint + + /** + * null->0 here + * + * @generated from field: optional uint64 confirmations = 2 [jstype = JS_NORMAL]; + */ + confirmations?: bigint + + /** + * error JSON string (empty on success) + * + * @generated from field: string err = 3; + */ + err: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ConfirmationStatusType confirmation_status = 4; + */ + confirmationStatus: ConfirmationStatusType + } + +/** + * Per-signature status. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult + */ +export type GetSignatureStatusesResultJson = { + /** + * processed slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot?: string + + /** + * null->0 here + * + * @generated from field: optional uint64 confirmations = 2 [jstype = JS_NORMAL]; + */ + confirmations?: string + + /** + * error JSON string (empty on success) + * + * @generated from field: string err = 3; + */ + err?: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ConfirmationStatusType confirmation_status = 4; + */ + confirmationStatus?: ConfirmationStatusTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetSignatureStatusesResult. + * Use `create(GetSignatureStatusesResultSchema)` to create a new message. + */ +export const GetSignatureStatusesResultSchema: GenMessage< + GetSignatureStatusesResult, + { jsonType: GetSignatureStatusesResultJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 20) + +/** + * Current “height” (blocks below latest). + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSlotHeightReply + */ +export type GetSlotHeightReply = + Message<'capabilities.blockchain.solana.v1alpha.GetSlotHeightReply'> & { + /** + * @generated from field: uint64 height = 1 [jstype = JS_NORMAL]; + */ + height: bigint + } + +/** + * Current “height” (blocks below latest). + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetSlotHeightReply + */ +export type GetSlotHeightReplyJson = { + /** + * @generated from field: uint64 height = 1 [jstype = JS_NORMAL]; + */ + height?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetSlotHeightReply. + * Use `create(GetSlotHeightReplySchema)` to create a new message. + */ +export const GetSlotHeightReplySchema: GenMessage< + GetSlotHeightReply, + { jsonType: GetSlotHeightReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 21) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest + */ +export type GetSlotHeightRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest'> & { + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 1; + */ + commitment: CommitmentType + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest + */ +export type GetSlotHeightRequestJson = { + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 1; + */ + commitment?: CommitmentTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetSlotHeightRequest. + * Use `create(GetSlotHeightRequestSchema)` to create a new message. + */ +export const GetSlotHeightRequestSchema: GenMessage< + GetSlotHeightRequest, + { jsonType: GetSlotHeightRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 22) + +/** + * Message header counts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.MessageHeader + */ +export type MessageHeader = Message<'capabilities.blockchain.solana.v1alpha.MessageHeader'> & { + /** + * signer count + * + * @generated from field: uint32 num_required_signatures = 1; + */ + numRequiredSignatures: number + + /** + * trailing signed RO + * + * @generated from field: uint32 num_readonly_signed_accounts = 2; + */ + numReadonlySignedAccounts: number + + /** + * trailing unsigned RO + * + * @generated from field: uint32 num_readonly_unsigned_accounts = 3; + */ + numReadonlyUnsignedAccounts: number +} + +/** + * Message header counts. + * + * @generated from message capabilities.blockchain.solana.v1alpha.MessageHeader + */ +export type MessageHeaderJson = { + /** + * signer count + * + * @generated from field: uint32 num_required_signatures = 1; + */ + numRequiredSignatures?: number + + /** + * trailing signed RO + * + * @generated from field: uint32 num_readonly_signed_accounts = 2; + */ + numReadonlySignedAccounts?: number + + /** + * trailing unsigned RO + * + * @generated from field: uint32 num_readonly_unsigned_accounts = 3; + */ + numReadonlyUnsignedAccounts?: number +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.MessageHeader. + * Use `create(MessageHeaderSchema)` to create a new message. + */ +export const MessageHeaderSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 23) + +/** + * Parsed message (no address tables). + * + * @generated from message capabilities.blockchain.solana.v1alpha.ParsedMessage + */ +export type ParsedMessage = Message<'capabilities.blockchain.solana.v1alpha.ParsedMessage'> & { + /** + * 32-byte Hash + * + * @generated from field: bytes recent_blockhash = 1; + */ + recentBlockhash: Uint8Array + + /** + * list of 32-byte Pubkeys + * + * @generated from field: repeated bytes account_keys = 2; + */ + accountKeys: Uint8Array[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.MessageHeader header = 3; + */ + header?: MessageHeader + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.CompiledInstruction instructions = 4; + */ + instructions: CompiledInstruction[] +} + +/** + * Parsed message (no address tables). + * + * @generated from message capabilities.blockchain.solana.v1alpha.ParsedMessage + */ +export type ParsedMessageJson = { + /** + * 32-byte Hash + * + * @generated from field: bytes recent_blockhash = 1; + */ + recentBlockhash?: string + + /** + * list of 32-byte Pubkeys + * + * @generated from field: repeated bytes account_keys = 2; + */ + accountKeys?: string[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.MessageHeader header = 3; + */ + header?: MessageHeaderJson + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.CompiledInstruction instructions = 4; + */ + instructions?: CompiledInstructionJson[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.ParsedMessage. + * Use `create(ParsedMessageSchema)` to create a new message. + */ +export const ParsedMessageSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 24) + +/** + * Parsed transaction (signatures + message). + * + * @generated from message capabilities.blockchain.solana.v1alpha.ParsedTransaction + */ +export type ParsedTransaction = + Message<'capabilities.blockchain.solana.v1alpha.ParsedTransaction'> & { + /** + * 64-byte signatures + * + * @generated from field: repeated bytes signatures = 1; + */ + signatures: Uint8Array[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ParsedMessage message = 2; + */ + message?: ParsedMessage + } + +/** + * Parsed transaction (signatures + message). + * + * @generated from message capabilities.blockchain.solana.v1alpha.ParsedTransaction + */ +export type ParsedTransactionJson = { + /** + * 64-byte signatures + * + * @generated from field: repeated bytes signatures = 1; + */ + signatures?: string[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ParsedMessage message = 2; + */ + message?: ParsedMessageJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.ParsedTransaction. + * Use `create(ParsedTransactionSchema)` to create a new message. + */ +export const ParsedTransactionSchema: GenMessage< + ParsedTransaction, + { jsonType: ParsedTransactionJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 25) + +/** + * Token amount (UI-friendly). + * + * @generated from message capabilities.blockchain.solana.v1alpha.UiTokenAmount + */ +export type UiTokenAmount = Message<'capabilities.blockchain.solana.v1alpha.UiTokenAmount'> & { + /** + * raw integer string + * + * @generated from field: string amount = 1; + */ + amount: string + + /** + * mint decimals + * + * @generated from field: uint32 decimals = 2; + */ + decimals: number + + /** + * amount / 10^decimals + * + * @generated from field: string ui_amount_string = 4; + */ + uiAmountString: string +} + +/** + * Token amount (UI-friendly). + * + * @generated from message capabilities.blockchain.solana.v1alpha.UiTokenAmount + */ +export type UiTokenAmountJson = { + /** + * raw integer string + * + * @generated from field: string amount = 1; + */ + amount?: string + + /** + * mint decimals + * + * @generated from field: uint32 decimals = 2; + */ + decimals?: number + + /** + * amount / 10^decimals + * + * @generated from field: string ui_amount_string = 4; + */ + uiAmountString?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.UiTokenAmount. + * Use `create(UiTokenAmountSchema)` to create a new message. + */ +export const UiTokenAmountSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 26) + +/** + * SPL token balance entry. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TokenBalance + */ +export type TokenBalance = Message<'capabilities.blockchain.solana.v1alpha.TokenBalance'> & { + /** + * index in account_keys + * + * @generated from field: uint32 account_index = 1; + */ + accountIndex: number + + /** + * 32-byte owner (optional) + * + * @generated from field: optional bytes owner = 2; + */ + owner?: Uint8Array + + /** + * 32-byte token program (optional) + * + * @generated from field: optional bytes program_id = 3; + */ + programId?: Uint8Array + + /** + * 32-byte mint + * + * @generated from field: bytes mint = 4; + */ + mint: Uint8Array + + /** + * formatted amounts + * + * @generated from field: capabilities.blockchain.solana.v1alpha.UiTokenAmount ui = 5; + */ + ui?: UiTokenAmount +} + +/** + * SPL token balance entry. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TokenBalance + */ +export type TokenBalanceJson = { + /** + * index in account_keys + * + * @generated from field: uint32 account_index = 1; + */ + accountIndex?: number + + /** + * 32-byte owner (optional) + * + * @generated from field: optional bytes owner = 2; + */ + owner?: string + + /** + * 32-byte token program (optional) + * + * @generated from field: optional bytes program_id = 3; + */ + programId?: string + + /** + * 32-byte mint + * + * @generated from field: bytes mint = 4; + */ + mint?: string + + /** + * formatted amounts + * + * @generated from field: capabilities.blockchain.solana.v1alpha.UiTokenAmount ui = 5; + */ + ui?: UiTokenAmountJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.TokenBalance. + * Use `create(TokenBalanceSchema)` to create a new message. + */ +export const TokenBalanceSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 27) + +/** + * Inner instruction list at a given outer instruction index. + * + * @generated from message capabilities.blockchain.solana.v1alpha.InnerInstruction + */ +export type InnerInstruction = + Message<'capabilities.blockchain.solana.v1alpha.InnerInstruction'> & { + /** + * outer ix index + * + * @generated from field: uint32 index = 1; + */ + index: number + + /** + * invoked ixs + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.CompiledInstruction instructions = 2; + */ + instructions: CompiledInstruction[] + } + +/** + * Inner instruction list at a given outer instruction index. + * + * @generated from message capabilities.blockchain.solana.v1alpha.InnerInstruction + */ +export type InnerInstructionJson = { + /** + * outer ix index + * + * @generated from field: uint32 index = 1; + */ + index?: number + + /** + * invoked ixs + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.CompiledInstruction instructions = 2; + */ + instructions?: CompiledInstructionJson[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.InnerInstruction. + * Use `create(InnerInstructionSchema)` to create a new message. + */ +export const InnerInstructionSchema: GenMessage< + InnerInstruction, + { jsonType: InnerInstructionJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 28) + +/** + * Address table lookups expanded by loader. + * + * @generated from message capabilities.blockchain.solana.v1alpha.LoadedAddresses + */ +export type LoadedAddresses = Message<'capabilities.blockchain.solana.v1alpha.LoadedAddresses'> & { + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes readonly = 1; + */ + readonly: Uint8Array[] + + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes writable = 2; + */ + writable: Uint8Array[] +} + +/** + * Address table lookups expanded by loader. + * + * @generated from message capabilities.blockchain.solana.v1alpha.LoadedAddresses + */ +export type LoadedAddressesJson = { + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes readonly = 1; + */ + readonly?: string[] + + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes writable = 2; + */ + writable?: string[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.LoadedAddresses. + * Use `create(LoadedAddressesSchema)` to create a new message. + */ +export const LoadedAddressesSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 29) + +/** + * Compiled (program) instruction. + * + * @generated from message capabilities.blockchain.solana.v1alpha.CompiledInstruction + */ +export type CompiledInstruction = + Message<'capabilities.blockchain.solana.v1alpha.CompiledInstruction'> & { + /** + * index into account_keys + * + * @generated from field: uint32 program_id_index = 1; + */ + programIdIndex: number + + /** + * indices into account_keys + * + * @generated from field: repeated uint32 accounts = 2; + */ + accounts: number[] + + /** + * program input bytes + * + * @generated from field: bytes data = 3; + */ + data: Uint8Array + + /** + * if recorded by node + * + * @generated from field: uint32 stack_height = 4; + */ + stackHeight: number + } + +/** + * Compiled (program) instruction. + * + * @generated from message capabilities.blockchain.solana.v1alpha.CompiledInstruction + */ +export type CompiledInstructionJson = { + /** + * index into account_keys + * + * @generated from field: uint32 program_id_index = 1; + */ + programIdIndex?: number + + /** + * indices into account_keys + * + * @generated from field: repeated uint32 accounts = 2; + */ + accounts?: number[] + + /** + * program input bytes + * + * @generated from field: bytes data = 3; + */ + data?: string + + /** + * if recorded by node + * + * @generated from field: uint32 stack_height = 4; + */ + stackHeight?: number +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.CompiledInstruction. + * Use `create(CompiledInstructionSchema)` to create a new message. + */ +export const CompiledInstructionSchema: GenMessage< + CompiledInstruction, + { jsonType: CompiledInstructionJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 30) + +/** + * Raw bytes with encoding tag. + * + * @generated from message capabilities.blockchain.solana.v1alpha.Data + */ +export type Data = Message<'capabilities.blockchain.solana.v1alpha.Data'> & { + /** + * raw bytes + * + * @generated from field: bytes content = 1; + */ + content: Uint8Array + + /** + * how it was encoded originally + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 2; + */ + encoding: EncodingType +} + +/** + * Raw bytes with encoding tag. + * + * @generated from message capabilities.blockchain.solana.v1alpha.Data + */ +export type DataJson = { + /** + * raw bytes + * + * @generated from field: bytes content = 1; + */ + content?: string + + /** + * how it was encoded originally + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 2; + */ + encoding?: EncodingTypeJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.Data. + * Use `create(DataSchema)` to create a new message. + */ +export const DataSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 31) + +/** + * Program return data. + * + * @generated from message capabilities.blockchain.solana.v1alpha.ReturnData + */ +export type ReturnData = Message<'capabilities.blockchain.solana.v1alpha.ReturnData'> & { + /** + * 32-byte Pubkey + * + * @generated from field: bytes program_id = 1; + */ + programId: Uint8Array + + /** + * raw return bytes + * + * @generated from field: capabilities.blockchain.solana.v1alpha.Data data = 2; + */ + data?: Data +} + +/** + * Program return data. + * + * @generated from message capabilities.blockchain.solana.v1alpha.ReturnData + */ +export type ReturnDataJson = { + /** + * 32-byte Pubkey + * + * @generated from field: bytes program_id = 1; + */ + programId?: string + + /** + * raw return bytes + * + * @generated from field: capabilities.blockchain.solana.v1alpha.Data data = 2; + */ + data?: DataJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.ReturnData. + * Use `create(ReturnDataSchema)` to create a new message. + */ +export const ReturnDataSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 32) + +/** + * Transaction execution metadata. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TransactionMeta + */ +export type TransactionMeta = Message<'capabilities.blockchain.solana.v1alpha.TransactionMeta'> & { + /** + * error JSON (empty on success) + * + * @generated from field: string err_json = 1; + */ + errJson: string + + /** + * lamports + * + * @generated from field: uint64 fee = 2 [jstype = JS_NORMAL]; + */ + fee: bigint + + /** + * lamports per account + * + * @generated from field: repeated uint64 pre_balances = 3 [jstype = JS_NORMAL]; + */ + preBalances: bigint[] + + /** + * lamports per account + * + * @generated from field: repeated uint64 post_balances = 4 [jstype = JS_NORMAL]; + */ + postBalances: bigint[] + + /** + * runtime logs + * + * @generated from field: repeated string log_messages = 5; + */ + logMessages: string[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.TokenBalance pre_token_balances = 6; + */ + preTokenBalances: TokenBalance[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.TokenBalance post_token_balances = 7; + */ + postTokenBalances: TokenBalance[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.InnerInstruction inner_instructions = 8; + */ + innerInstructions: InnerInstruction[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.LoadedAddresses loaded_addresses = 9; + */ + loadedAddresses?: LoadedAddresses + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ReturnData return_data = 10; + */ + returnData?: ReturnData + + /** + * CUs + * + * @generated from field: optional uint64 compute_units_consumed = 11 [jstype = JS_NORMAL]; + */ + computeUnitsConsumed?: bigint +} + +/** + * Transaction execution metadata. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TransactionMeta + */ +export type TransactionMetaJson = { + /** + * error JSON (empty on success) + * + * @generated from field: string err_json = 1; + */ + errJson?: string + + /** + * lamports + * + * @generated from field: uint64 fee = 2 [jstype = JS_NORMAL]; + */ + fee?: string + + /** + * lamports per account + * + * @generated from field: repeated uint64 pre_balances = 3 [jstype = JS_NORMAL]; + */ + preBalances?: string[] + + /** + * lamports per account + * + * @generated from field: repeated uint64 post_balances = 4 [jstype = JS_NORMAL]; + */ + postBalances?: string[] + + /** + * runtime logs + * + * @generated from field: repeated string log_messages = 5; + */ + logMessages?: string[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.TokenBalance pre_token_balances = 6; + */ + preTokenBalances?: TokenBalanceJson[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.TokenBalance post_token_balances = 7; + */ + postTokenBalances?: TokenBalanceJson[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.InnerInstruction inner_instructions = 8; + */ + innerInstructions?: InnerInstructionJson[] + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.LoadedAddresses loaded_addresses = 9; + */ + loadedAddresses?: LoadedAddressesJson + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ReturnData return_data = 10; + */ + returnData?: ReturnDataJson + + /** + * CUs + * + * @generated from field: optional uint64 compute_units_consumed = 11 [jstype = JS_NORMAL]; + */ + computeUnitsConsumed?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.TransactionMeta. + * Use `create(TransactionMetaSchema)` to create a new message. + */ +export const TransactionMetaSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 33) + +/** + * Transaction envelope: raw bytes or parsed struct. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TransactionEnvelope + */ +export type TransactionEnvelope = + Message<'capabilities.blockchain.solana.v1alpha.TransactionEnvelope'> & { + /** + * @generated from oneof capabilities.blockchain.solana.v1alpha.TransactionEnvelope.transaction + */ + transaction: + | { + /** + * raw tx bytes (for RAW/base64) + * + * @generated from field: bytes raw = 1; + */ + value: Uint8Array + case: 'raw' + } + | { + /** + * parsed tx (for JSON_PARSED) + * + * @generated from field: capabilities.blockchain.solana.v1alpha.ParsedTransaction parsed = 2; + */ + value: ParsedTransaction + case: 'parsed' + } + | { case: undefined; value?: undefined } + } + +/** + * Transaction envelope: raw bytes or parsed struct. + * + * @generated from message capabilities.blockchain.solana.v1alpha.TransactionEnvelope + */ +export type TransactionEnvelopeJson = { + /** + * raw tx bytes (for RAW/base64) + * + * @generated from field: bytes raw = 1; + */ + raw?: string + + /** + * parsed tx (for JSON_PARSED) + * + * @generated from field: capabilities.blockchain.solana.v1alpha.ParsedTransaction parsed = 2; + */ + parsed?: ParsedTransactionJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.TransactionEnvelope. + * Use `create(TransactionEnvelopeSchema)` to create a new message. + */ +export const TransactionEnvelopeSchema: GenMessage< + TransactionEnvelope, + { jsonType: TransactionEnvelopeJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 34) + +/** + * GetTransaction reply. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetTransactionReply + */ +export type GetTransactionReply = + Message<'capabilities.blockchain.solana.v1alpha.GetTransactionReply'> & { + /** + * processed slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot: bigint + + /** + * unix seconds + * + * @generated from field: optional int64 block_time = 2 [jstype = JS_NORMAL]; + */ + blockTime?: bigint + + /** + * tx bytes or parsed + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.TransactionEnvelope transaction = 3; + */ + transaction?: TransactionEnvelope + + /** + * may be omitted by node + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.TransactionMeta meta = 4; + */ + meta?: TransactionMeta + } + +/** + * GetTransaction reply. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetTransactionReply + */ +export type GetTransactionReplyJson = { + /** + * processed slot + * + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot?: string + + /** + * unix seconds + * + * @generated from field: optional int64 block_time = 2 [jstype = JS_NORMAL]; + */ + blockTime?: string + + /** + * tx bytes or parsed + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.TransactionEnvelope transaction = 3; + */ + transaction?: TransactionEnvelopeJson + + /** + * may be omitted by node + * + * @generated from field: optional capabilities.blockchain.solana.v1alpha.TransactionMeta meta = 4; + */ + meta?: TransactionMetaJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetTransactionReply. + * Use `create(GetTransactionReplySchema)` to create a new message. + */ +export const GetTransactionReplySchema: GenMessage< + GetTransactionReply, + { jsonType: GetTransactionReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 35) + +/** + * GetTransaction request. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetTransactionRequest + */ +export type GetTransactionRequest = + Message<'capabilities.blockchain.solana.v1alpha.GetTransactionRequest'> & { + /** + * 64-byte signature + * + * @generated from field: bytes signature = 1; + */ + signature: Uint8Array + } + +/** + * GetTransaction request. + * + * @generated from message capabilities.blockchain.solana.v1alpha.GetTransactionRequest + */ +export type GetTransactionRequestJson = { + /** + * 64-byte signature + * + * @generated from field: bytes signature = 1; + */ + signature?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.GetTransactionRequest. + * Use `create(GetTransactionRequestSchema)` to create a new message. + */ +export const GetTransactionRequestSchema: GenMessage< + GetTransactionRequest, + { jsonType: GetTransactionRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 36) + +/** + * RPC read context. + * + * @generated from message capabilities.blockchain.solana.v1alpha.RPCContext + */ +export type RPCContext = Message<'capabilities.blockchain.solana.v1alpha.RPCContext'> & { + /** + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot: bigint +} + +/** + * RPC read context. + * + * @generated from message capabilities.blockchain.solana.v1alpha.RPCContext + */ +export type RPCContextJson = { + /** + * @generated from field: uint64 slot = 1 [jstype = JS_NORMAL]; + */ + slot?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.RPCContext. + * Use `create(RPCContextSchema)` to create a new message. + */ +export const RPCContextSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 37) + +/** + * Simulation options. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXOpts + */ +export type SimulateTXOpts = Message<'capabilities.blockchain.solana.v1alpha.SimulateTXOpts'> & { + /** + * verify sigs + * + * @generated from field: bool sig_verify = 1; + */ + sigVerify: boolean + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment: CommitmentType + + /** + * refresh blockhash + * + * @generated from field: bool replace_recent_blockhash = 3; + */ + replaceRecentBlockhash: boolean + + /** + * return accounts + * + * @generated from field: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts accounts = 4; + */ + accounts?: SimulateTransactionAccountsOpts +} + +/** + * Simulation options. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXOpts + */ +export type SimulateTXOptsJson = { + /** + * verify sigs + * + * @generated from field: bool sig_verify = 1; + */ + sigVerify?: boolean + + /** + * read consistency + * + * @generated from field: capabilities.blockchain.solana.v1alpha.CommitmentType commitment = 2; + */ + commitment?: CommitmentTypeJson + + /** + * refresh blockhash + * + * @generated from field: bool replace_recent_blockhash = 3; + */ + replaceRecentBlockhash?: boolean + + /** + * return accounts + * + * @generated from field: capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts accounts = 4; + */ + accounts?: SimulateTransactionAccountsOptsJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.SimulateTXOpts. + * Use `create(SimulateTXOptsSchema)` to create a new message. + */ +export const SimulateTXOptsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 38) + +/** + * Simulation result. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXReply + */ +export type SimulateTXReply = Message<'capabilities.blockchain.solana.v1alpha.SimulateTXReply'> & { + /** + * empty on success + * + * @generated from field: string err = 1; + */ + err: string + + /** + * runtime logs + * + * @generated from field: repeated string logs = 2; + */ + logs: string[] + + /** + * returned accounts + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.Account accounts = 3; + */ + accounts: Account[] + + /** + * CUs + * + * @generated from field: uint64 units_consumed = 4 [jstype = JS_NORMAL]; + */ + unitsConsumed: bigint +} + +/** + * Simulation result. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXReply + */ +export type SimulateTXReplyJson = { + /** + * empty on success + * + * @generated from field: string err = 1; + */ + err?: string + + /** + * runtime logs + * + * @generated from field: repeated string logs = 2; + */ + logs?: string[] + + /** + * returned accounts + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.Account accounts = 3; + */ + accounts?: AccountJson[] + + /** + * CUs + * + * @generated from field: uint64 units_consumed = 4 [jstype = JS_NORMAL]; + */ + unitsConsumed?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.SimulateTXReply. + * Use `create(SimulateTXReplySchema)` to create a new message. + */ +export const SimulateTXReplySchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 39) + +/** + * Simulation request. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXRequest + */ +export type SimulateTXRequest = + Message<'capabilities.blockchain.solana.v1alpha.SimulateTXRequest'> & { + /** + * 32-byte program id (target) + * + * @generated from field: bytes receiver = 1; + */ + receiver: Uint8Array + + /** + * base64/base58 tx + * + * @generated from field: string encoded_transaction = 2; + */ + encodedTransaction: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.SimulateTXOpts opts = 3; + */ + opts?: SimulateTXOpts + } + +/** + * Simulation request. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTXRequest + */ +export type SimulateTXRequestJson = { + /** + * 32-byte program id (target) + * + * @generated from field: bytes receiver = 1; + */ + receiver?: string + + /** + * base64/base58 tx + * + * @generated from field: string encoded_transaction = 2; + */ + encodedTransaction?: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.SimulateTXOpts opts = 3; + */ + opts?: SimulateTXOptsJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.SimulateTXRequest. + * Use `create(SimulateTXRequestSchema)` to create a new message. + */ +export const SimulateTXRequestSchema: GenMessage< + SimulateTXRequest, + { jsonType: SimulateTXRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 40) + +/** + * Accounts to return during simulation. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts + */ +export type SimulateTransactionAccountsOpts = + Message<'capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts'> & { + /** + * account data encoding + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding: EncodingType + + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes addresses = 2; + */ + addresses: Uint8Array[] + } + +/** + * Accounts to return during simulation. + * + * @generated from message capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts + */ +export type SimulateTransactionAccountsOptsJson = { + /** + * account data encoding + * + * @generated from field: capabilities.blockchain.solana.v1alpha.EncodingType encoding = 1; + */ + encoding?: EncodingTypeJson + + /** + * 32-byte Pubkeys + * + * @generated from field: repeated bytes addresses = 2; + */ + addresses?: string[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.SimulateTransactionAccountsOpts. + * Use `create(SimulateTransactionAccountsOptsSchema)` to create a new message. + */ +export const SimulateTransactionAccountsOptsSchema: GenMessage< + SimulateTransactionAccountsOpts, + { jsonType: SimulateTransactionAccountsOptsJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 41) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.ValueComparator + */ +export type ValueComparator = Message<'capabilities.blockchain.solana.v1alpha.ValueComparator'> & { + /** + * @generated from field: bytes value = 1; + */ + value: Uint8Array + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ComparisonOperator operator = 2; + */ + operator: ComparisonOperator +} + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.ValueComparator + */ +export type ValueComparatorJson = { + /** + * @generated from field: bytes value = 1; + */ + value?: string + + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.ComparisonOperator operator = 2; + */ + operator?: ComparisonOperatorJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.ValueComparator. + * Use `create(ValueComparatorSchema)` to create a new message. + */ +export const ValueComparatorSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 42) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.SubkeyConfig + */ +export type SubkeyConfig = Message<'capabilities.blockchain.solana.v1alpha.SubkeyConfig'> & { + /** + * @generated from field: repeated string path = 1; + */ + path: string[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.ValueComparator comparers = 2; + */ + comparers: ValueComparator[] +} + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.SubkeyConfig + */ +export type SubkeyConfigJson = { + /** + * @generated from field: repeated string path = 1; + */ + path?: string[] + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.ValueComparator comparers = 2; + */ + comparers?: ValueComparatorJson[] +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.SubkeyConfig. + * Use `create(SubkeyConfigSchema)` to create a new message. + */ +export const SubkeyConfigSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 43) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.CPIFilterConfig + */ +export type CPIFilterConfig = Message<'capabilities.blockchain.solana.v1alpha.CPIFilterConfig'> & { + /** + * @generated from field: bytes dest_address = 1; + */ + destAddress: Uint8Array + + /** + * @generated from field: bytes method_name = 2; + */ + methodName: Uint8Array +} + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.CPIFilterConfig + */ +export type CPIFilterConfigJson = { + /** + * @generated from field: bytes dest_address = 1; + */ + destAddress?: string + + /** + * @generated from field: bytes method_name = 2; + */ + methodName?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.CPIFilterConfig. + * Use `create(CPIFilterConfigSchema)` to create a new message. + */ +export const CPIFilterConfigSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 44) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest + */ +export type FilterLogTriggerRequest = + Message<'capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest'> & { + /** + * @generated from field: string name = 1; + */ + name: string + + /** + * Solana PublicKey (32 bytes) + * + * @generated from field: bytes address = 2; + */ + address: Uint8Array + + /** + * @generated from field: string event_name = 3; + */ + eventName: string + + /** + * @generated from field: bytes contract_idl_json = 4; + */ + contractIdlJson: Uint8Array + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.SubkeyConfig subkeys = 5; + */ + subkeys: SubkeyConfig[] + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.CPIFilterConfig cpi_filter_config = 6; + */ + cpiFilterConfig?: CPIFilterConfig + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest + */ +export type FilterLogTriggerRequestJson = { + /** + * @generated from field: string name = 1; + */ + name?: string + + /** + * Solana PublicKey (32 bytes) + * + * @generated from field: bytes address = 2; + */ + address?: string + + /** + * @generated from field: string event_name = 3; + */ + eventName?: string + + /** + * @generated from field: bytes contract_idl_json = 4; + */ + contractIdlJson?: string + + /** + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.SubkeyConfig subkeys = 5; + */ + subkeys?: SubkeyConfigJson[] + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.CPIFilterConfig cpi_filter_config = 6; + */ + cpiFilterConfig?: CPIFilterConfigJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.FilterLogTriggerRequest. + * Use `create(FilterLogTriggerRequestSchema)` to create a new message. + */ +export const FilterLogTriggerRequestSchema: GenMessage< + FilterLogTriggerRequest, + { jsonType: FilterLogTriggerRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 45) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.Log + */ +export type Log = Message<'capabilities.blockchain.solana.v1alpha.Log'> & { + /** + * Chain identifier + * + * @generated from field: string chain_id = 1; + */ + chainId: string + + /** + * Index of the log within the block + * + * @generated from field: int64 log_index = 2 [jstype = JS_NORMAL]; + */ + logIndex: bigint + + /** + * 32-byte block hash + * + * @generated from field: bytes block_hash = 3; + */ + blockHash: Uint8Array + + /** + * Block/slot number + * + * @generated from field: int64 block_number = 4 [jstype = JS_NORMAL]; + */ + blockNumber: bigint + + /** + * Unix timestamp of the block + * + * @generated from field: uint64 block_timestamp = 5 [jstype = JS_NORMAL]; + */ + blockTimestamp: bigint + + /** + * 32-byte program PublicKey + * + * @generated from field: bytes address = 6; + */ + address: Uint8Array + + /** + * 8-byte event signature + * + * @generated from field: bytes event_sig = 7; + */ + eventSig: Uint8Array + + /** + * 64-byte transaction signature + * + * @generated from field: bytes tx_hash = 8; + */ + txHash: Uint8Array + + /** + * Decoded event data + * + * @generated from field: bytes data = 9; + */ + data: Uint8Array + + /** + * Sequence number for ordering + * + * @generated from field: int64 sequence_num = 10 [jstype = JS_NORMAL]; + */ + sequenceNum: bigint + + /** + * Error message if log processing failed + * + * @generated from field: optional string error = 11; + */ + error?: string +} + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.Log + */ +export type LogJson = { + /** + * Chain identifier + * + * @generated from field: string chain_id = 1; + */ + chainId?: string + + /** + * Index of the log within the block + * + * @generated from field: int64 log_index = 2 [jstype = JS_NORMAL]; + */ + logIndex?: string + + /** + * 32-byte block hash + * + * @generated from field: bytes block_hash = 3; + */ + blockHash?: string + + /** + * Block/slot number + * + * @generated from field: int64 block_number = 4 [jstype = JS_NORMAL]; + */ + blockNumber?: string + + /** + * Unix timestamp of the block + * + * @generated from field: uint64 block_timestamp = 5 [jstype = JS_NORMAL]; + */ + blockTimestamp?: string + + /** + * 32-byte program PublicKey + * + * @generated from field: bytes address = 6; + */ + address?: string + + /** + * 8-byte event signature + * + * @generated from field: bytes event_sig = 7; + */ + eventSig?: string + + /** + * 64-byte transaction signature + * + * @generated from field: bytes tx_hash = 8; + */ + txHash?: string + + /** + * Decoded event data + * + * @generated from field: bytes data = 9; + */ + data?: string + + /** + * Sequence number for ordering + * + * @generated from field: int64 sequence_num = 10 [jstype = JS_NORMAL]; + */ + sequenceNum?: string + + /** + * Error message if log processing failed + * + * @generated from field: optional string error = 11; + */ + error?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.Log. + * Use `create(LogSchema)` to create a new message. + */ +export const LogSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 46) + +/** + * All metas are non-signers. + * + * @generated from message capabilities.blockchain.solana.v1alpha.AccountMeta + */ +export type AccountMeta = Message<'capabilities.blockchain.solana.v1alpha.AccountMeta'> & { + /** + * 32 bytes account public key + * + * @generated from field: bytes public_key = 1; + */ + publicKey: Uint8Array + + /** + * write flag + * + * @generated from field: bool is_writable = 2; + */ + isWritable: boolean +} + +/** + * All metas are non-signers. + * + * @generated from message capabilities.blockchain.solana.v1alpha.AccountMeta + */ +export type AccountMetaJson = { + /** + * 32 bytes account public key + * + * @generated from field: bytes public_key = 1; + */ + publicKey?: string + + /** + * write flag + * + * @generated from field: bool is_writable = 2; + */ + isWritable?: boolean +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.AccountMeta. + * Use `create(AccountMetaSchema)` to create a new message. + */ +export const AccountMetaSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 47) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportRequest + */ +export type WriteReportRequest = + Message<'capabilities.blockchain.solana.v1alpha.WriteReportRequest'> & { + /** + * accounts that are required by the receiver to accept the report + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.AccountMeta remaining_accounts = 1; + */ + remainingAccounts: AccountMeta[] + + /** + * 32 bytes receiver + * + * @generated from field: bytes receiver = 2; + */ + receiver: Uint8Array + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.ComputeConfig compute_config = 3; + */ + computeConfig?: ComputeConfig + + /** + * @generated from field: sdk.v1alpha.ReportResponse report = 4; + */ + report?: ReportResponse + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportRequest + */ +export type WriteReportRequestJson = { + /** + * accounts that are required by the receiver to accept the report + * + * @generated from field: repeated capabilities.blockchain.solana.v1alpha.AccountMeta remaining_accounts = 1; + */ + remainingAccounts?: AccountMetaJson[] + + /** + * 32 bytes receiver + * + * @generated from field: bytes receiver = 2; + */ + receiver?: string + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.ComputeConfig compute_config = 3; + */ + computeConfig?: ComputeConfigJson + + /** + * @generated from field: sdk.v1alpha.ReportResponse report = 4; + */ + report?: ReportResponseJson +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportRequest. + * Use `create(WriteReportRequestSchema)` to create a new message. + */ +export const WriteReportRequestSchema: GenMessage< + WriteReportRequest, + { jsonType: WriteReportRequestJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 48) + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportReply + */ +export type WriteReportReply = + Message<'capabilities.blockchain.solana.v1alpha.WriteReportReply'> & { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.TxStatus tx_status = 1; + */ + txStatus: TxStatus + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 2; + */ + receiverContractExecutionStatus?: ReceiverContractExecutionStatus + + /** + * @generated from field: optional bytes tx_signature = 3; + */ + txSignature?: Uint8Array + + /** + * @generated from field: optional uint64 transaction_fee = 4 [jstype = JS_NORMAL]; + */ + transactionFee?: bigint + + /** + * @generated from field: optional string error_message = 5; + */ + errorMessage?: string + } + +/** + * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportReply + */ +export type WriteReportReplyJson = { + /** + * @generated from field: capabilities.blockchain.solana.v1alpha.TxStatus tx_status = 1; + */ + txStatus?: TxStatusJson + + /** + * @generated from field: optional capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 2; + */ + receiverContractExecutionStatus?: ReceiverContractExecutionStatusJson + + /** + * @generated from field: optional bytes tx_signature = 3; + */ + txSignature?: string + + /** + * @generated from field: optional uint64 transaction_fee = 4 [jstype = JS_NORMAL]; + */ + transactionFee?: string + + /** + * @generated from field: optional string error_message = 5; + */ + errorMessage?: string +} + +/** + * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportReply. + * Use `create(WriteReportReplySchema)` to create a new message. + */ +export const WriteReportReplySchema: GenMessage< + WriteReportReply, + { jsonType: WriteReportReplyJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 49) + +/** + * Account/tx data encodings. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.EncodingType + */ +export enum EncodingType { + /** + * @generated from enum value: ENCODING_TYPE_NONE = 0; + */ + NONE = 0, + + /** + * for data <129 bytes + * + * @generated from enum value: ENCODING_TYPE_BASE58 = 1; + */ + BASE58 = 1, + + /** + * any size + * + * @generated from enum value: ENCODING_TYPE_BASE64 = 2; + */ + BASE64 = 2, + + /** + * zstd-compressed, base64-wrapped + * + * @generated from enum value: ENCODING_TYPE_BASE64_ZSTD = 3; + */ + BASE64_ZSTD = 3, + + /** + * program parsers; fallback to base64 if unknown + * + * @generated from enum value: ENCODING_TYPE_JSON_PARSED = 4; + */ + JSON_PARSED = 4, + + /** + * raw JSON (rare; prefer JSON_PARSED) + * + * @generated from enum value: ENCODING_TYPE_JSON = 5; + */ + JSON = 5, +} + +/** + * Account/tx data encodings. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.EncodingType + */ +export type EncodingTypeJson = + | 'ENCODING_TYPE_NONE' + | 'ENCODING_TYPE_BASE58' + | 'ENCODING_TYPE_BASE64' + | 'ENCODING_TYPE_BASE64_ZSTD' + | 'ENCODING_TYPE_JSON_PARSED' + | 'ENCODING_TYPE_JSON' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.EncodingType. + */ +export const EncodingTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 0) + +/** + * Read consistency of queried state. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.CommitmentType + */ +export enum CommitmentType { + /** + * @generated from enum value: COMMITMENT_TYPE_NONE = 0; + */ + NONE = 0, + + /** + * cluster-finalized + * + * @generated from enum value: COMMITMENT_TYPE_FINALIZED = 1; + */ + FINALIZED = 1, + + /** + * voted by supermajority + * + * @generated from enum value: COMMITMENT_TYPE_CONFIRMED = 2; + */ + CONFIRMED = 2, + + /** + * node’s latest + * + * @generated from enum value: COMMITMENT_TYPE_PROCESSED = 3; + */ + PROCESSED = 3, +} + +/** + * Read consistency of queried state. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.CommitmentType + */ +export type CommitmentTypeJson = + | 'COMMITMENT_TYPE_NONE' + | 'COMMITMENT_TYPE_FINALIZED' + | 'COMMITMENT_TYPE_CONFIRMED' + | 'COMMITMENT_TYPE_PROCESSED' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.CommitmentType. + */ +export const CommitmentTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 1) + +/** + * Cluster confirmation status of a tx/signature. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.ConfirmationStatusType + */ +export enum ConfirmationStatusType { + /** + * @generated from enum value: CONFIRMATION_STATUS_TYPE_NONE = 0; + */ + NONE = 0, + + /** + * @generated from enum value: CONFIRMATION_STATUS_TYPE_PROCESSED = 1; + */ + PROCESSED = 1, + + /** + * @generated from enum value: CONFIRMATION_STATUS_TYPE_CONFIRMED = 2; + */ + CONFIRMED = 2, + + /** + * @generated from enum value: CONFIRMATION_STATUS_TYPE_FINALIZED = 3; + */ + FINALIZED = 3, +} + +/** + * Cluster confirmation status of a tx/signature. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.ConfirmationStatusType + */ +export type ConfirmationStatusTypeJson = + | 'CONFIRMATION_STATUS_TYPE_NONE' + | 'CONFIRMATION_STATUS_TYPE_PROCESSED' + | 'CONFIRMATION_STATUS_TYPE_CONFIRMED' + | 'CONFIRMATION_STATUS_TYPE_FINALIZED' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.ConfirmationStatusType. + */ +export const ConfirmationStatusTypeSchema: GenEnum< + ConfirmationStatusType, + ConfirmationStatusTypeJson +> = /*@__PURE__*/ enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 2) + +/** + * Transaction execution status returned by submitters/simulations. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.TxStatus + */ +export enum TxStatus { + /** + * unrecoverable failure + * + * @generated from enum value: TX_STATUS_FATAL = 0; + */ + FATAL = 0, + + /** + * not executed / dropped + * + * @generated from enum value: TX_STATUS_ABORTED = 1; + */ + ABORTED = 1, + + /** + * executed successfully + * + * @generated from enum value: TX_STATUS_SUCCESS = 2; + */ + SUCCESS = 2, +} + +/** + * Transaction execution status returned by submitters/simulations. + * + * @generated from enum capabilities.blockchain.solana.v1alpha.TxStatus + */ +export type TxStatusJson = 'TX_STATUS_FATAL' | 'TX_STATUS_ABORTED' | 'TX_STATUS_SUCCESS' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.TxStatus. + */ +export const TxStatusSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 3) + +/** + * @generated from enum capabilities.blockchain.solana.v1alpha.ComparisonOperator + */ +export enum ComparisonOperator { + /** + * @generated from enum value: COMPARISON_OPERATOR_EQ = 0; + */ + EQ = 0, + + /** + * @generated from enum value: COMPARISON_OPERATOR_NEQ = 1; + */ + NEQ = 1, + + /** + * @generated from enum value: COMPARISON_OPERATOR_GT = 2; + */ + GT = 2, + + /** + * @generated from enum value: COMPARISON_OPERATOR_LT = 3; + */ + LT = 3, + + /** + * @generated from enum value: COMPARISON_OPERATOR_GTE = 4; + */ + GTE = 4, + + /** + * @generated from enum value: COMPARISON_OPERATOR_LTE = 5; + */ + LTE = 5, +} + +/** + * @generated from enum capabilities.blockchain.solana.v1alpha.ComparisonOperator + */ +export type ComparisonOperatorJson = + | 'COMPARISON_OPERATOR_EQ' + | 'COMPARISON_OPERATOR_NEQ' + | 'COMPARISON_OPERATOR_GT' + | 'COMPARISON_OPERATOR_LT' + | 'COMPARISON_OPERATOR_GTE' + | 'COMPARISON_OPERATOR_LTE' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.ComparisonOperator. + */ +export const ComparisonOperatorSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 4) + +/** + * @generated from enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus + */ +export enum ReceiverContractExecutionStatus { + /** + * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS = 0; + */ + SUCCESS = 0, + + /** + * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED = 1; + */ + REVERTED = 1, +} + +/** + * @generated from enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus + */ +export type ReceiverContractExecutionStatusJson = + | 'RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS' + | 'RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED' + +/** + * Describes the enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus. + */ +export const ReceiverContractExecutionStatusSchema: GenEnum< + ReceiverContractExecutionStatus, + ReceiverContractExecutionStatusJson +> = /*@__PURE__*/ enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 5) + +/** + * @generated from service capabilities.blockchain.solana.v1alpha.Client + */ +export const Client: GenService<{ + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetAccountInfoWithOpts + */ + getAccountInfoWithOpts: { + methodKind: 'unary' + input: typeof GetAccountInfoWithOptsRequestSchema + output: typeof GetAccountInfoWithOptsReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetBalance + */ + getBalance: { + methodKind: 'unary' + input: typeof GetBalanceRequestSchema + output: typeof GetBalanceReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetBlock + */ + getBlock: { + methodKind: 'unary' + input: typeof GetBlockRequestSchema + output: typeof GetBlockReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetFeeForMessage + */ + getFeeForMessage: { + methodKind: 'unary' + input: typeof GetFeeForMessageRequestSchema + output: typeof GetFeeForMessageReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetMultipleAccountsWithOpts + */ + getMultipleAccountsWithOpts: { + methodKind: 'unary' + input: typeof GetMultipleAccountsWithOptsRequestSchema + output: typeof GetMultipleAccountsWithOptsReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetSignatureStatuses + */ + getSignatureStatuses: { + methodKind: 'unary' + input: typeof GetSignatureStatusesRequestSchema + output: typeof GetSignatureStatusesReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetSlotHeight + */ + getSlotHeight: { + methodKind: 'unary' + input: typeof GetSlotHeightRequestSchema + output: typeof GetSlotHeightReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.GetTransaction + */ + getTransaction: { + methodKind: 'unary' + input: typeof GetTransactionRequestSchema + output: typeof GetTransactionReplySchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.LogTrigger + */ + logTrigger: { + methodKind: 'server_streaming' + input: typeof FilterLogTriggerRequestSchema + output: typeof LogSchema + } + /** + * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.WriteReport + */ + writeReport: { + methodKind: 'unary' + input: typeof WriteReportRequestSchema + output: typeof WriteReportReplySchema + } +}> = /*@__PURE__*/ serviceDesc(file_capabilities_blockchain_solana_v1alpha_client, 0) diff --git a/packages/cre-sdk/src/generated/capabilities/compute/confidentialworkflow/v1alpha/client_pb.ts b/packages/cre-sdk/src/generated/capabilities/compute/confidentialworkflow/v1alpha/client_pb.ts index 2255c839..35a3467d 100644 --- a/packages/cre-sdk/src/generated/capabilities/compute/confidentialworkflow/v1alpha/client_pb.ts +++ b/packages/cre-sdk/src/generated/capabilities/compute/confidentialworkflow/v1alpha/client_pb.ts @@ -5,6 +5,19 @@ import type { Message } from '@bufbuild/protobuf' import type { GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2' import { fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2' +import type { EmptySchema } from '@bufbuild/protobuf/wkt' +import { file_google_protobuf_empty } from '@bufbuild/protobuf/wkt' +import type { + ExecuteRequest, + ExecuteRequestJson, + ExecutionResult, + ExecutionResultJson, + Requirements, + RequirementsJson, + TeeTypeAndRegions, + TeeTypeAndRegionsJson, +} from '../../../../sdk/v1alpha/sdk_pb' +import { file_sdk_v1alpha_sdk } from '../../../../sdk/v1alpha/sdk_pb' import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/generator/v1alpha/cre_metadata_pb' /** @@ -13,8 +26,8 @@ import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/gen export const file_capabilities_compute_confidentialworkflow_v1alpha_client: GenFile = /*@__PURE__*/ fileDesc( - 'Cj5jYXBhYmlsaXRpZXMvY29tcHV0ZS9jb25maWRlbnRpYWx3b3JrZmxvdy92MWFscGhhL2NsaWVudC5wcm90bxIxY2FwYWJpbGl0aWVzLmNvbXB1dGUuY29uZmlkZW50aWFsd29ya2Zsb3cudjFhbHBoY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mbG93XFYxYWxwaGFcR1BCTWV0YWRhdGHqAjRDYXBhYmlsaXRpZXM6OkNvbXB1dGU6OkNvbmZpZGVudGlhbHdvcmtmbG93OjpWMWFscGhhYgZwcm90bzM', + [file_google_protobuf_empty, file_sdk_v1alpha_sdk, file_tools_generator_v1alpha_cre_metadata], ) /** @@ -91,12 +104,11 @@ export type WorkflowExecution = binaryHash: Uint8Array /** - * execute_request is a serialized sdk.v1alpha.ExecuteRequest proto. * Contains either a subscribe request or a trigger execution request. * - * @generated from field: bytes execute_request = 4; + * @generated from field: sdk.v1alpha.ExecuteRequest execute_request = 4; */ - executeRequest: Uint8Array + executeRequest?: ExecuteRequest /** * owner is the on-chain owner address of the workflow (hex, 0x-prefixed). @@ -113,6 +125,21 @@ export type WorkflowExecution = * @generated from field: string execution_id = 6; */ executionId: string + + /** + * org_id is the organization identifier for the workflow owner. + * Used by the enclave when fetching secrets from VaultDON with org-based ownership. + * + * @generated from field: string org_id = 7; + */ + orgId: string + + /** + * requirements to run this workflow + * + * @generated from field: sdk.v1alpha.Requirements requirements = 8; + */ + requirements?: Requirements } /** @@ -144,12 +171,11 @@ export type WorkflowExecutionJson = { binaryHash?: string /** - * execute_request is a serialized sdk.v1alpha.ExecuteRequest proto. * Contains either a subscribe request or a trigger execution request. * - * @generated from field: bytes execute_request = 4; + * @generated from field: sdk.v1alpha.ExecuteRequest execute_request = 4; */ - executeRequest?: string + executeRequest?: ExecuteRequestJson /** * owner is the on-chain owner address of the workflow (hex, 0x-prefixed). @@ -166,6 +192,21 @@ export type WorkflowExecutionJson = { * @generated from field: string execution_id = 6; */ executionId?: string + + /** + * org_id is the organization identifier for the workflow owner. + * Used by the enclave when fetching secrets from VaultDON with org-based ownership. + * + * @generated from field: string org_id = 7; + */ + orgId?: string + + /** + * requirements to run this workflow + * + * @generated from field: sdk.v1alpha.Requirements requirements = 8; + */ + requirements?: RequirementsJson } /** @@ -233,9 +274,9 @@ export type ConfidentialWorkflowResponse = /** * execution_result is a serialized sdk.v1alpha.ExecutionResult proto. * - * @generated from field: bytes execution_result = 1; + * @generated from field: sdk.v1alpha.ExecutionResult execution_result = 1; */ - executionResult: Uint8Array + executionResult?: ExecutionResult } /** @@ -247,9 +288,9 @@ export type ConfidentialWorkflowResponseJson = { /** * execution_result is a serialized sdk.v1alpha.ExecutionResult proto. * - * @generated from field: bytes execution_result = 1; + * @generated from field: sdk.v1alpha.ExecutionResult execution_result = 1; */ - executionResult?: string + executionResult?: ExecutionResultJson } /** @@ -261,6 +302,36 @@ export const ConfidentialWorkflowResponseSchema: GenMessage< { jsonType: ConfidentialWorkflowResponseJson } > = /*@__PURE__*/ messageDesc(file_capabilities_compute_confidentialworkflow_v1alpha_client, 3) +/** + * @generated from message capabilities.compute.confidentialworkflow.v1alpha.ProvidedTeesResponse + */ +export type ProvidedTeesResponse = + Message<'capabilities.compute.confidentialworkflow.v1alpha.ProvidedTeesResponse'> & { + /** + * @generated from field: repeated sdk.v1alpha.TeeTypeAndRegions tee = 1; + */ + tee: TeeTypeAndRegions[] + } + +/** + * @generated from message capabilities.compute.confidentialworkflow.v1alpha.ProvidedTeesResponse + */ +export type ProvidedTeesResponseJson = { + /** + * @generated from field: repeated sdk.v1alpha.TeeTypeAndRegions tee = 1; + */ + tee?: TeeTypeAndRegionsJson[] +} + +/** + * Describes the message capabilities.compute.confidentialworkflow.v1alpha.ProvidedTeesResponse. + * Use `create(ProvidedTeesResponseSchema)` to create a new message. + */ +export const ProvidedTeesResponseSchema: GenMessage< + ProvidedTeesResponse, + { jsonType: ProvidedTeesResponseJson } +> = /*@__PURE__*/ messageDesc(file_capabilities_compute_confidentialworkflow_v1alpha_client, 4) + /** * @generated from service capabilities.compute.confidentialworkflow.v1alpha.Client */ @@ -273,4 +344,12 @@ export const Client: GenService<{ input: typeof ConfidentialWorkflowRequestSchema output: typeof ConfidentialWorkflowResponseSchema } + /** + * @generated from rpc capabilities.compute.confidentialworkflow.v1alpha.Client.ProvidedTees + */ + providedTees: { + methodKind: 'unary' + input: typeof EmptySchema + output: typeof ProvidedTeesResponseSchema + } }> = /*@__PURE__*/ serviceDesc(file_capabilities_compute_confidentialworkflow_v1alpha_client, 0) diff --git a/packages/cre-sdk/src/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.ts b/packages/cre-sdk/src/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.ts index 473f7b89..d9691542 100644 --- a/packages/cre-sdk/src/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.ts +++ b/packages/cre-sdk/src/generated/capabilities/networking/confidentialhttp/v1alpha/client_pb.ts @@ -15,7 +15,7 @@ import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/gen export const file_capabilities_networking_confidentialhttp_v1alpha_client: GenFile = /*@__PURE__*/ fileDesc( - 'Cj1jYXBhYmlsaXRpZXMvbmV0d29ya2luZy9jb25maWRlbnRpYWxodHRwL3YxYWxwaGEvY2xpZW50LnByb3RvEjBjYXBhYmlsaXRpZXMubmV0d29ya2luZy5jb25maWRlbnRpYWxodHRwLnYxYWxwaGEiUAoQU2VjcmV0SWRlbnRpZmllchILCgNrZXkYASABKAkSEQoJbmFtZXNwYWNlGAIgASgJEhIKBW93bmVyGAMgASgJSACIAQFCCAoGX293bmVyIh4KDEhlYWRlclZhbHVlcxIOCgZ2YWx1ZXMYASADKAki1wQKC0hUVFBSZXF1ZXN0EgsKA3VybBgBIAEoCRIOCgZtZXRob2QYAiABKAkSFQoLYm9keV9zdHJpbmcYAyABKAlIABIUCgpib2R5X2J5dGVzGAggASgMSAASZgoNbXVsdGlfaGVhZGVycxgEIAMoCzJPLmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5IVFRQUmVxdWVzdC5NdWx0aUhlYWRlcnNFbnRyeRJ3ChZ0ZW1wbGF0ZV9wdWJsaWNfdmFsdWVzGAUgAygLMlcuY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuY29uZmlkZW50aWFsaHR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iyAEKF0NvbmZpZGVudGlhbEhUVFBSZXF1ZXN0El0KEXZhdWx0X2Rvbl9zZWNyZXRzGAEgAygLMkIuY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuY29uZmlkZW50aWFsaHR0cC52MWFscGhhLlNlY3JldElkZW50aWZpZXISTgoHcmVxdWVzdBgCIAEoCzI9LmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5IVFRQUmVxdWVzdDLNAQoGQ2xpZW50EpgBCgtTZW5kUmVxdWVzdBJJLmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5Db25maWRlbnRpYWxIVFRQUmVxdWVzdBo+LmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmNvbmZpZGVudGlhbGh0dHAudjFhbHBoYS5IVFRQUmVzcG9uc2UaKIK1GCQIARIdY29uZmlkZW50aWFsLWh0dHBAMS4wLjAtYWxwaGEiAQFCpgIKNGNvbS5jYXBhYmlsaXRpZXMubmV0d29ya2luZy5jb25maWRlbnRpYWxodHRwLnYxYWxwaGFCC0NsaWVudFByb3RvUAGiAgNDTkOqAjBDYXBhYmlsaXRpZXMuTmV0d29ya2luZy5Db25maWRlbnRpYWxodHRwLlYxYWxwaGHKAjBDYXBhYmlsaXRpZXNcTmV0d29ya2luZ1xDb25maWRlbnRpYWxodHRwXFYxYWxwaGHiAjxDYXBhYmlsaXRpZXNcTmV0d29ya2luZ1xDb25maWRlbnRpYWxodHRwXFYxYWxwaGFcR1BCTWV0YWRhdGHqAjNDYXBhYmlsaXRpZXM6Ok5ldHdvcmtpbmc6OkNvbmZpZGVudGlhbGh0dHA6OlYxYWxwaGFiBnByb3RvMw', [file_google_protobuf_duration, file_tools_generator_v1alpha_cre_metadata], ) diff --git a/packages/cre-sdk/src/generated/capabilities/networking/http/v1alpha/client_pb.ts b/packages/cre-sdk/src/generated/capabilities/networking/http/v1alpha/client_pb.ts index aaa1f748..f8e3db09 100644 --- a/packages/cre-sdk/src/generated/capabilities/networking/http/v1alpha/client_pb.ts +++ b/packages/cre-sdk/src/generated/capabilities/networking/http/v1alpha/client_pb.ts @@ -15,7 +15,7 @@ import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/gen export const file_capabilities_networking_http_v1alpha_client: GenFile = /*@__PURE__*/ fileDesc( - 'CjFjYXBhYmlsaXRpZXMvbmV0d29ya2luZy9odHRwL3YxYWxwaGEvY2xpZW50LnByb3RvEiRjYXBhYmlsaXRpZXMubmV0d29ya2luZy5odHRwLnYxYWxwaGEiSgoNQ2FjaGVTZXR0aW5ncxINCgVzdG9yZRgBIAEoCBIqCgdtYXhfYWdlGAIgASgLMhkuZ29vZ2xlLnByb3RvYnVmLkR1cmF0aW9uIh4KDEhlYWRlclZhbHVlcxIOCgZ2YWx1ZXMYASADKAki7wMKB1JlcXVlc3QSCwoDdXJsGAEgASgJEg4KBm1ldGhvZBgCIAEoCRJPCgdoZWFkZXJzGAMgAygLMjouY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuaHR0cC52MWFscGhhLlJlcXVlc3QuSGVhZGVyc0VudHJ5QgIYARIMCgRib2R5GAQgASgMEioKB3RpbWVvdXQYBSABKAsyGS5nb29nbGUucHJvdG9idWYuRHVyYXRpb24SSwoOY2FjaGVfc2V0dGluZ3MYBiABKAsyMy5jYXBhYmlsaXRpZXMubmV0d29ya2luZy5odHRwLnYxYWxwaGEuQ2FjaGVTZXR0aW5ncxJWCg1tdWx0aV9oZWFkZXJzGAcgAygLMj8uY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuaHR0cC52MWFscGhhLlJlcXVlc3QuTXVsdGlIZWFkZXJzRW50cnkaLgoMSGVhZGVyc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaZwoRTXVsdGlIZWFkZXJzRW50cnkSCwoDa2V5GAEgASgJEkEKBXZhbHVlGAIgASgLMjIuY2F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UuSGVhZGVyc0VudHJ5QgIYARIMCgRib2R5GAMgASgMElcKDW11bHRpX2hlYWRlcnMYBCADKAsyQC5jYXBhYmlsaXRpZXMubmV0d29ya2luZy5odHRwLnYxYWxwaGEuUmVzcG9uc2UuTXVsdGlIZWFkZXJzRW50cnkaLgoMSGVhZGVyc0VudHJ5EgsKA2tleRgBIAEoCRINCgV2YWx1ZRgCIAEoCToCOAEaZwoRTXVsdGlIZWFkZXJzRW50cnkSCwoDa2V5GAEgASgJEkEKBXZhbHVlGAIgASgLMjIuY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuaHR0cC52MWFscGhhLkhlYWRlclZhbHVlczoCOAEymwEKBkNsaWVudBJsCgtTZW5kUmVxdWVzdBItLmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmh0dHAudjFhbHBoYS5SZXF1ZXN0Gi4uY2FwYWJpbGl0aWVzLm5ldHdvcmtpbmcuaHR0cC52MWFscGhhLlJlc3BvbnNlGiOCtRgfCAISGGh0dHAtYWN0aW9uc0AxLjAuMC1hbHBoYSIBAULqAQooY29tLmNhcGFiaWxpdGllcy5uZXR3b3JraW5nLmh0dHAudjFhbHBoYUILQ2xpZW50UHJvdG9QAaICA0NOSKoCJENhcGFiaWxpdGllcy5OZXR3b3JraW5nLkh0dHAuVjFhbHBoYcoCJENhcGFiaWxpdGllc1xOZXR3b3JraW5nXEh0dHBcVjFhbHBoYeICMENhcGFiaWxpdGllc1xOZXR3b3JraW5nXEh0dHBcVjFhbHBoYVxHUEJNZXRhZGF0YeoCJ0NhcGFiaWxpdGllczo6TmV0d29ya2luZzo6SHR0cDo6VjFhbHBoYWIGcHJvdG8z', [file_google_protobuf_duration, file_tools_generator_v1alpha_cre_metadata], ) diff --git a/packages/cre-sdk/src/generated/sdk/v1alpha/sdk_pb.ts b/packages/cre-sdk/src/generated/sdk/v1alpha/sdk_pb.ts index a30feeec..8487b074 100644 --- a/packages/cre-sdk/src/generated/sdk/v1alpha/sdk_pb.ts +++ b/packages/cre-sdk/src/generated/sdk/v1alpha/sdk_pb.ts @@ -16,7 +16,7 @@ import { file_values_v1_values } from '../../values/v1/values_pb' export const file_sdk_v1alpha_sdk: GenFile = /*@__PURE__*/ fileDesc( - 'ChVzZGsvdjFhbHBoYS9zZGsucHJvdG8SC3Nkay52MWFscGhhIrQBChVTaW1wbGVDb25zZW5zdXNJbnB1dHMSIQoFdmFsdWUYASABKAsyEC52YWx1ZXMudjEuVmFsdWVIABIPCgVlcnJvchgCIAEoCUgAEjUKC2Rlc2NyaXB0b3JzGAMgASgLMiAuc2RrLnYxYWxwaGEuQ29uc2Vuc3VzRGVzY3JpcHRvchIhCgdkZWZhdWx0GAQgASgLMhAudmFsdWVzLnYxLlZhbHVlQg0KC29ic2VydmF0aW9uIpABCglGaWVsZHNNYXASMgoGZmllbGRzGAEgAygLMiIuc2RrLnYxYWxwaGEuRmllbGRzTWFwLkZpZWxkc0VudHJ5Gk8KC0ZpZWxkc0VudHJ5EgsKA2tleRgBIAEoCRIvCgV2YWx1ZRgCIAEoCzIgLnNkay52MWFscGhhLkNvbnNlbnN1c0Rlc2NyaXB0b3I6AjgBIoYBChNDb25zZW5zdXNEZXNjcmlwdG9yEjMKC2FnZ3JlZ2F0aW9uGAEgASgOMhwuc2RrLnYxYWxwaGEuQWdncmVnYXRpb25UeXBlSAASLAoKZmllbGRzX21hcBgCIAEoCzIWLnNkay52MWFscGhhLkZpZWxkc01hcEgAQgwKCmRlc2NyaXB0b3IiagoNUmVwb3J0UmVxdWVzdBIXCg9lbmNvZGVkX3BheWxvYWQYASABKAwSFAoMZW5jb2Rlcl9uYW1lGAIgASgJEhQKDHNpZ25pbmdfYWxnbxgDIAEoCRIUCgxoYXNoaW5nX2FsZ28YBCABKAkilwEKDlJlcG9ydFJlc3BvbnNlEhUKDWNvbmZpZ19kaWdlc3QYASABKAwSEgoGc2VxX25yGAIgASgEQgIwABIWCg5yZXBvcnRfY29udGV4dBgDIAEoDBISCgpyYXdfcmVwb3J0G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jZRgCIAEoCRINCgVvd25lchgDIAEoCRINCgVlcnJvchgEIAEoCSJuCg5TZWNyZXRSZXNwb25zZRIlCgZzZWNyZXQYASABKAsyEy5zZGsudjFhbHBoYS5TZWNyZXRIABIpCgVlcnJvchgCIAEoCzIYLnNkay52MWFscGhhLlNlY3JldEVycm9ySABCCgoIcmVzcG9uc2UiQQoPU2VjcmV0UmVzcG9uc2VzEi4KCXJlc3BvbnNlcxgBIAMoCzIbLnNkay52MWFscGhhLlNlY3JldFJlc3BvbnNlKrgBCg9BZ2dyZWdhdGlvblR5cGUSIAocQUdHUkVHQVRJT05fVFlQRV9VTlNQRUNJRklFRBAAEhsKF0FHR1JFR0FUSU9OX1RZUEVfTUVESUFOEAESHgoaQUdHUkVHQVRJT05fVFlQRV9JREVOVElDQUwQAhIiCh5BR0dSRUdBVElPTl9UWVBFX0NPTU1PTl9QUkVGSVgQAxIiCh5BR0dSRUdBVElPTl9UWVBFX0NPTU1PTl9TVUZGSVgQBCo5CgRNb2RlEhQKEE1PREVfVU5TUEVDSUZJRUQQABIMCghNT0RFX0RPThABEg0KCU1PREVfTk9ERRACKjsKB1RlZVR5cGUSGAoUVEVFX1RZUEVfVU5TUEVDSUZJRUQQABIWChJURUVfVFlQRV9BV1NfTklUUk8QAUJoCg9jb20uc2RrLnYxYWxwaGFCCFNka1Byb3RvUAGiAgNTWFiqAgtTZGsuVjFhbHBoYcoCC1Nka1xWMWFscGhh4gIXU2RrXFYxYWxwaGFcR1BCTWV0YWRhdGHqAgxTZGs6OlYxYWxwaGFiBnByb3RvMw', [file_google_protobuf_any, file_google_protobuf_empty, file_values_v1_values], ) @@ -461,6 +461,11 @@ export type TriggerSubscription = Message<'sdk.v1alpha.TriggerSubscription'> & { * @generated from field: string method = 3; */ method: string + + /** + * @generated from field: sdk.v1alpha.Requirements requirements = 4; + */ + requirements?: Requirements } /** @@ -481,6 +486,11 @@ export type TriggerSubscriptionJson = { * @generated from field: string method = 3; */ method?: string + + /** + * @generated from field: sdk.v1alpha.Requirements requirements = 4; + */ + requirements?: RequirementsJson } /** @@ -492,6 +502,45 @@ export const TriggerSubscriptionSchema: GenMessage< { jsonType: TriggerSubscriptionJson } > = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 8) +/** + * @generated from message sdk.v1alpha.TeeTypeAndRegions + */ +export type TeeTypeAndRegions = Message<'sdk.v1alpha.TeeTypeAndRegions'> & { + /** + * @generated from field: sdk.v1alpha.TeeType type = 1; + */ + type: TeeType + + /** + * @generated from field: repeated string regions = 3; + */ + regions: string[] +} + +/** + * @generated from message sdk.v1alpha.TeeTypeAndRegions + */ +export type TeeTypeAndRegionsJson = { + /** + * @generated from field: sdk.v1alpha.TeeType type = 1; + */ + type?: TeeTypeJson + + /** + * @generated from field: repeated string regions = 3; + */ + regions?: string[] +} + +/** + * Describes the message sdk.v1alpha.TeeTypeAndRegions. + * Use `create(TeeTypeAndRegionsSchema)` to create a new message. + */ +export const TeeTypeAndRegionsSchema: GenMessage< + TeeTypeAndRegions, + { jsonType: TeeTypeAndRegionsJson } +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 9) + /** * @generated from message sdk.v1alpha.TriggerSubscriptionRequest */ @@ -519,7 +568,7 @@ export type TriggerSubscriptionRequestJson = { export const TriggerSubscriptionRequestSchema: GenMessage< TriggerSubscriptionRequest, { jsonType: TriggerSubscriptionRequestJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 9) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 10) /** * @generated from message sdk.v1alpha.Trigger @@ -557,7 +606,140 @@ export type TriggerJson = { */ export const TriggerSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 10) + messageDesc(file_sdk_v1alpha_sdk, 11) + +/** + * @generated from message sdk.v1alpha.Regions + */ +export type Regions = Message<'sdk.v1alpha.Regions'> & { + /** + * @generated from field: repeated string regions = 1; + */ + regions: string[] +} + +/** + * @generated from message sdk.v1alpha.Regions + */ +export type RegionsJson = { + /** + * @generated from field: repeated string regions = 1; + */ + regions?: string[] +} + +/** + * Describes the message sdk.v1alpha.Regions. + * Use `create(RegionsSchema)` to create a new message. + */ +export const RegionsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_sdk_v1alpha_sdk, 12) + +/** + * @generated from message sdk.v1alpha.TeeTypesAndRegions + */ +export type TeeTypesAndRegions = Message<'sdk.v1alpha.TeeTypesAndRegions'> & { + /** + * @generated from field: repeated sdk.v1alpha.TeeTypeAndRegions tee_type_and_regions = 1; + */ + teeTypeAndRegions: TeeTypeAndRegions[] +} + +/** + * @generated from message sdk.v1alpha.TeeTypesAndRegions + */ +export type TeeTypesAndRegionsJson = { + /** + * @generated from field: repeated sdk.v1alpha.TeeTypeAndRegions tee_type_and_regions = 1; + */ + teeTypeAndRegions?: TeeTypeAndRegionsJson[] +} + +/** + * Describes the message sdk.v1alpha.TeeTypesAndRegions. + * Use `create(TeeTypesAndRegionsSchema)` to create a new message. + */ +export const TeeTypesAndRegionsSchema: GenMessage< + TeeTypesAndRegions, + { jsonType: TeeTypesAndRegionsJson } +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 13) + +/** + * @generated from message sdk.v1alpha.Tee + */ +export type Tee = Message<'sdk.v1alpha.Tee'> & { + /** + * @generated from oneof sdk.v1alpha.Tee.item + */ + item: + | { + /** + * @generated from field: sdk.v1alpha.Regions any_regions = 1; + */ + value: Regions + case: 'anyRegions' + } + | { + /** + * @generated from field: sdk.v1alpha.TeeTypesAndRegions tee_types_and_regions = 2; + */ + value: TeeTypesAndRegions + case: 'teeTypesAndRegions' + } + | { case: undefined; value?: undefined } +} + +/** + * @generated from message sdk.v1alpha.Tee + */ +export type TeeJson = { + /** + * @generated from field: sdk.v1alpha.Regions any_regions = 1; + */ + anyRegions?: RegionsJson + + /** + * @generated from field: sdk.v1alpha.TeeTypesAndRegions tee_types_and_regions = 2; + */ + teeTypesAndRegions?: TeeTypesAndRegionsJson +} + +/** + * Describes the message sdk.v1alpha.Tee. + * Use `create(TeeSchema)` to create a new message. + */ +export const TeeSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_sdk_v1alpha_sdk, 14) + +/** + * @generated from message sdk.v1alpha.Requirements + */ +export type Requirements = Message<'sdk.v1alpha.Requirements'> & { + /** + * @generated from field: sdk.v1alpha.Tee tee = 1; + */ + tee?: Tee +} + +/** + * @generated from message sdk.v1alpha.Requirements + */ +export type RequirementsJson = { + /** + * @generated from field: sdk.v1alpha.Tee tee = 1; + */ + tee?: TeeJson +} + +/** + * Describes the message sdk.v1alpha.Requirements. + * Use `create(RequirementsSchema)` to create a new message. + */ +export const RequirementsSchema: GenMessage = + /*@__PURE__*/ + messageDesc(file_sdk_v1alpha_sdk, 15) /** * @generated from message sdk.v1alpha.AwaitCapabilitiesRequest @@ -586,7 +768,7 @@ export type AwaitCapabilitiesRequestJson = { export const AwaitCapabilitiesRequestSchema: GenMessage< AwaitCapabilitiesRequest, { jsonType: AwaitCapabilitiesRequestJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 11) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 16) /** * @generated from message sdk.v1alpha.AwaitCapabilitiesResponse @@ -615,7 +797,7 @@ export type AwaitCapabilitiesResponseJson = { export const AwaitCapabilitiesResponseSchema: GenMessage< AwaitCapabilitiesResponse, { jsonType: AwaitCapabilitiesResponseJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 12) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 17) /** * @generated from message sdk.v1alpha.ExecuteRequest @@ -683,7 +865,7 @@ export type ExecuteRequestJson = { */ export const ExecuteRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 13) + messageDesc(file_sdk_v1alpha_sdk, 18) /** * @generated from message sdk.v1alpha.ExecutionResult @@ -743,7 +925,7 @@ export type ExecutionResultJson = { */ export const ExecutionResultSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 14) + messageDesc(file_sdk_v1alpha_sdk, 19) /** * @generated from message sdk.v1alpha.GetSecretsRequest @@ -782,7 +964,7 @@ export type GetSecretsRequestJson = { export const GetSecretsRequestSchema: GenMessage< GetSecretsRequest, { jsonType: GetSecretsRequestJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 15) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 20) /** * @generated from message sdk.v1alpha.AwaitSecretsRequest @@ -811,7 +993,7 @@ export type AwaitSecretsRequestJson = { export const AwaitSecretsRequestSchema: GenMessage< AwaitSecretsRequest, { jsonType: AwaitSecretsRequestJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 16) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 21) /** * @generated from message sdk.v1alpha.AwaitSecretsResponse @@ -840,7 +1022,7 @@ export type AwaitSecretsResponseJson = { export const AwaitSecretsResponseSchema: GenMessage< AwaitSecretsResponse, { jsonType: AwaitSecretsResponseJson } -> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 17) +> = /*@__PURE__*/ messageDesc(file_sdk_v1alpha_sdk, 22) /** * @generated from message sdk.v1alpha.SecretRequest @@ -878,7 +1060,7 @@ export type SecretRequestJson = { */ export const SecretRequestSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 18) + messageDesc(file_sdk_v1alpha_sdk, 23) /** * @generated from message sdk.v1alpha.Secret @@ -936,7 +1118,7 @@ export type SecretJson = { */ export const SecretSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 19) + messageDesc(file_sdk_v1alpha_sdk, 24) /** * @generated from message sdk.v1alpha.SecretError @@ -994,7 +1176,7 @@ export type SecretErrorJson = { */ export const SecretErrorSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 20) + messageDesc(file_sdk_v1alpha_sdk, 25) /** * @generated from message sdk.v1alpha.SecretResponse @@ -1042,7 +1224,7 @@ export type SecretResponseJson = { */ export const SecretResponseSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 21) + messageDesc(file_sdk_v1alpha_sdk, 26) /** * @generated from message sdk.v1alpha.SecretResponses @@ -1070,7 +1252,7 @@ export type SecretResponsesJson = { */ export const SecretResponsesSchema: GenMessage = /*@__PURE__*/ - messageDesc(file_sdk_v1alpha_sdk, 22) + messageDesc(file_sdk_v1alpha_sdk, 27) /** * @generated from enum sdk.v1alpha.AggregationType @@ -1148,3 +1330,30 @@ export type ModeJson = 'MODE_UNSPECIFIED' | 'MODE_DON' | 'MODE_NODE' * Describes the enum sdk.v1alpha.Mode. */ export const ModeSchema: GenEnum = /*@__PURE__*/ enumDesc(file_sdk_v1alpha_sdk, 1) + +/** + * @generated from enum sdk.v1alpha.TeeType + */ +export enum TeeType { + /** + * @generated from enum value: TEE_TYPE_UNSPECIFIED = 0; + */ + UNSPECIFIED = 0, + + /** + * @generated from enum value: TEE_TYPE_AWS_NITRO = 1; + */ + AWS_NITRO = 1, +} + +/** + * @generated from enum sdk.v1alpha.TeeType + */ +export type TeeTypeJson = 'TEE_TYPE_UNSPECIFIED' | 'TEE_TYPE_AWS_NITRO' + +/** + * Describes the enum sdk.v1alpha.TeeType. + */ +export const TeeTypeSchema: GenEnum = + /*@__PURE__*/ + enumDesc(file_sdk_v1alpha_sdk, 2) diff --git a/packages/cre-sdk/src/generated/tools/generator/v1alpha/cre_metadata_pb.ts b/packages/cre-sdk/src/generated/tools/generator/v1alpha/cre_metadata_pb.ts index dfafc07f..c6bcd735 100644 --- a/packages/cre-sdk/src/generated/tools/generator/v1alpha/cre_metadata_pb.ts +++ b/packages/cre-sdk/src/generated/tools/generator/v1alpha/cre_metadata_pb.ts @@ -3,8 +3,8 @@ /* eslint-disable */ import type { Message } from '@bufbuild/protobuf' -import type { GenExtension, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2' -import { extDesc, fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv2' +import type { GenEnum, GenExtension, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2' +import { enumDesc, extDesc, fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv2' import type { MethodOptions, ServiceOptions } from '@bufbuild/protobuf/wkt' import { file_google_protobuf_descriptor } from '@bufbuild/protobuf/wkt' import type { Mode, ModeJson } from '../../../sdk/v1alpha/sdk_pb' @@ -16,7 +16,7 @@ import { file_sdk_v1alpha_sdk } from '../../../sdk/v1alpha/sdk_pb' export const file_tools_generator_v1alpha_cre_metadata: GenFile = /*@__PURE__*/ fileDesc( - 'Cip0b29scy9nZW5lcmF0b3IvdjFhbHBoYS9jcmVfbWV0YWRhdGEucHJvdG8SF3Rvb2xzLmdlbmVyYXRvci52MWFscGhhIoQBCgtTdHJpbmdMYWJlbBJECghkZWZhdWx0cxgBIAMoCzIyLnRvb2xzLmdlbmVyYXRvci52MWFscGhhLlN0cmluZ0xhYmVsLkRlZmF1bHRzRW50cnkaLwoNRGVmYXVsdHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIogBCgtVaW50NjRMYWJlbBJECghkZWZhdWx0cxgBIAMoCzIyLnRvb2xzLmdlbmVyYXRvci52MWFscGhhLlVpbnQ2NExhYmVsLkRlZmF1bHRzRW50cnkaMwoNRGVmYXVsdHNFbnRyeRILCgNrZXkYASABKAkSEQoFdmFsdWUYAiABKARCAjAAOgI4ASKEAQoLVWludDMyTGFiZWwSRAoIZGVmYXVsdHMYASADKAsyMi50b29scy5nZW5lcmF0b3IudjFhbHBoYS5VaW50MzJMYWJlbC5EZWZhdWx0c0VudHJ5Gi8KDURlZmF1bHRzRW50cnkSCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgNOgI4ASKGAQoKSW50NjRMYWJlbBJDCghkZWZhdWx0cxgBIAMoCzIxLnRvb2x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_sdk], ) @@ -262,6 +262,11 @@ export type CapabilityMetadata = Message<'tools.generator.v1alpha.CapabilityMeta * @generated from field: map labels = 3; */ labels: { [key: string]: Label } + + /** + * @generated from field: repeated tools.generator.v1alpha.AdditionalEnironments additional_environments = 4; + */ + additionalEnvironments: AdditionalEnironments[] } /** @@ -282,6 +287,11 @@ export type CapabilityMetadataJson = { * @generated from field: map labels = 3; */ labels?: { [key: string]: LabelJson } + + /** + * @generated from field: repeated tools.generator.v1alpha.AdditionalEnironments additional_environments = 4; + */ + additionalEnvironments?: AdditionalEnironmentsJson[] } /** @@ -323,6 +333,36 @@ export const CapabilityMethodMetadataSchema: GenMessage< { jsonType: CapabilityMethodMetadataJson } > = /*@__PURE__*/ messageDesc(file_tools_generator_v1alpha_cre_metadata, 7) +/** + * @generated from enum tools.generator.v1alpha.AdditionalEnironments + */ +export enum AdditionalEnironments { + /** + * @generated from enum value: ADDITIONAL_ENVIRONMENTS_UNSPECIFIED = 0; + */ + ADDITIONAL_ENVIRONMENTS_UNSPECIFIED = 0, + + /** + * @generated from enum value: ADDITIONAL_ENVIRONMENTS_TEE = 1; + */ + ADDITIONAL_ENVIRONMENTS_TEE = 1, +} + +/** + * @generated from enum tools.generator.v1alpha.AdditionalEnironments + */ +export type AdditionalEnironmentsJson = + | 'ADDITIONAL_ENVIRONMENTS_UNSPECIFIED' + | 'ADDITIONAL_ENVIRONMENTS_TEE' + +/** + * Describes the enum tools.generator.v1alpha.AdditionalEnironments. + */ +export const AdditionalEnironmentsSchema: GenEnum< + AdditionalEnironments, + AdditionalEnironmentsJson +> = /*@__PURE__*/ enumDesc(file_tools_generator_v1alpha_cre_metadata, 0) + /** * 50000-99999 is the range for custom options. * diff --git a/packages/cre-sdk/src/generator/generate-action.ts b/packages/cre-sdk/src/generator/generate-action.ts index 1915f6c5..6fbe2f00 100644 --- a/packages/cre-sdk/src/generator/generate-action.ts +++ b/packages/cre-sdk/src/generator/generate-action.ts @@ -17,6 +17,7 @@ export function generateActionMethod( capabilityClassName: string, labels: ProcessedLabel[], modePrefix: string, + teeEnabled: boolean, ): string { const capabilityIdLogic = generateCapabilityIdLogic(labels, capabilityClassName) @@ -40,7 +41,21 @@ export function generateActionMethod( ? 'Report' : method.output.name - const callSig = `(runtime: ${modePrefix}Runtime, input: ${inputTypes.join(' | ')}): {result: () => ${outputType}}` + const basicSig = `(runtime: ${modePrefix}Runtime, input: ${inputTypes.join(' | ')}): {result: () => ${outputType}}` + + const callSig = teeEnabled + ? basicSig.replace( + `${modePrefix}Runtime`, + `${modePrefix}Runtime | TeeRuntime`, + ) + : basicSig + + const teeSig = basicSig.replace(`${modePrefix}Runtime`, `TeeRuntime`) + + var nameAndPublicSigs = teeEnabled + ? `${methodName}${teeSig}\n${methodName}${basicSig};\n${methodName}${callSig};` + : `${methodName}${callSig};` + const callSigAndBody = `${callSig} { // Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed let payload: ${method.input.name} @@ -104,7 +119,7 @@ export function generateActionMethod( : UnwrapOptions, ): (...args: TArgs) => { result: () => TOutput }` return ` - ${methodName}${callSig} + ${nameAndPublicSigs} ${methodName}${sugarSig} ${methodName}(...args: unknown[]): unknown { // Check if this is the sugar syntax overload (has function parameter) @@ -113,7 +128,7 @@ export function generateActionMethod( return this.${methodName}SugarHelper(runtime, fn, consensusAggregation, unwrapOptions) } // Otherwise, this is the basic call overload - const [runtime, input] = args as [${modePrefix}Runtime, ${inputTypes.join(' | ')}] + const [runtime, input] = args as [${teeEnabled ? `${modePrefix}Runtime | TeeRuntime` : `${modePrefix}Runtime`}, ${inputTypes.join(' | ')}] return this.${methodName}CallHelper(runtime, input) } private ${methodName}CallHelper${callSigAndBody} @@ -125,6 +140,11 @@ export function generateActionMethod( return runtime.runInNodeMode(wrappedFn, consensusAggregation, unwrapOptions) }` } + + // For DON mode: emit tee + basic overload declarations, then the implementation with its name. + // nameAndPublicSigs is designed for Node mode's dispatcher pattern and must not be reused here. + const donOverloads = teeEnabled ? `${methodName}${teeSig}\n ${methodName}${basicSig}\n ` : '' + return ` - ${methodName}${callSigAndBody}` + ${donOverloads}${methodName}${callSigAndBody}` } diff --git a/packages/cre-sdk/src/generator/generate-sdk.ts b/packages/cre-sdk/src/generator/generate-sdk.ts index 196d7f0e..906287ab 100644 --- a/packages/cre-sdk/src/generator/generate-sdk.ts +++ b/packages/cre-sdk/src/generator/generate-sdk.ts @@ -5,6 +5,7 @@ import type { GenFile } from '@bufbuild/protobuf/codegenv2' import { Mode } from '@cre/generated/sdk/v1alpha/sdk_pb' import type { CapabilityMetadata } from '@cre/generated/tools/generator/v1alpha/cre_metadata_pb' import { + AdditionalEnironments, capability, method as methodOption, } from '@cre/generated/tools/generator/v1alpha/cre_metadata_pb' @@ -12,12 +13,7 @@ import { generateActionMethod } from './generate-action' import { generateReportWrapper } from './generate-report-wrapper' import { generateActionSugarClass } from './generate-sugar' import { generateTriggerClass, generateTriggerMethod } from './generate-trigger' -import { - generateCapabilityIdLogic, - generateConstructorParams, - generateLabelSupport, - processLabels, -} from './label-utils' +import { generateConstructorParams, generateLabelSupport, processLabels } from './label-utils' import { getImportPathForFile, lowerCaseFirstLetter } from './utils' const getCapabilityServiceOptions = (service: DescService): CapabilityMetadata | false => { @@ -96,6 +92,9 @@ export function generateSdk(file: GenFile, outputDir: string) { }) const modePrefix = capOption.mode === Mode.NODE ? 'Node' : '' + const teeEnabled = capOption.additionalEnvironments.includes( + AdditionalEnironments.ADDITIONAL_ENVIRONMENTS_TEE, + ) // Build import statements // Note: protobuf imports are deferred until after report wrappers are processed, @@ -110,10 +109,12 @@ export function generateSdk(file: GenFile, outputDir: string) { if (hasActions) { if (modePrefix !== '') { - imports.add(`import type { Runtime, ${modePrefix}Runtime } from "@cre/sdk"`) + imports.add( + `import type { Runtime, ${modePrefix}Runtime${teeEnabled ? ', TeeRuntime' : ''} } from "@cre/sdk"`, + ) imports.add(`import { Report } from "@cre/sdk/report"`) } else { - imports.add(`import type { Runtime } from "@cre/sdk"`) + imports.add(`import type { Runtime ${teeEnabled ? ', TeeRuntime' : ''} } from "@cre/sdk"`) imports.add(`import { Report } from "@cre/sdk/report"`) imports.add(`import { hexToBytes } from "@cre/sdk/utils/hex-utils";`) } @@ -222,7 +223,14 @@ export function generateSdk(file: GenFile, outputDir: string) { } // Generate action method - return generateActionMethod(method, methodName, capabilityClassName, labels, modePrefix) + return generateActionMethod( + method, + methodName, + capabilityClassName, + labels, + modePrefix, + teeEnabled, + ) }) .join('\n') diff --git a/packages/cre-sdk/src/sdk/cre/index.ts b/packages/cre-sdk/src/sdk/cre/index.ts index 270e8ede..217f29c7 100644 --- a/packages/cre-sdk/src/sdk/cre/index.ts +++ b/packages/cre-sdk/src/sdk/cre/index.ts @@ -8,7 +8,7 @@ import { ClientCapability as HTTPClient } from '@cre/generated-sdk/capabilities/ import { HTTPCapability } from '@cre/generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen' import { CronCapability } from '@cre/generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen' import { prepareRuntime } from '@cre/sdk/utils/prepare-runtime' -import { handler } from '@cre/sdk/workflow' +import { handler, handlerInTee } from '@cre/sdk/workflow' /** * Public exports for the CRE SDK. @@ -20,7 +20,17 @@ export { } from '@cre/generated/capabilities/blockchain/evm/v1alpha/client_pb' export type { Payload as HTTPPayload } from '@cre/generated/capabilities/networking/http/v1alpha/trigger_pb' export type { Payload as CronPayload } from '@cre/generated/capabilities/scheduler/cron/v1/trigger_pb' - +export { TeeType } from '@cre/generated/sdk/v1alpha/sdk_pb' +export type { + Region, + NitroRegion, + TeeConstraint, + AnyTeeConstraint, + OneOfTees, + TeeBinding, + NitroBinding, +} from '@cre/sdk/workflow' +export { REGIONS, NITRO_REGIONS } from '@cre/sdk/workflow' // EVM Capability export { ClientCapability as EVMClient, @@ -35,13 +45,11 @@ export { type SendRequester as HTTPSendRequester, } from '@cre/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen' export { HTTPCapability } from '@cre/generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen' - // CRON Capability export { CronCapability } from '@cre/generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen' - // Runtime -export type { NodeRuntime, Runtime } from '@cre/sdk/runtime' -export { handler } from '@cre/sdk/workflow' +export type { NodeRuntime, Runtime, TeeRuntime } from '@cre/sdk/runtime' +export { handler, handlerInTee } from '@cre/sdk/workflow' prepareRuntime() @@ -54,4 +62,5 @@ export const cre = { EVMClient, }, handler, + handlerInTee, } diff --git a/packages/cre-sdk/src/sdk/impl/runtime-impl.test.ts b/packages/cre-sdk/src/sdk/impl/runtime-impl.test.ts index c5081e40..aad7e657 100644 --- a/packages/cre-sdk/src/sdk/impl/runtime-impl.test.ts +++ b/packages/cre-sdk/src/sdk/impl/runtime-impl.test.ts @@ -6,7 +6,9 @@ import { OutputSchema, } from '@cre/generated/capabilities/internal/actionandtrigger/v1/action_and_trigger_pb' import { + type Inputs, InputsSchema, + type Outputs, OutputsSchema, } from '@cre/generated/capabilities/internal/basicaction/v1/basic_action_pb' import { @@ -26,6 +28,8 @@ import { ConsensusDescriptorSchema, FieldsMapSchema, Mode, + ReportRequestSchema, + ReportResponseSchema, SecretRequestSchema, SecretResponseSchema, SecretResponsesSchema, @@ -38,6 +42,7 @@ import { BasicActionCapability } from '@cre/generated-sdk/capabilities/internal/ import { ConsensusCapability } from '@cre/generated-sdk/capabilities/internal/consensus/v1alpha/consensus_sdk_gen' import { BasicActionCapability as NodeActionCapability } from '@cre/generated-sdk/capabilities/internal/nodeaction/v1/basicaction_sdk_gen' import type { NodeRuntime, Runtime } from '@cre/sdk/cre' +import { Report } from '@cre/sdk/report' import { ConsensusAggregationByFields, ConsensusFieldAggregation, @@ -50,7 +55,7 @@ import { import { CapabilityError } from '@cre/sdk/utils/capabilities/capability-error' import { DonModeError, NodeModeError, SecretsError } from '../errors' import { RESPONSE_BUFFER_TOO_SMALL } from '../testutils/test-runtime' -import { type RuntimeHelpers, RuntimeImpl } from './runtime-impl' +import { type RuntimeHelpers, RuntimeImpl, TeeRuntimeImpl } from './runtime-impl' // Helper function to create a RuntimeHelpers mock with error-throwing defaults function createRuntimeHelpersMock(overrides: Partial = {}): RuntimeHelpers { @@ -84,6 +89,7 @@ const anyMaxSize = 1024n * 1024n // Store original prototypes for manual restoration const originalConsensusSimple = ConsensusCapability.prototype.simple +const originalConsensusReport = ConsensusCapability.prototype.report const originalNodeActionPerformAction = NodeActionCapability.prototype.performAction afterEach(() => { @@ -91,6 +97,7 @@ afterEach(() => { mock.restore() // Manually restore prototype methods ConsensusCapability.prototype.simple = originalConsensusSimple + ConsensusCapability.prototype.report = originalConsensusReport NodeActionCapability.prototype.performAction = originalNodeActionPerformAction }) @@ -1094,3 +1101,177 @@ describe('test run in node mode', () => { expect(result2.nested.nestedIgnored).toBeUndefined() }) }) + +describe('TeeRuntimeImpl', () => { + test('now delegates to RuntimeImpl.now', () => { + const fixedTime = 1716153600000 + + const runtimeHelpers = createRuntimeHelpersMock({ now: mock(() => fixedTime) }) + const teeHelpers = createRuntimeHelpersMock({ now: mock(() => fixedTime) }) + + const runtimeImpl = new RuntimeImpl({}, 1, runtimeHelpers, anyMaxSize) + const teeRuntime = new TeeRuntimeImpl({}, 1, teeHelpers, anyMaxSize) + + expect(teeRuntime.now()).toEqual(runtimeImpl.now()) + }) + + test('log delegates to RuntimeImpl.log', () => { + const runtimeLogs: string[] = [] + const teeLogs: string[] = [] + const message = 'test message' + + const runtimeHelpers = createRuntimeHelpersMock({ + log: mock((msg: string) => runtimeLogs.push(msg)), + }) + const teeHelpers = createRuntimeHelpersMock({ log: mock((msg: string) => teeLogs.push(msg)) }) + + new RuntimeImpl({}, 1, runtimeHelpers, anyMaxSize).log(message) + new TeeRuntimeImpl({}, 1, teeHelpers, anyMaxSize).log(message) + + expect(teeLogs).toEqual(runtimeLogs) + }) + + test('callCapability delegates to RuntimeImpl.callCapability', () => { + const expectedOutput = 'test-output' + const input = create(InputsSchema, { inputThing: true }) + const callCapabilityParams = { + capabilityId: BasicActionCapability.CAPABILITY_ID, + method: 'PerformAction', + payload: input, + inputSchema: InputsSchema, + outputSchema: OutputsSchema, + } + + function makeHelpers() { + return createRuntimeHelpersMock({ + call: mock((_: CapabilityRequest) => true), + await: mock((request: AwaitCapabilitiesRequest) => { + const id = request.ids[0] + return create(AwaitCapabilitiesResponseSchema, { + responses: { + [id]: create(CapabilityResponseSchema, { + response: { + case: 'payload', + value: anyPack( + OutputsSchema, + create(OutputsSchema, { adaptedThing: expectedOutput }), + ), + }, + }), + }, + }) + }), + }) + } + + const runtimeImpl = new RuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const expectedResult = runtimeImpl + .callCapability(callCapabilityParams) + .result() + + const teeRuntime = new TeeRuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const actualResult = teeRuntime.callCapability(callCapabilityParams).result() + + expect(actualResult).toEqual(expectedResult) + }) + + test('getSecret delegates to RuntimeImpl.getSecret', () => { + const secretValue = { + id: 'my-secret', + namespace: 'test-ns', + owner: 'owner', + value: 'secret123', + } + const secretRequest = create(SecretRequestSchema, { id: 'my-secret', namespace: 'test-ns' }) + + function makeHelpers() { + return createRuntimeHelpersMock({ + getSecrets: mock(() => true), + awaitSecrets: mock((request) => { + const id = request.ids[0] + return create(AwaitSecretsResponseSchema, { + responses: { + [id]: create(SecretResponsesSchema, { + responses: [ + create(SecretResponseSchema, { + response: { case: 'secret', value: secretValue }, + }), + ], + }), + }, + }) + }), + }) + } + + const runtimeImpl = new RuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const expectedResult = runtimeImpl.getSecret(secretRequest).result() + + const teeRuntime = new TeeRuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const actualResult = teeRuntime.getSecret(secretRequest).result() + + expect(actualResult).toEqual(expectedResult) + }) + + test('reportFromDon delegates to RuntimeImpl.report', () => { + const fakeReport = new Report( + create(ReportResponseSchema, { + configDigest: new Uint8Array(0), + seqNr: 0n, + reportContext: new Uint8Array(0), + rawReport: new Uint8Array([1, 2, 3]), + sigs: [], + }), + ) + + // biome-ignore lint/suspicious/noExplicitAny: Mock assignment requires any + ;(ConsensusCapability.prototype as any).report = mock(() => ({ result: () => fakeReport })) + + const reportInput = create(ReportRequestSchema, { encodedPayload: new Uint8Array([1, 2, 3]) }) + + const runtimeImpl = new RuntimeImpl({}, 1, createRuntimeHelpersMock(), anyMaxSize) + const expectedResult = runtimeImpl.report(reportInput).result() + + const teeRuntime = new TeeRuntimeImpl({}, 1, createRuntimeHelpersMock(), anyMaxSize) + const actualResult = teeRuntime.reportFromDon(reportInput).result() + + expect(actualResult).toEqual(expectedResult) + }) + + test('usingTheDons delegates to RuntimeImpl', () => { + const expectedOutput = 'result-from-dons' + const input = create(InputsSchema, { inputThing: true }) + + function makeHelpers() { + return createRuntimeHelpersMock({ + call: mock((_: CapabilityRequest) => true), + await: mock((request: AwaitCapabilitiesRequest) => { + const id = request.ids[0] + return create(AwaitCapabilitiesResponseSchema, { + responses: { + [id]: create(CapabilityResponseSchema, { + response: { + case: 'payload', + value: anyPack( + OutputsSchema, + create(OutputsSchema, { adaptedThing: expectedOutput }), + ), + }, + }), + }, + }) + }), + }) + } + + const runtimeImpl = new RuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const expectedResult = new BasicActionCapability().performAction(runtimeImpl, input).result() + + const teeRuntime = new TeeRuntimeImpl({}, 1, makeHelpers(), anyMaxSize) + const actualResult = new BasicActionCapability() + .performAction(teeRuntime.usingTheDons(), input) + .result() + + expect(actualResult).toEqual(expectedResult) + }) +}) diff --git a/packages/cre-sdk/src/sdk/impl/runtime-impl.ts b/packages/cre-sdk/src/sdk/impl/runtime-impl.ts index 861e91cd..fe638f22 100644 --- a/packages/cre-sdk/src/sdk/impl/runtime-impl.ts +++ b/packages/cre-sdk/src/sdk/impl/runtime-impl.ts @@ -29,6 +29,7 @@ import type { ReportRequest, ReportRequestJson, Runtime, + TeeRuntime, } from '@cre/sdk' import type { Report } from '@cre/sdk/report' import { @@ -426,6 +427,54 @@ export class RuntimeImpl extends BaseRuntimeImpl implements Runtime { } } +export class TeeRuntimeImpl implements TeeRuntime { + private readonly runtime: RuntimeImpl + constructor( + public config: C, + public nextCallId: number, + helpers: RuntimeHelpers, + maxResponseSize: bigint, + ) { + this.runtime = new RuntimeImpl(config, nextCallId, helpers, maxResponseSize) + } + getSecret(request: SecretRequest | SecretRequestJson): { result: () => Secret } { + return this.runtime.getSecret(request) + } + now(): Date { + return this.runtime.now() + } + + log(message: string): void { + this.runtime.log(message) + } + + callCapability({ + capabilityId, + method, + payload, + inputSchema, + outputSchema, + }: CallCapabilityParams): { result: () => O } { + return this.runtime.callCapability({ + capabilityId, + method, + payload, + inputSchema, + outputSchema, + }) + } + + reportFromDon(input: ReportRequest | ReportRequestJson): { + result: () => Report + } { + return this.runtime.report(input) + } + + usingTheDons(): Runtime { + return this.runtime + } +} + /** * Interface to the WASM host environment. * Provides low-level access to capabilities, secrets, and utilities. diff --git a/packages/cre-sdk/src/sdk/runtime.ts b/packages/cre-sdk/src/sdk/runtime.ts index fd1c3be5..d3334412 100644 --- a/packages/cre-sdk/src/sdk/runtime.ts +++ b/packages/cre-sdk/src/sdk/runtime.ts @@ -39,6 +39,28 @@ export interface NodeRuntime extends BaseRuntime { readonly _isNodeRuntime: true } +/** + * Runtime for Tee mode execution. + */ +export interface TeeRuntime extends BaseRuntime, SecretsProvider { + /** + * Generates a report from the DON. + * Data requestsed throught this method will be routed outside of the TEE. + * + * @param input - Report request to generate a report from the DON + * @returns Report generated from the DON + */ + reportFromDon(input: ReportRequest | ReportRequestJson): { + result: () => Report + } + + /** + * Returns the runtime that makes requests to the CRE DONs. + * Requests made through this runtime will therefore be routed outside of the TEE + */ + usingTheDons(): Runtime +} + /** * Runtime for DON mode execution. */ diff --git a/packages/cre-sdk/src/sdk/tee-constraints.test.ts b/packages/cre-sdk/src/sdk/tee-constraints.test.ts new file mode 100644 index 00000000..96ca792a --- /dev/null +++ b/packages/cre-sdk/src/sdk/tee-constraints.test.ts @@ -0,0 +1,138 @@ +import { describe, expect, test } from 'bun:test' +import { create, toBinary } from '@bufbuild/protobuf' +import { + RegionsSchema, + RequirementsSchema, + TeeSchema, + TeeType, + TeeTypesAndRegionsSchema, +} from '@cre/generated/sdk/v1alpha/sdk_pb' +import { ZodError } from 'zod' +import { buildTeeRequirements, teeConstraintSchema } from './tee-constraints' +import type { TeeConstraint } from './tee-constraints' + +describe('teeConstraintSchema', () => { + test('accepts empty object (any tee)', () => { + expect(teeConstraintSchema.parse({})).toEqual({}) + }) + + test('accepts object with valid regions (any tee in regions)', () => { + expect(teeConstraintSchema.parse({ regions: ['us-west-2'] })).toEqual({ + regions: ['us-west-2'], + }) + }) + + test('accepts nitro binding with regions', () => { + expect(teeConstraintSchema.parse([{ tee: 'nitro', regions: ['us-west-2'] }])).toEqual([ + { tee: 'nitro', regions: ['us-west-2'] }, + ]) + }) + + test('accepts nitro binding without regions', () => { + expect(teeConstraintSchema.parse([{ tee: 'nitro' }])).toEqual([{ tee: 'nitro' }]) + }) + + test('rejects unknown region in anyTee form', () => { + expect(() => teeConstraintSchema.parse({ regions: ['mars-central-1'] })).toThrow(ZodError) + }) + + test('rejects unknown region in nitro binding', () => { + expect(() => + teeConstraintSchema.parse([{ tee: 'nitro', regions: ['eu-central-1'] }]), + ).toThrow(ZodError) + }) + + test('rejects unknown tee type', () => { + expect(() => teeConstraintSchema.parse([{ tee: 'sgx' }])).toThrow(ZodError) + }) + + test('rejects empty array', () => { + expect(() => teeConstraintSchema.parse([])).toThrow(ZodError) + }) + + test('rejects empty regions array in anyTee', () => { + expect(() => teeConstraintSchema.parse({ regions: [] })).toThrow(ZodError) + }) + + test('rejects empty regions array in nitro binding', () => { + expect(() => teeConstraintSchema.parse([{ tee: 'nitro', regions: [] }])).toThrow(ZodError) + }) + + test('rejects unknown fields in anyTee', () => { + expect(() => teeConstraintSchema.parse({ foo: 1 })).toThrow(ZodError) + }) + + test('rejects unknown fields in nitro binding', () => { + expect(() => teeConstraintSchema.parse([{ tee: 'nitro', extra: 1 }])).toThrow(ZodError) + }) + + test('rejects null', () => { + expect(() => teeConstraintSchema.parse(null)).toThrow(ZodError) + }) + + test('rejects bare string', () => { + expect(() => teeConstraintSchema.parse('any')).toThrow(ZodError) + }) +}) + +describe('buildTeeRequirements', () => { + test('anyTee produces anyRegions with empty regions', () => { + const result = buildTeeRequirements({}) + const expected = create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'anyRegions', + value: create(RegionsSchema, { regions: [] }), + }, + }), + }) + expect(toBinary(RequirementsSchema, result)).toEqual(toBinary(RequirementsSchema, expected)) + }) + + test('anyTeeInRegions produces anyRegions with specified regions', () => { + const result = buildTeeRequirements({ regions: ['us-west-2'] }) + const expected = create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'anyRegions', + value: create(RegionsSchema, { regions: ['us-west-2'] }), + }, + }), + }) + expect(toBinary(RequirementsSchema, result)).toEqual(toBinary(RequirementsSchema, expected)) + }) + + test('oneOfTees nitro with regions produces teeTypesAndRegions', () => { + const result = buildTeeRequirements([{ tee: 'nitro', regions: ['us-west-2'] }]) + const expected = create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'teeTypesAndRegions', + value: create(TeeTypesAndRegionsSchema, { + teeTypeAndRegions: [{ type: TeeType.AWS_NITRO, regions: ['us-west-2'] }], + }), + }, + }), + }) + expect(toBinary(RequirementsSchema, result)).toEqual(toBinary(RequirementsSchema, expected)) + }) + + test('oneOfTees nitro without regions produces teeTypesAndRegions with empty regions', () => { + const result = buildTeeRequirements([{ tee: 'nitro' }]) + const expected = create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'teeTypesAndRegions', + value: create(TeeTypesAndRegionsSchema, { + teeTypeAndRegions: [{ type: TeeType.AWS_NITRO, regions: [] }], + }), + }, + }), + }) + expect(toBinary(RequirementsSchema, result)).toEqual(toBinary(RequirementsSchema, expected)) + }) + + test('throws on invalid input', () => { + expect(() => buildTeeRequirements('bad' as unknown as TeeConstraint)).toThrow(ZodError) + }) +}) diff --git a/packages/cre-sdk/src/sdk/tee-constraints.ts b/packages/cre-sdk/src/sdk/tee-constraints.ts new file mode 100644 index 00000000..6d64fc5c --- /dev/null +++ b/packages/cre-sdk/src/sdk/tee-constraints.ts @@ -0,0 +1,91 @@ +import { create } from '@bufbuild/protobuf' +import type { Requirements } from '@cre/generated/sdk/v1alpha/sdk_pb' +import { + RegionsSchema, + RequirementsSchema, + TeeSchema, + TeeType, + TeeTypesAndRegionsSchema, +} from '@cre/generated/sdk/v1alpha/sdk_pb' +import { z } from 'zod' + +// --- Region schemas (source of truth) --- + +export const REGIONS = ['us-west-2'] as const +export const NITRO_REGIONS = ['us-west-2'] as const + +const regionSchema = z.enum(REGIONS, { + message: `unknown region; expected one of: ${REGIONS.join(', ')}`, +}) + +const nitroRegionSchema = z.enum(NITRO_REGIONS, { + message: `aws nitro does not support this region; expected one of: ${NITRO_REGIONS.join(', ')}`, +}) + +// --- TeeConstraint schemas (types inferred from these) --- + +const nitroBindingSchema = z + .object({ + tee: z.literal('nitro'), + regions: z.array(nitroRegionSchema).nonempty().optional(), + }) + .strict() + +const teeBindingSchema = z.discriminatedUnion('tee', [nitroBindingSchema]) + +const oneOfTeesSchema = z.array(teeBindingSchema).nonempty() + +const anyTeeConstraintSchema = z + .object({ + regions: z.array(regionSchema).nonempty().optional(), + }) + .strict() + +export const teeConstraintSchema = z.union([oneOfTeesSchema, anyTeeConstraintSchema]) + +// --- Inferred types --- + +export type Region = z.infer +export type NitroRegion = z.infer +export type NitroBinding = z.infer +export type TeeBinding = z.infer +export type OneOfTees = z.infer +export type AnyTeeConstraint = z.infer +export type TeeConstraint = z.infer + +// --- Conversion to protobuf Requirements --- + +export function buildTeeRequirements(input: TeeConstraint): Requirements { + const parsed = teeConstraintSchema.parse(input) + + if (Array.isArray(parsed)) { + const teeTypes = parsed.map((binding) => ({ + type: teeTypeFromBinding(binding), + regions: binding.regions ?? [], + })) + return create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'teeTypesAndRegions', + value: create(TeeTypesAndRegionsSchema, { teeTypeAndRegions: teeTypes }), + }, + }), + }) + } + + return create(RequirementsSchema, { + tee: create(TeeSchema, { + item: { + case: 'anyRegions', + value: create(RegionsSchema, { regions: parsed.regions ?? [] }), + }, + }), + }) +} + +function teeTypeFromBinding(binding: TeeBinding): TeeType { + switch (binding.tee) { + case 'nitro': + return TeeType.AWS_NITRO + } +} diff --git a/packages/cre-sdk/src/sdk/testutils/index.ts b/packages/cre-sdk/src/sdk/testutils/index.ts index 9d2d280f..22287c97 100644 --- a/packages/cre-sdk/src/sdk/testutils/index.ts +++ b/packages/cre-sdk/src/sdk/testutils/index.ts @@ -15,6 +15,7 @@ export { type Secrets, TestRuntime, type TestRuntimeState, + TestTeeRuntime, test, } from './test-runtime' export { TestWriter } from './test-writer' diff --git a/packages/cre-sdk/src/sdk/testutils/test-runtime.ts b/packages/cre-sdk/src/sdk/testutils/test-runtime.ts index 01844874..aef55900 100644 --- a/packages/cre-sdk/src/sdk/testutils/test-runtime.ts +++ b/packages/cre-sdk/src/sdk/testutils/test-runtime.ts @@ -36,7 +36,7 @@ import { import type { Value as ProtoValue } from '@cre/generated/values/v1/values_pb' import { ValueSchema } from '@cre/generated/values/v1/values_pb' import type { RuntimeHelpers } from '../impl/runtime-impl' -import { RuntimeImpl } from '../impl/runtime-impl' +import { RuntimeImpl, TeeRuntimeImpl } from '../impl/runtime-impl' import { TestWriter } from './test-writer' /** Error message when response exceeds max size. Used by the harness when its await implements the size check. */ @@ -337,10 +337,11 @@ export function test(title: string, fn: () => void | Promise): void { /** * Creates a test runtime. This must be called from within a test in this package. */ -export function newTestRuntime( +export function newTestRuntime( secrets?: Secrets | null, options: NewTestRuntimeOptions = {}, -): TestRuntime { + config: T | undefined = undefined, +): TestRuntime { const secretsMap = secrets ?? new Map>() const testWriter = new TestWriter() const registry = registryStorage.getStore() ?? new Registry() @@ -378,21 +379,46 @@ export function newTestRuntime( const maxResponseSize = BigInt(options.maxResponseSize ?? DEFAULT_MAX_RESPONSE_SIZE_BYTES) const helpers = createTestRuntimeHelpers(registry, secretsMap, testWriter, state, maxResponseSize) - return new TestRuntime(helpers, maxResponseSize, testWriter, state) + return new TestRuntime(helpers, maxResponseSize, testWriter, state, config) } /** * TestRuntime is a Runtime implementation for unit tests. Extends RuntimeImpl; construct via newTestRuntime. * Adds getLogs() and setTimeProvider(). Registry is accessed via getTestCapabilityHandler when inside testWithRuntime. */ -export class TestRuntime extends RuntimeImpl { +export class TestRuntime extends RuntimeImpl { constructor( helpers: RuntimeHelpers, maxResponseSize: bigint, private readonly testWriter: TestWriter, private readonly state: TestRuntimeState, + config: T | undefined = undefined, ) { - super({}, 0, helpers, maxResponseSize) + super(config ?? ({} as T), 0, helpers, maxResponseSize) + } + + getLogs(): string[] { + return this.testWriter.getLogs() + } + + setTimeProvider(timeProvider: () => number): void { + this.state.timeProvider = timeProvider + } +} + +/** + * TestTeeRuntime is a TeeRuntime implementation for unit tests. Extends TeeRuntimeImpl; construct via newTestTEERuntime. + * Adds getLogs() and setTimeProvider(). Registry is accessed via getTestCapabilityHandler when inside testWithRuntime. + */ +export class TestTeeRuntime extends TeeRuntimeImpl { + constructor( + helpers: RuntimeHelpers, + maxResponseSize: bigint, + private readonly testWriter: TestWriter, + private readonly state: TestRuntimeState, + config: T, + ) { + super(config, 0, helpers, maxResponseSize) } getLogs(): string[] { diff --git a/packages/cre-sdk/src/sdk/wasm/runner.test.ts b/packages/cre-sdk/src/sdk/wasm/runner.test.ts index 7359b2dc..7b43c8b7 100644 --- a/packages/cre-sdk/src/sdk/wasm/runner.test.ts +++ b/packages/cre-sdk/src/sdk/wasm/runner.test.ts @@ -13,9 +13,11 @@ import { type ExecutionResult, ExecutionResultSchema, GetSecretsRequestSchema, + RequirementsSchema, SecretResponseSchema, SecretResponsesSchema, SecretSchema, + TeeType, type Trigger, TriggerSchema, type TriggerSubscriptionRequest, @@ -23,6 +25,7 @@ import { import type { Value as ProtoValue } from '@cre/generated/values/v1/values_pb' import { BasicCapability as BasicTriggerCapability } from '@cre/generated-sdk/capabilities/internal/basictrigger/v1/basic_sdk_gen' import { cre } from '@cre/sdk/cre' +import { handlerInTee } from '@cre/sdk/workflow' import { Value } from '../utils' import type { SecretsProvider } from '../workflow' import { Runner } from './runner' @@ -306,13 +309,128 @@ describe('runner', () => { }) }) -function getTestRunner(request: ExecuteRequest): Promise> { +describe('handlerInTee', () => { + test('specified list sets requirements on subscription', async () => { + var sentResponse: ExecutionResult | null = null + mockHostBindings.sendResponse = mock((input) => { + sentResponse = fromBinary(ExecutionResultSchema, input) + return 0 + }) + const runner = await getTestRunner(subscribeRequest) + await runner.run(async (_: string, secretsProvider: SecretsProvider) => { + return [ + handlerInTee(basicTrigger.trigger({ name: 'foo', number: 10 }), (runtime, trigger) => 0, [ + { tee: 'nitro', regions: ['us-west-2'] }, + ]), + ] + }) + expect(sentResponse).toBeDefined() + expect(sentResponse!.result.case).toBe('triggerSubscriptions') + const subs = (sentResponse!.result.value as TriggerSubscriptionRequest).subscriptions + expect(subs.length).toBe(1) + const expected = create(RequirementsSchema, { + tee: { + item: { + case: 'teeTypesAndRegions', + value: { + teeTypeAndRegions: [{ type: TeeType.AWS_NITRO, regions: ['us-west-2'] }], + }, + }, + }, + }) + expect(toBinary(RequirementsSchema, subs[0].requirements!)).toEqual( + toBinary(RequirementsSchema, expected), + ) + }) + + test('any tee with regions sets requirements on subscription', async () => { + var sentResponse: ExecutionResult | null = null + mockHostBindings.sendResponse = mock((input) => { + sentResponse = fromBinary(ExecutionResultSchema, input) + return 0 + }) + const runner = await getTestRunner(subscribeRequest) + await runner.run(async (_: string, secretsProvider: SecretsProvider) => { + return [ + handlerInTee(basicTrigger.trigger({ name: 'foo', number: 10 }), (runtime, trigger) => 0, { + regions: ['us-west-2'], + }), + ] + }) + expect(sentResponse).toBeDefined() + expect(sentResponse!.result.case).toBe('triggerSubscriptions') + const subs = (sentResponse!.result.value as TriggerSubscriptionRequest).subscriptions + expect(subs.length).toBe(1) + const expected = create(RequirementsSchema, { + tee: { + item: { + case: 'anyRegions', + value: { regions: ['us-west-2'] }, + }, + }, + }) + expect(toBinary(RequirementsSchema, subs[0].requirements!)).toEqual( + toBinary(RequirementsSchema, expected), + ) + }) + + test('regular handler has no requirements on subscription', async () => { + var sentResponse: ExecutionResult | null = null + mockHostBindings.sendResponse = mock((input) => { + sentResponse = fromBinary(ExecutionResultSchema, input) + return 0 + }) + const runner = await getTestRunner(subscribeRequest) + await runner.run(async (_: string, secretsProvider: SecretsProvider) => { + return [cre.handler(basicTrigger.trigger({ name: 'foo', number: 10 }), () => 0)] + }) + expect(sentResponse).toBeDefined() + expect(sentResponse!.result.case).toBe('triggerSubscriptions') + const subs = (sentResponse!.result.value as TriggerSubscriptionRequest).subscriptions + expect(subs.length).toBe(1) + expect(subs[0].requirements).toBeUndefined() + }) + + test('tee handler callback receives TeeRuntime', async () => { + var sentResponse: ExecutionResult | null = null + mockHostBindings.sendResponse = mock((input) => { + sentResponse = fromBinary(ExecutionResultSchema, input) + return 0 + }) + const runner = await getTestRunner(anyExecuteRequest) + let callbackInvoked = false + await runner.run(async (_: string, secretsProvider: SecretsProvider) => { + return [ + handlerInTee( + basicTrigger.trigger({ name: 'foo', number: 10 }), + (runtime, trigger) => { + callbackInvoked = true + expect(runtime).toBeDefined() + // TeeRuntime has reportFromDon and usingTheDons; Runtime does not + expect(typeof (runtime as any).reportFromDon).toBe('function') + return 0 + }, + [{ tee: 'nitro', regions: ['us-west-2'] }], + ), + ] + }) + expect(callbackInvoked).toBe(true) + }) +}) + +function setupArgs(request: ExecuteRequest, preCheck?: () => void) { const serialized = toBinary(ExecuteRequestSchema, request) const encoded = Buffer.from(serialized).toString('base64') // Update the mock to return the specific request - mockHostBindings.getWasiArgs = mock(() => JSON.stringify(['program', encoded])) + mockHostBindings.getWasiArgs = mock(() => { + preCheck?.() + return JSON.stringify(['program', encoded]) + }) +} +function getTestRunner(request: ExecuteRequest): Promise> { + setupArgs(request) return Runner.newRunner({ configParser: (b) => { const stringConfig = Buffer.from(b).toString() diff --git a/packages/cre-sdk/src/sdk/wasm/runner.ts b/packages/cre-sdk/src/sdk/wasm/runner.ts index 35bec786..51c352ae 100644 --- a/packages/cre-sdk/src/sdk/wasm/runner.ts +++ b/packages/cre-sdk/src/sdk/wasm/runner.ts @@ -4,27 +4,30 @@ import { ExecuteRequestSchema, type ExecutionResult, ExecutionResultSchema, + type SecretRequest, + type SecretRequestJson, TriggerSubscriptionRequestSchema, } from '@cre/generated/sdk/v1alpha/sdk_pb' import { type ConfigHandlerParams, configHandler } from '@cre/sdk/utils/config' import type { SecretsProvider, Workflow } from '@cre/sdk/workflow' import { Value } from '../utils' import { hostBindings } from './host-bindings' -import { Runtime } from './runtime' +import { Runtime, TeeRuntime } from './runtime' -export class Runner { - private constructor( +class RunnerBase { + protected constructor( private readonly config: TConfig, private readonly request: ExecuteRequest, ) {} - static async newRunner( + protected static async newRunnerHelper( + newRunner: (config: TConfig, request: ExecuteRequest) => TRunner, configHandlerParams?: ConfigHandlerParams, - ): Promise> { + ): Promise { hostBindings.versionV2() - const request = Runner.getRequest() + const request = RunnerBase.getRequest() const config = await configHandler(request, configHandlerParams) - return new Runner(config, request) + return newRunner(config, request) } private static getRequest(): ExecuteRequest { @@ -61,11 +64,16 @@ export class Runner { ) { const runtime = new Runtime(this.config, 0, this.request.maxResponseSize) + // wrap runtime's getSecret so other methods cannot be used + const sp = { + getSecret: (request: SecretRequest | SecretRequestJson) => { + return runtime.getSecret(request) + }, + } + let result: Promise | ExecutionResult try { - const workflow = await initFn(this.config, { - getSecret: runtime.getSecret.bind(runtime), - }) + const workflow = await initFn(this.config, sp) switch (this.request.request.case) { case 'subscribe': @@ -90,7 +98,7 @@ export class Runner { hostBindings.sendResponse(toBinary(ExecutionResultSchema, awaitedResult)) } - async handleExecutionPhase( + async handleExecutionPhase( req: ExecuteRequest, workflow: Workflow, runtime: Runtime, @@ -137,8 +145,12 @@ export class Runner { const decoded = fromBinary(schema, payloadAny.value) const adapted = entry.trigger.adapt(decoded) + // If the handler has requirements (e.g. TEE), use TeeRuntime; otherwise use the default runtime. + const handlerRuntime = + entry.requirements != null ? new TeeRuntime(this.config, 0, req.maxResponseSize) : runtime + try { - const result = await entry.fn(runtime, adapted) + const result = await entry.fn(handlerRuntime as any, adapted) const wrapped = Value.wrap(result) return create(ExecutionResultSchema, { result: { case: 'value', value: wrapped.proto() }, @@ -169,11 +181,12 @@ export class Runner { }) } - // Build TriggerSubscriptionRequest from the workflow entries + // Build TriggerSubscriptionRequest from the workflow entries, including any per-handler requirements. const subscriptions = workflow.map((entry) => ({ id: entry.trigger.capabilityId(), method: entry.trigger.method(), payload: entry.trigger.configAsAny(), + requirements: entry.requirements, })) const subscriptionRequest = create(TriggerSubscriptionRequestSchema, { @@ -185,3 +198,18 @@ export class Runner { }) } } + +export class Runner extends RunnerBase { + private constructor(config: TConfig, request: ExecuteRequest) { + super(config, request) + } + + static async newRunner( + configHandlerParams?: ConfigHandlerParams, + ): Promise> { + return RunnerBase.newRunnerHelper( + (config, request) => new Runner(config, request), + configHandlerParams, + ) + } +} diff --git a/packages/cre-sdk/src/sdk/wasm/runtime.ts b/packages/cre-sdk/src/sdk/wasm/runtime.ts index d42ebd3b..4354680c 100644 --- a/packages/cre-sdk/src/sdk/wasm/runtime.ts +++ b/packages/cre-sdk/src/sdk/wasm/runtime.ts @@ -14,7 +14,12 @@ import { GetSecretsRequestSchema, type Mode, } from '@cre/generated/sdk/v1alpha/sdk_pb' -import { NodeRuntimeImpl, type RuntimeHelpers, RuntimeImpl } from '../impl/runtime-impl' +import { + NodeRuntimeImpl, + type RuntimeHelpers, + RuntimeImpl, + TeeRuntimeImpl, +} from '../impl/runtime-impl' import { hostBindings } from './host-bindings' export class Runtime extends RuntimeImpl { @@ -29,6 +34,12 @@ export class NodeRuntime extends NodeRuntimeImpl { } } +export class TeeRuntime extends TeeRuntimeImpl { + constructor(config: C, nextCallId: number, maxResponseSize: bigint) { + super(config, nextCallId, WasmRuntimeHelpers.getInstance(), maxResponseSize) + } +} + /** Convert bigint maxResponseSize to i32 for WASM host binding, with range validation. */ function toI32ResponseSize(maxResponseSize: bigint): number { if (maxResponseSize > 2147483647n || maxResponseSize < -2147483648n) { diff --git a/packages/cre-sdk/src/sdk/workflow.ts b/packages/cre-sdk/src/sdk/workflow.ts index f033a784..b0db4286 100644 --- a/packages/cre-sdk/src/sdk/workflow.ts +++ b/packages/cre-sdk/src/sdk/workflow.ts @@ -1,17 +1,22 @@ import type { Message } from '@bufbuild/protobuf' import type { - CapabilityResponse, + Requirements, Secret, SecretRequest, SecretRequestJson, } from '@cre/generated/sdk/v1alpha/sdk_pb' -import { type Runtime } from '@cre/sdk/runtime' +import type { Runtime, TeeRuntime } from '@cre/sdk/runtime' import type { Trigger } from '@cre/sdk/utils/triggers/trigger-interface' -import type { SecretsError } from './errors' import type { CreSerializable } from './utils' -export type HandlerFn = ( - runtime: Runtime, +export type { TeeConstraint, AnyTeeConstraint, OneOfTees, TeeBinding, NitroBinding } from './tee-constraints' +export { buildTeeRequirements, REGIONS, NITRO_REGIONS, teeConstraintSchema } from './tee-constraints' +export type { Region, NitroRegion } from './tee-constraints' +import type { TeeConstraint } from './tee-constraints' +import { buildTeeRequirements } from './tee-constraints' + +export type HandlerFn> = ( + runtime: TRuntime, triggerOutput: TTriggerOutput, ) => Promise> | CreSerializable @@ -20,24 +25,42 @@ export interface HandlerEntry< TRawTriggerOutput extends Message, TTriggerOutput, TResult, + TRuntime = Runtime, > { trigger: Trigger - fn: HandlerFn + fn: HandlerFn + requirements?: Requirements } -export type Workflow = ReadonlyArray> +export type Workflow = ReadonlyArray> export const handler = < TRawTriggerOutput extends Message, TTriggerOutput, TConfig, TResult, + TRuntime = Runtime, +>( + trigger: Trigger, + fn: HandlerFn, +): HandlerEntry => ({ + trigger, + fn, +}) + +export const handlerInTee = < + TRawTriggerOutput extends Message, + TTriggerOutput, + TConfig, + TResult, >( trigger: Trigger, - fn: HandlerFn, -): HandlerEntry => ({ + fn: HandlerFn>, + tees: TeeConstraint, +): HandlerEntry> => ({ trigger, fn, + requirements: buildTeeRequirements(tees), }) export type SecretsProvider = { diff --git a/packages/cre-sdk/src/standard_tests/tee_runtime/test.ts b/packages/cre-sdk/src/standard_tests/tee_runtime/test.ts new file mode 100644 index 00000000..630b97e8 --- /dev/null +++ b/packages/cre-sdk/src/standard_tests/tee_runtime/test.ts @@ -0,0 +1,29 @@ +import type { Outputs } from '@cre/generated/capabilities/internal/basictrigger/v1/basic_trigger_pb' +import { BasicCapability as BasicTriggerCapability } from '@cre/generated-sdk/capabilities/internal/basictrigger/v1/basic_sdk_gen' +import { cre, type Runtime, type TeeRuntime } from '@cre/sdk/cre' +import { Runner } from '@cre/sdk/wasm' +import { handlerInTee } from '@cre/sdk/workflow' + +const teeTrigger = (_: TeeRuntime, __: Outputs) => 0 +const regularTrigger = (_: Runtime, __: Outputs) => 0 + +const initWorkflow = () => { + const basicTrigger = new BasicTriggerCapability() + return [ + handlerInTee(basicTrigger.trigger({ name: 'first-trigger', number: 100 }), teeTrigger, [ + { tee: 'nitro', regions: ['us-west-2'] }, + ]), + cre.handler(basicTrigger.trigger({ name: 'second-trigger', number: 200 }), regularTrigger), + ] +} + +export async function main() { + console.log(`TS workflow: standard test: config [${new Date().toISOString()}]`) + + const runner = await Runner.newRunner({ + configParser: (c: Uint8Array) => c, + }) + await runner.run(initWorkflow) +} + +await main() diff --git a/submodules/chainlink-protos b/submodules/chainlink-protos index faea187e..95fa2df1 160000 --- a/submodules/chainlink-protos +++ b/submodules/chainlink-protos @@ -1 +1 @@ -Subproject commit faea187e6997e00852cad8046c09b7b2d0f1e128 +Subproject commit 95fa2df1017b54af1cc78541b8c66a6158b4d4d8