@chainlink/cre-sdk 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/generated/capabilities/blockchain/solana/v1alpha/client_pb.d.ts +268 -0
  2. package/dist/generated/capabilities/blockchain/solana/v1alpha/client_pb.js +90 -0
  3. package/dist/generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen.d.ts +10 -9
  4. package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.d.ts +43 -0
  5. package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.js +83 -0
  6. package/dist/generated-sdk/capabilities/internal/consensus/v1alpha/consensus_sdk_gen.d.ts +3 -2
  7. package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.d.ts +2 -1
  8. package/dist/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.d.ts +3 -2
  9. package/dist/generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen.d.ts +2 -1
  10. package/dist/generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen.d.ts +2 -1
  11. package/dist/pb.d.ts +1 -0
  12. package/dist/pb.js +1 -0
  13. package/dist/sdk/cre/index.d.ts +4 -0
  14. package/dist/sdk/cre/index.js +5 -0
  15. package/dist/sdk/impl/runtime-impl.d.ts +3 -0
  16. package/dist/sdk/impl/runtime-impl.js +9 -4
  17. package/dist/sdk/index.d.ts +1 -0
  18. package/dist/sdk/index.js +1 -0
  19. package/dist/sdk/test/generated/capabilities/blockchain/solana/v1alpha/solana_mock_gen.d.ts +17 -0
  20. package/dist/sdk/test/generated/capabilities/blockchain/solana/v1alpha/solana_mock_gen.js +53 -0
  21. package/dist/sdk/test/generated/index.d.ts +1 -0
  22. package/dist/sdk/test/generated/index.js +1 -0
  23. package/dist/sdk/testutils/test-runtime.js +9 -1
  24. package/dist/sdk/types/global.d.ts +6 -0
  25. package/dist/sdk/utils/capabilities/blockchain/blockchain-helpers.js +3 -2
  26. package/dist/sdk/utils/capabilities/confidentialhttp/confidential-http-helpers.d.ts +43 -0
  27. package/dist/sdk/utils/capabilities/confidentialhttp/confidential-http-helpers.js +58 -0
  28. package/dist/sdk/utils/capabilities/http/http-helpers.d.ts +20 -6
  29. package/dist/sdk/utils/capabilities/http/http-helpers.js +23 -4
  30. package/dist/sdk/utils/safe-integer.d.ts +8 -0
  31. package/dist/sdk/utils/safe-integer.js +15 -0
  32. package/dist/sdk/utils/types/no-excess.d.ts +32 -0
  33. package/dist/sdk/utils/types/no-excess.js +1 -0
  34. package/dist/sdk/utils/values/value.js +3 -4
  35. package/dist/sdk/wasm/host-bindings.d.ts +39 -0
  36. package/dist/sdk/wasm/host-bindings.js +2 -1
  37. package/dist/sdk/wasm/runtime.js +3 -0
  38. package/package.json +4 -3
  39. package/scripts/src/generate-sdks.ts +6 -0
@@ -0,0 +1,268 @@
1
+ import type { Message } from '@bufbuild/protobuf';
2
+ import type { GenEnum, GenFile, GenMessage, GenService } from '@bufbuild/protobuf/codegenv2';
3
+ import type { ReportResponse, ReportResponseJson } from '../../../../sdk/v1alpha/sdk_pb';
4
+ /**
5
+ * Describes the file capabilities/blockchain/solana/v1alpha/client.proto.
6
+ */
7
+ export declare const file_capabilities_blockchain_solana_v1alpha_client: GenFile;
8
+ /**
9
+ * Compute budget configuration when submitting txs.
10
+ *
11
+ * @generated from message capabilities.blockchain.solana.v1alpha.ComputeConfig
12
+ */
13
+ export type ComputeConfig = Message<'capabilities.blockchain.solana.v1alpha.ComputeConfig'> & {
14
+ /**
15
+ * max CUs (approx per-tx limit)
16
+ *
17
+ * @generated from field: uint32 compute_limit = 1;
18
+ */
19
+ computeLimit: number;
20
+ };
21
+ /**
22
+ * Compute budget configuration when submitting txs.
23
+ *
24
+ * @generated from message capabilities.blockchain.solana.v1alpha.ComputeConfig
25
+ */
26
+ export type ComputeConfigJson = {
27
+ /**
28
+ * max CUs (approx per-tx limit)
29
+ *
30
+ * @generated from field: uint32 compute_limit = 1;
31
+ */
32
+ computeLimit?: number;
33
+ };
34
+ /**
35
+ * Describes the message capabilities.blockchain.solana.v1alpha.ComputeConfig.
36
+ * Use `create(ComputeConfigSchema)` to create a new message.
37
+ */
38
+ export declare const ComputeConfigSchema: GenMessage<ComputeConfig, {
39
+ jsonType: ComputeConfigJson;
40
+ }>;
41
+ /**
42
+ * All metas are non-signers.
43
+ *
44
+ * @generated from message capabilities.blockchain.solana.v1alpha.AccountMeta
45
+ */
46
+ export type AccountMeta = Message<'capabilities.blockchain.solana.v1alpha.AccountMeta'> & {
47
+ /**
48
+ * 32 bytes account public key
49
+ *
50
+ * @generated from field: bytes public_key = 1;
51
+ */
52
+ publicKey: Uint8Array;
53
+ /**
54
+ * write flag
55
+ *
56
+ * @generated from field: bool is_writable = 2;
57
+ */
58
+ isWritable: boolean;
59
+ };
60
+ /**
61
+ * All metas are non-signers.
62
+ *
63
+ * @generated from message capabilities.blockchain.solana.v1alpha.AccountMeta
64
+ */
65
+ export type AccountMetaJson = {
66
+ /**
67
+ * 32 bytes account public key
68
+ *
69
+ * @generated from field: bytes public_key = 1;
70
+ */
71
+ publicKey?: string;
72
+ /**
73
+ * write flag
74
+ *
75
+ * @generated from field: bool is_writable = 2;
76
+ */
77
+ isWritable?: boolean;
78
+ };
79
+ /**
80
+ * Describes the message capabilities.blockchain.solana.v1alpha.AccountMeta.
81
+ * Use `create(AccountMetaSchema)` to create a new message.
82
+ */
83
+ export declare const AccountMetaSchema: GenMessage<AccountMeta, {
84
+ jsonType: AccountMetaJson;
85
+ }>;
86
+ /**
87
+ * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportRequest
88
+ */
89
+ export type WriteReportRequest = Message<'capabilities.blockchain.solana.v1alpha.WriteReportRequest'> & {
90
+ /**
91
+ * accounts that are required by the receiver to accept the report
92
+ *
93
+ * @generated from field: repeated capabilities.blockchain.solana.v1alpha.AccountMeta remaining_accounts = 1;
94
+ */
95
+ remainingAccounts: AccountMeta[];
96
+ /**
97
+ * 32 bytes receiver
98
+ *
99
+ * @generated from field: bytes receiver = 2;
100
+ */
101
+ receiver: Uint8Array;
102
+ /**
103
+ * @generated from field: optional capabilities.blockchain.solana.v1alpha.ComputeConfig compute_config = 3;
104
+ */
105
+ computeConfig?: ComputeConfig;
106
+ /**
107
+ * @generated from field: sdk.v1alpha.ReportResponse report = 4;
108
+ */
109
+ report?: ReportResponse;
110
+ };
111
+ /**
112
+ * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportRequest
113
+ */
114
+ export type WriteReportRequestJson = {
115
+ /**
116
+ * accounts that are required by the receiver to accept the report
117
+ *
118
+ * @generated from field: repeated capabilities.blockchain.solana.v1alpha.AccountMeta remaining_accounts = 1;
119
+ */
120
+ remainingAccounts?: AccountMetaJson[];
121
+ /**
122
+ * 32 bytes receiver
123
+ *
124
+ * @generated from field: bytes receiver = 2;
125
+ */
126
+ receiver?: string;
127
+ /**
128
+ * @generated from field: optional capabilities.blockchain.solana.v1alpha.ComputeConfig compute_config = 3;
129
+ */
130
+ computeConfig?: ComputeConfigJson;
131
+ /**
132
+ * @generated from field: sdk.v1alpha.ReportResponse report = 4;
133
+ */
134
+ report?: ReportResponseJson;
135
+ };
136
+ /**
137
+ * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportRequest.
138
+ * Use `create(WriteReportRequestSchema)` to create a new message.
139
+ */
140
+ export declare const WriteReportRequestSchema: GenMessage<WriteReportRequest, {
141
+ jsonType: WriteReportRequestJson;
142
+ }>;
143
+ /**
144
+ * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportReply
145
+ */
146
+ export type WriteReportReply = Message<'capabilities.blockchain.solana.v1alpha.WriteReportReply'> & {
147
+ /**
148
+ * @generated from field: capabilities.blockchain.solana.v1alpha.TxStatus tx_status = 1;
149
+ */
150
+ txStatus: TxStatus;
151
+ /**
152
+ * @generated from field: optional capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 2;
153
+ */
154
+ receiverContractExecutionStatus?: ReceiverContractExecutionStatus;
155
+ /**
156
+ * @generated from field: optional bytes tx_signature = 3;
157
+ */
158
+ txSignature?: Uint8Array;
159
+ /**
160
+ * @generated from field: optional uint64 transaction_fee = 4 [jstype = JS_NORMAL];
161
+ */
162
+ transactionFee?: bigint;
163
+ /**
164
+ * @generated from field: optional string error_message = 5;
165
+ */
166
+ errorMessage?: string;
167
+ };
168
+ /**
169
+ * @generated from message capabilities.blockchain.solana.v1alpha.WriteReportReply
170
+ */
171
+ export type WriteReportReplyJson = {
172
+ /**
173
+ * @generated from field: capabilities.blockchain.solana.v1alpha.TxStatus tx_status = 1;
174
+ */
175
+ txStatus?: TxStatusJson;
176
+ /**
177
+ * @generated from field: optional capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus receiver_contract_execution_status = 2;
178
+ */
179
+ receiverContractExecutionStatus?: ReceiverContractExecutionStatusJson;
180
+ /**
181
+ * @generated from field: optional bytes tx_signature = 3;
182
+ */
183
+ txSignature?: string;
184
+ /**
185
+ * @generated from field: optional uint64 transaction_fee = 4 [jstype = JS_NORMAL];
186
+ */
187
+ transactionFee?: string;
188
+ /**
189
+ * @generated from field: optional string error_message = 5;
190
+ */
191
+ errorMessage?: string;
192
+ };
193
+ /**
194
+ * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportReply.
195
+ * Use `create(WriteReportReplySchema)` to create a new message.
196
+ */
197
+ export declare const WriteReportReplySchema: GenMessage<WriteReportReply, {
198
+ jsonType: WriteReportReplyJson;
199
+ }>;
200
+ /**
201
+ * Transaction execution status returned by submitters/simulations.
202
+ *
203
+ * @generated from enum capabilities.blockchain.solana.v1alpha.TxStatus
204
+ */
205
+ export declare enum TxStatus {
206
+ /**
207
+ * unrecoverable failure
208
+ *
209
+ * @generated from enum value: TX_STATUS_FATAL = 0;
210
+ */
211
+ FATAL = 0,
212
+ /**
213
+ * not executed / dropped
214
+ *
215
+ * @generated from enum value: TX_STATUS_ABORTED = 1;
216
+ */
217
+ ABORTED = 1,
218
+ /**
219
+ * executed successfully
220
+ *
221
+ * @generated from enum value: TX_STATUS_SUCCESS = 2;
222
+ */
223
+ SUCCESS = 2
224
+ }
225
+ /**
226
+ * Transaction execution status returned by submitters/simulations.
227
+ *
228
+ * @generated from enum capabilities.blockchain.solana.v1alpha.TxStatus
229
+ */
230
+ export type TxStatusJson = 'TX_STATUS_FATAL' | 'TX_STATUS_ABORTED' | 'TX_STATUS_SUCCESS';
231
+ /**
232
+ * Describes the enum capabilities.blockchain.solana.v1alpha.TxStatus.
233
+ */
234
+ export declare const TxStatusSchema: GenEnum<TxStatus, TxStatusJson>;
235
+ /**
236
+ * @generated from enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus
237
+ */
238
+ export declare enum ReceiverContractExecutionStatus {
239
+ /**
240
+ * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS = 0;
241
+ */
242
+ SUCCESS = 0,
243
+ /**
244
+ * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED = 1;
245
+ */
246
+ REVERTED = 1
247
+ }
248
+ /**
249
+ * @generated from enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus
250
+ */
251
+ export type ReceiverContractExecutionStatusJson = 'RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS' | 'RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED';
252
+ /**
253
+ * Describes the enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus.
254
+ */
255
+ export declare const ReceiverContractExecutionStatusSchema: GenEnum<ReceiverContractExecutionStatus, ReceiverContractExecutionStatusJson>;
256
+ /**
257
+ * @generated from service capabilities.blockchain.solana.v1alpha.Client
258
+ */
259
+ export declare const Client: GenService<{
260
+ /**
261
+ * @generated from rpc capabilities.blockchain.solana.v1alpha.Client.WriteReport
262
+ */
263
+ writeReport: {
264
+ methodKind: 'unary';
265
+ input: typeof WriteReportRequestSchema;
266
+ output: typeof WriteReportReplySchema;
267
+ };
268
+ }>;
@@ -0,0 +1,90 @@
1
+ // @generated by protoc-gen-es v2.6.3 with parameter "target=ts,import_extension=none,json_types=true,keep_empty_files=false"
2
+ // @generated from file capabilities/blockchain/solana/v1alpha/client.proto (package capabilities.blockchain.solana.v1alpha, syntax proto3)
3
+ /* eslint-disable */
4
+ import { enumDesc, fileDesc, messageDesc, serviceDesc } from '@bufbuild/protobuf/codegenv2';
5
+ import { file_sdk_v1alpha_sdk } from '../../../../sdk/v1alpha/sdk_pb';
6
+ import { file_tools_generator_v1alpha_cre_metadata } from '../../../../tools/generator/v1alpha/cre_metadata_pb';
7
+ /**
8
+ * Describes the file capabilities/blockchain/solana/v1alpha/client.proto.
9
+ */
10
+ export const file_capabilities_blockchain_solana_v1alpha_client =
11
+ /*@__PURE__*/
12
+ fileDesc('CjNjYXBhYmlsaXRpZXMvYmxvY2tjaGFpbi9zb2xhbmEvdjFhbHBoYS9jbGllbnQucHJvdG8SJmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhIiYKDUNvbXB1dGVDb25maWcSFQoNY29tcHV0ZV9saW1pdBgBIAEoDSI2CgtBY2NvdW50TWV0YRISCgpwdWJsaWNfa2V5GAEgASgMEhMKC2lzX3dyaXRhYmxlGAIgASgIIosCChJXcml0ZVJlcG9ydFJlcXVlc3QSTwoScmVtYWluaW5nX2FjY291bnRzGAEgAygLMjMuY2FwYWJpbGl0aWVzLmJsb2NrY2hhaW4uc29sYW5hLnYxYWxwaGEuQWNjb3VudE1ldGESEAoIcmVjZWl2ZXIYAiABKAwSUgoOY29tcHV0ZV9jb25maWcYAyABKAsyNS5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYS5Db21wdXRlQ29uZmlnSACIAQESKwoGcmVwb3J0GAQgASgLMhsuc2RrLnYxYWxwaGEuUmVwb3J0UmVzcG9uc2VCEQoPX2NvbXB1dGVfY29uZmlnIogDChBXcml0ZVJlcG9ydFJlcGx5EkMKCXR4X3N0YXR1cxgBIAEoDjIwLmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhLlR4U3RhdHVzEngKInJlY2VpdmVyX2NvbnRyYWN0X2V4ZWN1dGlvbl9zdGF0dXMYAiABKA4yRy5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYS5SZWNlaXZlckNvbnRyYWN0RXhlY3V0aW9uU3RhdHVzSACIAQESGQoMdHhfc2lnbmF0dXJlGAMgASgMSAGIAQESIAoPdHJhbnNhY3Rpb25fZmVlGAQgASgEQgIwAEgCiAEBEhoKDWVycm9yX21lc3NhZ2UYBSABKAlIA4gBAUIlCiNfcmVjZWl2ZXJfY29udHJhY3RfZXhlY3V0aW9uX3N0YXR1c0IPCg1fdHhfc2lnbmF0dXJlQhIKEF90cmFuc2FjdGlvbl9mZWVCEAoOX2Vycm9yX21lc3NhZ2UqTQoIVHhTdGF0dXMSEwoPVFhfU1RBVFVTX0ZBVEFMEAASFQoRVFhfU1RBVFVTX0FCT1JURUQQARIVChFUWF9TVEFUVVNfU1VDQ0VTUxACKoIBCh9SZWNlaXZlckNvbnRyYWN0RXhlY3V0aW9uU3RhdHVzEi4KKlJFQ0VJVkVSX0NPTlRSQUNUX0VYRUNVVElPTl9TVEFUVVNfU1VDQ0VTUxAAEi8KK1JFQ0VJVkVSX0NPTlRSQUNUX0VYRUNVVElPTl9TVEFUVVNfUkVWRVJURUQQATLxAQoGQ2xpZW50EoMBCgtXcml0ZVJlcG9ydBI6LmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhLldyaXRlUmVwb3J0UmVxdWVzdBo4LmNhcGFiaWxpdGllcy5ibG9ja2NoYWluLnNvbGFuYS52MWFscGhhLldyaXRlUmVwb3J0UmVwbHkaYYK1GF0IARIMc29sYW5hQDEuMC4wGksKDUNoYWluU2VsZWN0b3ISOhI4ChoKDXNvbGFuYS1kZXZuZXQQ3++Mp6n8sfbjAQoaCg5zb2xhbmEtbWFpbm5ldBDnk9+Mtp+u3QFC9AEKKmNvbS5jYXBhYmlsaXRpZXMuYmxvY2tjaGFpbi5zb2xhbmEudjFhbHBoYUILQ2xpZW50UHJvdG9QAaICA0NCU6oCJkNhcGFiaWxpdGllcy5CbG9ja2NoYWluLlNvbGFuYS5WMWFscGhhygImQ2FwYWJpbGl0aWVzXEJsb2NrY2hhaW5cU29sYW5hXFYxYWxwaGHiAjJDYXBhYmlsaXRpZXNcQmxvY2tjaGFpblxTb2xhbmFcVjFhbHBoYVxHUEJNZXRhZGF0YeoCKUNhcGFiaWxpdGllczo6QmxvY2tjaGFpbjo6U29sYW5hOjpWMWFscGhhYgZwcm90bzM', [file_sdk_v1alpha_sdk, file_tools_generator_v1alpha_cre_metadata]);
13
+ /**
14
+ * Describes the message capabilities.blockchain.solana.v1alpha.ComputeConfig.
15
+ * Use `create(ComputeConfigSchema)` to create a new message.
16
+ */
17
+ export const ComputeConfigSchema =
18
+ /*@__PURE__*/
19
+ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 0);
20
+ /**
21
+ * Describes the message capabilities.blockchain.solana.v1alpha.AccountMeta.
22
+ * Use `create(AccountMetaSchema)` to create a new message.
23
+ */
24
+ export const AccountMetaSchema =
25
+ /*@__PURE__*/
26
+ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 1);
27
+ /**
28
+ * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportRequest.
29
+ * Use `create(WriteReportRequestSchema)` to create a new message.
30
+ */
31
+ export const WriteReportRequestSchema = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 2);
32
+ /**
33
+ * Describes the message capabilities.blockchain.solana.v1alpha.WriteReportReply.
34
+ * Use `create(WriteReportReplySchema)` to create a new message.
35
+ */
36
+ export const WriteReportReplySchema = /*@__PURE__*/ messageDesc(file_capabilities_blockchain_solana_v1alpha_client, 3);
37
+ /**
38
+ * Transaction execution status returned by submitters/simulations.
39
+ *
40
+ * @generated from enum capabilities.blockchain.solana.v1alpha.TxStatus
41
+ */
42
+ export var TxStatus;
43
+ (function (TxStatus) {
44
+ /**
45
+ * unrecoverable failure
46
+ *
47
+ * @generated from enum value: TX_STATUS_FATAL = 0;
48
+ */
49
+ TxStatus[TxStatus["FATAL"] = 0] = "FATAL";
50
+ /**
51
+ * not executed / dropped
52
+ *
53
+ * @generated from enum value: TX_STATUS_ABORTED = 1;
54
+ */
55
+ TxStatus[TxStatus["ABORTED"] = 1] = "ABORTED";
56
+ /**
57
+ * executed successfully
58
+ *
59
+ * @generated from enum value: TX_STATUS_SUCCESS = 2;
60
+ */
61
+ TxStatus[TxStatus["SUCCESS"] = 2] = "SUCCESS";
62
+ })(TxStatus || (TxStatus = {}));
63
+ /**
64
+ * Describes the enum capabilities.blockchain.solana.v1alpha.TxStatus.
65
+ */
66
+ export const TxStatusSchema =
67
+ /*@__PURE__*/
68
+ enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 0);
69
+ /**
70
+ * @generated from enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus
71
+ */
72
+ export var ReceiverContractExecutionStatus;
73
+ (function (ReceiverContractExecutionStatus) {
74
+ /**
75
+ * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_SUCCESS = 0;
76
+ */
77
+ ReceiverContractExecutionStatus[ReceiverContractExecutionStatus["SUCCESS"] = 0] = "SUCCESS";
78
+ /**
79
+ * @generated from enum value: RECEIVER_CONTRACT_EXECUTION_STATUS_REVERTED = 1;
80
+ */
81
+ ReceiverContractExecutionStatus[ReceiverContractExecutionStatus["REVERTED"] = 1] = "REVERTED";
82
+ })(ReceiverContractExecutionStatus || (ReceiverContractExecutionStatus = {}));
83
+ /**
84
+ * Describes the enum capabilities.blockchain.solana.v1alpha.ReceiverContractExecutionStatus.
85
+ */
86
+ export const ReceiverContractExecutionStatusSchema = /*@__PURE__*/ enumDesc(file_capabilities_blockchain_solana_v1alpha_client, 1);
87
+ /**
88
+ * @generated from service capabilities.blockchain.solana.v1alpha.Client
89
+ */
90
+ export const Client = /*@__PURE__*/ serviceDesc(file_capabilities_blockchain_solana_v1alpha_client, 0);
@@ -3,6 +3,7 @@ import { type BalanceAtReply, type BalanceAtRequest, type BalanceAtRequestJson,
3
3
  import type { Runtime } from '../../../../../sdk';
4
4
  import { Report } from '../../../../../sdk/report';
5
5
  import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
6
+ import type { CapabilityInput, NoExcess } from '../../../../../sdk/utils/types/no-excess';
6
7
  export type WriteCreReportRequest = {
7
8
  receiver: Uint8Array;
8
9
  report?: Report;
@@ -88,29 +89,29 @@ export declare class ClientCapability {
88
89
  readonly 'xlayer-testnet': 10212741611335999305n;
89
90
  };
90
91
  constructor(ChainSelector: bigint);
91
- callContract(runtime: Runtime<unknown>, input: CallContractRequest | CallContractRequestJson): {
92
+ callContract<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, CallContractRequest, CallContractRequestJson>): {
92
93
  result: () => CallContractReply;
93
94
  };
94
- filterLogs(runtime: Runtime<unknown>, input: FilterLogsRequest | FilterLogsRequestJson): {
95
+ filterLogs<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, FilterLogsRequest, FilterLogsRequestJson>): {
95
96
  result: () => FilterLogsReply;
96
97
  };
97
- balanceAt(runtime: Runtime<unknown>, input: BalanceAtRequest | BalanceAtRequestJson): {
98
+ balanceAt<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, BalanceAtRequest, BalanceAtRequestJson>): {
98
99
  result: () => BalanceAtReply;
99
100
  };
100
- estimateGas(runtime: Runtime<unknown>, input: EstimateGasRequest | EstimateGasRequestJson): {
101
+ estimateGas<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, EstimateGasRequest, EstimateGasRequestJson>): {
101
102
  result: () => EstimateGasReply;
102
103
  };
103
- getTransactionByHash(runtime: Runtime<unknown>, input: GetTransactionByHashRequest | GetTransactionByHashRequestJson): {
104
+ getTransactionByHash<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, GetTransactionByHashRequest, GetTransactionByHashRequestJson>): {
104
105
  result: () => GetTransactionByHashReply;
105
106
  };
106
- getTransactionReceipt(runtime: Runtime<unknown>, input: GetTransactionReceiptRequest | GetTransactionReceiptRequestJson): {
107
+ getTransactionReceipt<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, GetTransactionReceiptRequest, GetTransactionReceiptRequestJson>): {
107
108
  result: () => GetTransactionReceiptReply;
108
109
  };
109
- headerByNumber(runtime: Runtime<unknown>, input: HeaderByNumberRequest | HeaderByNumberRequestJson): {
110
+ headerByNumber<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, HeaderByNumberRequest, HeaderByNumberRequestJson>): {
110
111
  result: () => HeaderByNumberReply;
111
112
  };
112
- logTrigger(config: FilterLogTriggerRequestJson): ClientLogTrigger;
113
- writeReport(runtime: Runtime<unknown>, input: WriteCreReportRequest | WriteCreReportRequestJson): {
113
+ logTrigger<TConfig extends FilterLogTriggerRequestJson>(config: NoExcess<TConfig, FilterLogTriggerRequestJson>): ClientLogTrigger;
114
+ writeReport<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, WriteCreReportRequest, WriteCreReportRequestJson>): {
114
115
  result: () => WriteReportReply;
115
116
  };
116
117
  }
@@ -0,0 +1,43 @@
1
+ import { type AccountMeta, type AccountMetaJson, type ComputeConfig, type ComputeConfigJson, type WriteReportReply, type WriteReportRequest } from '../../../../../generated/capabilities/blockchain/solana/v1alpha/client_pb';
2
+ import type { Runtime } from '../../../../../sdk';
3
+ import { Report } from '../../../../../sdk/report';
4
+ import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
5
+ export type WriteCreReportRequest = {
6
+ remainingAccounts: AccountMeta[];
7
+ receiver: Uint8Array;
8
+ computeConfig?: ComputeConfig;
9
+ report?: Report;
10
+ $report: true;
11
+ };
12
+ export type WriteCreReportRequestJson = {
13
+ remainingAccounts: AccountMetaJson[];
14
+ receiver: string;
15
+ computeConfig?: ComputeConfigJson;
16
+ report?: Report;
17
+ };
18
+ export declare function x_generatedCodeOnly_wrap_WriteCreReportRequest(input: WriteReportRequest): WriteCreReportRequest;
19
+ export declare function createWriteCreReportRequest(input: WriteCreReportRequestJson): WriteCreReportRequest;
20
+ export declare function x_generatedCodeOnly_unwrap_WriteCreReportRequest(input: WriteCreReportRequest): WriteReportRequest;
21
+ /**
22
+ * Client Capability
23
+ *
24
+ * Capability ID: solana@1.0.0
25
+ * Capability Name: solana
26
+ * Capability Version: 1.0.0
27
+ */
28
+ export declare class ClientCapability {
29
+ private readonly ChainSelector;
30
+ /** The capability ID for this service */
31
+ static readonly CAPABILITY_ID = "solana@1.0.0";
32
+ static readonly CAPABILITY_NAME = "solana";
33
+ static readonly CAPABILITY_VERSION = "1.0.0";
34
+ /** Available ChainSelector values */
35
+ static readonly SUPPORTED_CHAIN_SELECTORS: {
36
+ readonly 'solana-devnet': 16423721717087811551n;
37
+ readonly 'solana-mainnet': 124615329519749607n;
38
+ };
39
+ constructor(ChainSelector: bigint);
40
+ writeReport<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, WriteCreReportRequest, WriteCreReportRequestJson>): {
41
+ result: () => WriteReportReply;
42
+ };
43
+ }
@@ -0,0 +1,83 @@
1
+ import { create, fromJson } from '@bufbuild/protobuf';
2
+ import { AccountMetaSchema, ComputeConfigSchema, WriteReportReplySchema, WriteReportRequestSchema, } from '../../../../../generated/capabilities/blockchain/solana/v1alpha/client_pb';
3
+ import { ReportResponseSchema, } from '../../../../../generated/sdk/v1alpha/sdk_pb';
4
+ import { Report } from '../../../../../sdk/report';
5
+ import { hexToBytes } from '../../../../../sdk/utils/hex-utils';
6
+ export function x_generatedCodeOnly_wrap_WriteCreReportRequest(input) {
7
+ return {
8
+ remainingAccounts: input.remainingAccounts,
9
+ receiver: input.receiver,
10
+ computeConfig: input.computeConfig,
11
+ report: input.report !== undefined ? new Report(input.report) : undefined,
12
+ $report: true,
13
+ };
14
+ }
15
+ export function createWriteCreReportRequest(input) {
16
+ return {
17
+ remainingAccounts: (input.remainingAccounts ?? []).map((v) => fromJson(AccountMetaSchema, v)),
18
+ receiver: hexToBytes(input.receiver),
19
+ computeConfig: input.computeConfig !== undefined
20
+ ? fromJson(ComputeConfigSchema, input.computeConfig)
21
+ : undefined,
22
+ report: input.report,
23
+ $report: true,
24
+ };
25
+ }
26
+ export function x_generatedCodeOnly_unwrap_WriteCreReportRequest(input) {
27
+ return create(WriteReportRequestSchema, {
28
+ remainingAccounts: input.remainingAccounts,
29
+ receiver: input.receiver,
30
+ computeConfig: input.computeConfig,
31
+ report: input.report !== undefined ? input.report.x_generatedCodeOnly_unwrap() : undefined,
32
+ });
33
+ }
34
+ /**
35
+ * Client Capability
36
+ *
37
+ * Capability ID: solana@1.0.0
38
+ * Capability Name: solana
39
+ * Capability Version: 1.0.0
40
+ */
41
+ export class ClientCapability {
42
+ ChainSelector;
43
+ /** The capability ID for this service */
44
+ static CAPABILITY_ID = 'solana@1.0.0';
45
+ static CAPABILITY_NAME = 'solana';
46
+ static CAPABILITY_VERSION = '1.0.0';
47
+ /** Available ChainSelector values */
48
+ static SUPPORTED_CHAIN_SELECTORS = {
49
+ 'solana-devnet': 16423721717087811551n,
50
+ 'solana-mainnet': 124615329519749607n,
51
+ };
52
+ constructor(ChainSelector) {
53
+ this.ChainSelector = ChainSelector;
54
+ }
55
+ writeReport(runtime, input) {
56
+ // Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
57
+ let payload;
58
+ // Check if it's a wrapped type by looking for the $report property
59
+ if (input.$report) {
60
+ // It's a wrapped type, unwrap it
61
+ payload = x_generatedCodeOnly_unwrap_WriteCreReportRequest(input);
62
+ }
63
+ else {
64
+ // It's wrapped JSON, convert using create function
65
+ payload = x_generatedCodeOnly_unwrap_WriteCreReportRequest(createWriteCreReportRequest(input));
66
+ }
67
+ // Include all labels in capability ID for routing when specified
68
+ const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
69
+ const capabilityResponse = runtime.callCapability({
70
+ capabilityId,
71
+ method: 'WriteReport',
72
+ payload,
73
+ inputSchema: WriteReportRequestSchema,
74
+ outputSchema: WriteReportReplySchema,
75
+ });
76
+ return {
77
+ result: () => {
78
+ const result = capabilityResponse.result();
79
+ return result;
80
+ },
81
+ };
82
+ }
83
+ }
@@ -2,6 +2,7 @@ import { type ReportRequest, type ReportRequestJson, type SimpleConsensusInputs,
2
2
  import { type Value } from '../../../../../generated/values/v1/values_pb';
3
3
  import type { Runtime } from '../../../../../sdk';
4
4
  import { Report } from '../../../../../sdk/report';
5
+ import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
5
6
  /**
6
7
  * Consensus Capability
7
8
  *
@@ -14,10 +15,10 @@ export declare class ConsensusCapability {
14
15
  static readonly CAPABILITY_ID = "consensus@1.0.0-alpha";
15
16
  static readonly CAPABILITY_NAME = "consensus";
16
17
  static readonly CAPABILITY_VERSION = "1.0.0-alpha";
17
- simple(runtime: Runtime<unknown>, input: SimpleConsensusInputs | SimpleConsensusInputsJson): {
18
+ simple<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, SimpleConsensusInputs, SimpleConsensusInputsJson>): {
18
19
  result: () => Value;
19
20
  };
20
- report(runtime: Runtime<unknown>, input: ReportRequest | ReportRequestJson): {
21
+ report<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, ReportRequest, ReportRequestJson>): {
21
22
  result: () => Report;
22
23
  };
23
24
  }
@@ -1,5 +1,6 @@
1
1
  import { type ConfidentialHTTPRequest, type ConfidentialHTTPRequestJson, type HTTPResponse } from '../../../../../generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
2
2
  import type { Runtime } from '../../../../../sdk';
3
+ import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
3
4
  /**
4
5
  * Client Capability
5
6
  *
@@ -12,7 +13,7 @@ export declare class ClientCapability {
12
13
  static readonly CAPABILITY_ID = "confidential-http@1.0.0-alpha";
13
14
  static readonly CAPABILITY_NAME = "confidential-http";
14
15
  static readonly CAPABILITY_VERSION = "1.0.0-alpha";
15
- sendRequest(runtime: Runtime<unknown>, input: ConfidentialHTTPRequest | ConfidentialHTTPRequestJson): {
16
+ sendRequest<TInput>(runtime: Runtime<unknown>, input: CapabilityInput<TInput, ConfidentialHTTPRequest, ConfidentialHTTPRequestJson>): {
16
17
  result: () => HTTPResponse;
17
18
  };
18
19
  }
@@ -1,11 +1,12 @@
1
1
  import { type Request, type RequestJson, type Response } from '../../../../../generated/capabilities/networking/http/v1alpha/client_pb';
2
2
  import type { NodeRuntime, Runtime } from '../../../../../sdk';
3
3
  import type { ConsensusAggregation, PrimitiveTypes, UnwrapOptions } from '../../../../../sdk/utils';
4
+ import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
4
5
  export declare class SendRequester {
5
6
  private readonly runtime;
6
7
  private readonly client;
7
8
  constructor(runtime: NodeRuntime<unknown>, client: ClientCapability);
8
- sendRequest(input: Request | RequestJson): {
9
+ sendRequest<TInput>(input: CapabilityInput<TInput, Request, RequestJson>): {
9
10
  result: () => Response;
10
11
  };
11
12
  }
@@ -21,7 +22,7 @@ export declare class ClientCapability {
21
22
  static readonly CAPABILITY_ID = "http-actions@1.0.0-alpha";
22
23
  static readonly CAPABILITY_NAME = "http-actions";
23
24
  static readonly CAPABILITY_VERSION = "1.0.0-alpha";
24
- sendRequest(runtime: NodeRuntime<unknown>, input: Request | RequestJson): {
25
+ sendRequest<TInput>(runtime: NodeRuntime<unknown>, input: CapabilityInput<TInput, Request, RequestJson>): {
25
26
  result: () => Response;
26
27
  };
27
28
  sendRequest<TArgs extends unknown[], TOutput>(runtime: Runtime<unknown>, fn: (sendRequester: SendRequester, ...args: TArgs) => TOutput, consensusAggregation: ConsensusAggregation<TOutput, true>, unwrapOptions?: TOutput extends PrimitiveTypes ? never : UnwrapOptions<TOutput>): (...args: TArgs) => {
@@ -1,6 +1,7 @@
1
1
  import { type Any } from '@bufbuild/protobuf/wkt';
2
2
  import { type Config, type ConfigJson, type Payload } from '../../../../../generated/capabilities/networking/http/v1alpha/trigger_pb';
3
3
  import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
4
+ import type { NoExcess } from '../../../../../sdk/utils/types/no-excess';
4
5
  /**
5
6
  * HTTP Capability
6
7
  *
@@ -13,7 +14,7 @@ export declare class HTTPCapability {
13
14
  static readonly CAPABILITY_ID = "http-trigger@1.0.0-alpha";
14
15
  static readonly CAPABILITY_NAME = "http-trigger";
15
16
  static readonly CAPABILITY_VERSION = "1.0.0-alpha";
16
- trigger(config: ConfigJson): HTTPTrigger;
17
+ trigger<TConfig extends ConfigJson>(config: NoExcess<TConfig, ConfigJson>): HTTPTrigger;
17
18
  }
18
19
  /**
19
20
  * Trigger implementation for Trigger
@@ -1,6 +1,7 @@
1
1
  import { type Any } from '@bufbuild/protobuf/wkt';
2
2
  import { type Config, type ConfigJson, type Payload } from '../../../../../generated/capabilities/scheduler/cron/v1/trigger_pb';
3
3
  import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
4
+ import type { NoExcess } from '../../../../../sdk/utils/types/no-excess';
4
5
  /**
5
6
  * Cron Capability
6
7
  *
@@ -13,7 +14,7 @@ export declare class CronCapability {
13
14
  static readonly CAPABILITY_ID = "cron-trigger@1.0.0";
14
15
  static readonly CAPABILITY_NAME = "cron-trigger";
15
16
  static readonly CAPABILITY_VERSION = "1.0.0";
16
- trigger(config: ConfigJson): CronTrigger;
17
+ trigger<TConfig extends ConfigJson>(config: NoExcess<TConfig, ConfigJson>): CronTrigger;
17
18
  }
18
19
  /**
19
20
  * Trigger implementation for Trigger
package/dist/pb.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * as EVM_PB from './generated/capabilities/blockchain/evm/v1alpha/client_pb';
2
+ export * as SOLANA_PB from './generated/capabilities/blockchain/solana/v1alpha/client_pb';
2
3
  export * as CONFIDENTIAL_HTTP_CLIENT_PB from './generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
3
4
  export * as HTTP_CLIENT_PB from './generated/capabilities/networking/http/v1alpha/client_pb';
4
5
  export * as HTTP_TRIGGER_PB from './generated/capabilities/networking/http/v1alpha/trigger_pb';
package/dist/pb.js CHANGED
@@ -1,4 +1,5 @@
1
1
  export * as EVM_PB from './generated/capabilities/blockchain/evm/v1alpha/client_pb';
2
+ export * as SOLANA_PB from './generated/capabilities/blockchain/solana/v1alpha/client_pb';
2
3
  export * as CONFIDENTIAL_HTTP_CLIENT_PB from './generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
3
4
  export * as HTTP_CLIENT_PB from './generated/capabilities/networking/http/v1alpha/client_pb';
4
5
  export * as HTTP_TRIGGER_PB from './generated/capabilities/networking/http/v1alpha/trigger_pb';