@chainlink/cre-sdk 1.17.0-alpha.1 → 1.17.0-alpha.2
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.
- package/README.md +62 -2
- package/dist/generated/chain-selectors/testnet/evm/glamsterdam-devnet-6.d.ts +3 -0
- package/dist/generated/chain-selectors/testnet/evm/glamsterdam-devnet-6.js +12 -0
- package/dist/generated/chain-selectors/testnet/evm/t-rex-testnet.d.ts +3 -0
- package/dist/generated/chain-selectors/testnet/evm/t-rex-testnet.js +12 -0
- package/dist/generated/networks.d.ts +1 -1
- package/dist/generated/networks.js +14 -0
- package/dist/generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen.d.ts +0 -13
- package/dist/generated-sdk/capabilities/blockchain/evm/v1alpha/client_sdk_gen.js +0 -94
- package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.d.ts +0 -15
- package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.js +0 -116
- package/dist/generated-sdk/capabilities/internal/consensus/v1alpha/consensus_sdk_gen.d.ts +1 -5
- package/dist/generated-sdk/capabilities/internal/consensus/v1alpha/consensus_sdk_gen.js +0 -22
- package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.d.ts +0 -4
- package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.js +0 -12
- package/dist/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.d.ts +1 -11
- package/dist/generated-sdk/capabilities/networking/http/v1alpha/client_sdk_gen.js +0 -12
- package/dist/generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen.d.ts +0 -2
- package/dist/generated-sdk/capabilities/networking/http/v1alpha/http_sdk_gen.js +0 -2
- package/dist/generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen.d.ts +0 -2
- package/dist/generated-sdk/capabilities/scheduler/cron/v1/cron_sdk_gen.js +0 -2
- package/dist/sdk/cre/index.d.ts +16 -31
- package/dist/sdk/cre/index.js +15 -30
- package/dist/sdk/impl/runtime-impl.d.ts +1 -28
- package/dist/sdk/impl/runtime-impl.js +1 -52
- package/dist/sdk/runtime.d.ts +1 -23
- package/dist/sdk/test/contract-mock-core.d.ts +16 -0
- package/dist/sdk/test/contract-mock-core.js +21 -0
- package/dist/sdk/test/evm-contract-mock.js +60 -58
- package/dist/sdk/test/generated/index.d.ts +0 -1
- package/dist/sdk/test/generated/index.js +0 -1
- package/dist/sdk/test/index.d.ts +1 -0
- package/dist/sdk/test/index.js +1 -0
- package/dist/sdk/test/solana-contract-mock.d.ts +54 -0
- package/dist/sdk/test/solana-contract-mock.js +63 -0
- package/dist/sdk/testutils/index.d.ts +1 -1
- package/dist/sdk/testutils/index.js +1 -1
- package/dist/sdk/testutils/test-runtime.d.ts +4 -17
- package/dist/sdk/testutils/test-runtime.js +5 -31
- package/dist/sdk/testutils/test-writer.d.ts +1 -7
- package/dist/sdk/testutils/test-writer.js +1 -13
- package/dist/sdk/types/global.d.ts +0 -8
- package/dist/sdk/utils/capabilities/blockchain/{blockchain-helpers.d.ts → evm/evm-helpers.d.ts} +7 -6
- package/dist/sdk/utils/capabilities/blockchain/{blockchain-helpers.js → evm/evm-helpers.js} +6 -8
- package/dist/sdk/utils/capabilities/blockchain/report-helpers.d.ts +19 -0
- package/dist/sdk/utils/capabilities/blockchain/report-helpers.js +16 -0
- package/dist/sdk/utils/capabilities/blockchain/solana/solana-helpers.d.ts +165 -0
- package/dist/sdk/utils/capabilities/blockchain/solana/solana-helpers.js +176 -0
- package/dist/sdk/utils/hex-utils.d.ts +6 -0
- package/dist/sdk/utils/hex-utils.js +8 -0
- package/dist/sdk/utils/index.d.ts +4 -1
- package/dist/sdk/utils/index.js +3 -1
- package/dist/sdk/utils/triggers/trigger-interface.d.ts +7 -0
- package/dist/sdk/utils/triggers/trigger-interface.js +13 -1
- package/dist/sdk/wasm/host-bindings.d.ts +0 -4
- package/dist/sdk/wasm/host-bindings.js +0 -4
- package/dist/sdk/wasm/runner.d.ts +4 -10
- package/dist/sdk/wasm/runner.js +13 -86
- package/dist/sdk/wasm/runtime.d.ts +1 -4
- package/dist/sdk/wasm/runtime.js +1 -9
- package/dist/sdk/workflow.d.ts +7 -16
- package/dist/sdk/workflow.js +2 -10
- package/package.json +7 -4
- package/scripts/src/generate-sdks.ts +0 -6
- package/dist/generated/capabilities/blockchain/aptos/v1alpha/client_pb.d.ts +0 -1035
- package/dist/generated/capabilities/blockchain/aptos/v1alpha/client_pb.js +0 -290
- package/dist/generated/workflows/v2/cre_info_pb.d.ts +0 -123
- package/dist/generated/workflows/v2/cre_info_pb.js +0 -17
- package/dist/generated/workflows/v2/workflow_key_pb.d.ts +0 -55
- package/dist/generated/workflows/v2/workflow_key_pb.js +0 -17
- package/dist/generated/workflows/v2/workflow_user_metric_pb.d.ts +0 -118
- package/dist/generated/workflows/v2/workflow_user_metric_pb.js +0 -41
- package/dist/generated-sdk/capabilities/blockchain/aptos/v1alpha/client_sdk_gen.d.ts +0 -63
- package/dist/generated-sdk/capabilities/blockchain/aptos/v1alpha/client_sdk_gen.js +0 -247
- package/dist/sdk/tee-constraints.d.ts +0 -68
- package/dist/sdk/tee-constraints.js +0 -59
- package/dist/sdk/test/generated/capabilities/blockchain/aptos/v1alpha/aptos_mock_gen.d.ts +0 -25
- package/dist/sdk/test/generated/capabilities/blockchain/aptos/v1alpha/aptos_mock_gen.js +0 -111
- package/dist/workflows/standard_tests/restrictions/test.ts +0 -41
- package/dist/workflows/standard_tests/tee_runtime/test.ts +0 -29
package/README.md
CHANGED
|
@@ -86,10 +86,10 @@ This TypeScript CRE SDK also includes some reference examples - [cre-sdk-example
|
|
|
86
86
|
|
|
87
87
|
You can run and debug your TypeScript workflows locally using [the CRE CLI's](https://github.com/smartcontractkit/cre-cli) simulation functionality.
|
|
88
88
|
|
|
89
|
-
Make sure you `cd` into the directory that contain's your workflow's TypeScript file and the associated
|
|
89
|
+
Make sure you `cd` into the directory that contain's your workflow's TypeScript file and the associated config file. Then:
|
|
90
90
|
|
|
91
91
|
```bash
|
|
92
|
-
cre workflow simulate --target
|
|
92
|
+
cre workflow simulate --target staging-settings --config config.staging.json main.ts
|
|
93
93
|
```
|
|
94
94
|
|
|
95
95
|
When simulating workflows that write to the blockchain, remember to pass extra flag `--broadcast` to broadcast the transactions to the blockchain.
|
|
@@ -237,6 +237,66 @@ const onCronTrigger = (runtime: Runtime<Config>) => {
|
|
|
237
237
|
};
|
|
238
238
|
```
|
|
239
239
|
|
|
240
|
+
### Solana Write Reports
|
|
241
|
+
|
|
242
|
+
The Solana capability is **write-only**: reports are delivered through the
|
|
243
|
+
keystone-forwarder to a receiver program's `on_report` entrypoint as a bare
|
|
244
|
+
Borsh-encoded struct. The SDK ships the write plumbing under
|
|
245
|
+
`utils/capabilities/blockchain/solana`:
|
|
246
|
+
|
|
247
|
+
- `calculateAccountsHash(accounts)` — sha256 of the concatenated account
|
|
248
|
+
public keys (the forwarder's on-chain account verification),
|
|
249
|
+
- `encodeForwarderReport({ accountHash, payload })` — the
|
|
250
|
+
`[32-byte hash][u32-LE len][payload]` forwarder envelope,
|
|
251
|
+
- `encodeBorshVecU32(elements)` — Borsh `Vec` of pre-encoded elements,
|
|
252
|
+
- `prepareSolanaReportRequest(payload)` — report request with the Solana
|
|
253
|
+
encoder (`solana`/`ecdsa`/`keccak256`),
|
|
254
|
+
- `solanaAccountMeta(publicKey, isWritable)` / `solanaAddressToBytes(base58)`.
|
|
255
|
+
|
|
256
|
+
The wire format is byte-identical to the Go SDK's
|
|
257
|
+
`capabilities/blockchain/solana/bindings` package.
|
|
258
|
+
|
|
259
|
+
Generate typed per-program bindings from an Anchor IDL with the CRE CLI:
|
|
260
|
+
|
|
261
|
+
```bash
|
|
262
|
+
cre generate-bindings solana --language typescript
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
```typescript
|
|
266
|
+
import { cre, type Runtime, solanaAccountMeta, SolanaClient } from "@chainlink/cre-sdk";
|
|
267
|
+
import { DataStorage } from "../contracts/solana/ts/generated";
|
|
268
|
+
|
|
269
|
+
const onTrigger = (runtime: Runtime<Config>) => {
|
|
270
|
+
const client = new SolanaClient(SolanaClient.SUPPORTED_CHAIN_SELECTORS["solana-devnet"]);
|
|
271
|
+
const dataStorage = new DataStorage(client); // program ID baked in from the IDL
|
|
272
|
+
|
|
273
|
+
// remainingAccounts: forwarderState, forwarderAuthority PDA, then receiver accounts
|
|
274
|
+
const remainingAccounts = [
|
|
275
|
+
solanaAccountMeta(forwarderState),
|
|
276
|
+
solanaAccountMeta(forwarderAuthority),
|
|
277
|
+
solanaAccountMeta(receiverDataAccount, true),
|
|
278
|
+
];
|
|
279
|
+
|
|
280
|
+
const reply = dataStorage.writeReportFromUserData(
|
|
281
|
+
runtime,
|
|
282
|
+
{ key: "answer", value: "42" },
|
|
283
|
+
remainingAccounts,
|
|
284
|
+
);
|
|
285
|
+
runtime.log(`tx status: ${reply.txStatus}`);
|
|
286
|
+
};
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
In tests, intercept writes with the generated mock:
|
|
290
|
+
|
|
291
|
+
```typescript
|
|
292
|
+
import { SolanaMock } from "@chainlink/cre-sdk/test";
|
|
293
|
+
import { newDataStorageMock } from "../contracts/solana/ts/generated";
|
|
294
|
+
|
|
295
|
+
const solanaMock = SolanaMock.testInstance(chainSelector);
|
|
296
|
+
const dataStorage = newDataStorageMock(solanaMock);
|
|
297
|
+
dataStorage.writeReport = ({ report }) => ({ txStatus: "TX_STATUS_SUCCESS" });
|
|
298
|
+
```
|
|
299
|
+
|
|
240
300
|
## Configuration & Type Safety
|
|
241
301
|
|
|
242
302
|
You, the developer, must declare config files in config.json files, co-located with your TypeScript workflow definition.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file is auto-generated. Do not edit manually.
|
|
2
|
+
// Generated from: https://github.com/smartcontractkit/chain-selectors
|
|
3
|
+
const network = {
|
|
4
|
+
chainId: '7052886157',
|
|
5
|
+
chainSelector: {
|
|
6
|
+
name: 'glamsterdam-devnet-6',
|
|
7
|
+
selector: 410896468069059699n,
|
|
8
|
+
},
|
|
9
|
+
chainFamily: 'evm',
|
|
10
|
+
networkType: 'testnet',
|
|
11
|
+
};
|
|
12
|
+
export default network;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// This file is auto-generated. Do not edit manually.
|
|
2
|
+
// Generated from: https://github.com/smartcontractkit/chain-selectors
|
|
3
|
+
const network = {
|
|
4
|
+
chainId: '364301',
|
|
5
|
+
chainSelector: {
|
|
6
|
+
name: 't-rex-testnet',
|
|
7
|
+
selector: 17611928792452358269n,
|
|
8
|
+
},
|
|
9
|
+
chainFamily: 'evm',
|
|
10
|
+
networkType: 'testnet',
|
|
11
|
+
};
|
|
12
|
+
export default network;
|
|
@@ -9,7 +9,7 @@ export declare const mainnet: {
|
|
|
9
9
|
readonly tron: readonly [NetworkInfo];
|
|
10
10
|
};
|
|
11
11
|
export declare const testnet: {
|
|
12
|
-
readonly evm: readonly [NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo];
|
|
12
|
+
readonly evm: readonly [NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo, NetworkInfo];
|
|
13
13
|
readonly solana: readonly [NetworkInfo, NetworkInfo];
|
|
14
14
|
readonly aptos: readonly [NetworkInfo, NetworkInfo];
|
|
15
15
|
readonly sui: readonly [NetworkInfo, NetworkInfo];
|
|
@@ -214,6 +214,7 @@ import testnet_evm_gate_chain_testnet_meteora from './chain-selectors/testnet/ev
|
|
|
214
214
|
import testnet_evm_gate_layer_testnet from './chain-selectors/testnet/evm/gate-layer-testnet';
|
|
215
215
|
import testnet_evm_geth_testnet from './chain-selectors/testnet/evm/geth-testnet';
|
|
216
216
|
import testnet_evm_glamsterdam_devnet_5 from './chain-selectors/testnet/evm/glamsterdam-devnet-5';
|
|
217
|
+
import testnet_evm_glamsterdam_devnet_6 from './chain-selectors/testnet/evm/glamsterdam-devnet-6';
|
|
217
218
|
import testnet_evm_gnosis_chain_testnet_chiado from './chain-selectors/testnet/evm/gnosis.chain-testnet-chiado';
|
|
218
219
|
import testnet_evm_hedera_testnet from './chain-selectors/testnet/evm/hedera-testnet';
|
|
219
220
|
import testnet_evm_hemi_testnet_sepolia from './chain-selectors/testnet/evm/hemi-testnet-sepolia';
|
|
@@ -266,6 +267,7 @@ import testnet_evm_sonic_testnet_blaze from './chain-selectors/testnet/evm/sonic
|
|
|
266
267
|
import testnet_evm_stable_testnet from './chain-selectors/testnet/evm/stable-testnet';
|
|
267
268
|
import testnet_evm_story_testnet from './chain-selectors/testnet/evm/story-testnet';
|
|
268
269
|
import testnet_evm_superseed_testnet from './chain-selectors/testnet/evm/superseed-testnet';
|
|
270
|
+
import testnet_evm_t_rex_testnet from './chain-selectors/testnet/evm/t-rex-testnet';
|
|
269
271
|
import testnet_evm_tac_testnet from './chain-selectors/testnet/evm/tac-testnet';
|
|
270
272
|
import testnet_evm_telos_evm_testnet from './chain-selectors/testnet/evm/telos-evm-testnet';
|
|
271
273
|
import testnet_evm_tempo_testnet from './chain-selectors/testnet/evm/tempo-testnet';
|
|
@@ -517,6 +519,7 @@ export const allNetworks = [
|
|
|
517
519
|
testnet_evm_bitcoin_testnet_bitlayer_1,
|
|
518
520
|
mainnet_evm_bitcoin_mainnet_bitlayer_1,
|
|
519
521
|
testnet_evm_ethereum_testnet_sepolia_ronin_1,
|
|
522
|
+
testnet_evm_t_rex_testnet,
|
|
520
523
|
testnet_evm_ethereum_testnet_goerli_arbitrum_1,
|
|
521
524
|
testnet_evm_ethereum_testnet_sepolia_arbitrum_1,
|
|
522
525
|
testnet_evm_private_testnet_mica,
|
|
@@ -565,6 +568,7 @@ export const allNetworks = [
|
|
|
565
568
|
testnet_evm_tron_testnet_shasta_evm,
|
|
566
569
|
testnet_evm_tron_devnet_evm,
|
|
567
570
|
testnet_evm_tron_testnet_nile_evm,
|
|
571
|
+
testnet_evm_glamsterdam_devnet_6,
|
|
568
572
|
testnet_evm_glamsterdam_devnet_5,
|
|
569
573
|
mainnet_solana_solana_mainnet,
|
|
570
574
|
testnet_solana_solana_testnet,
|
|
@@ -831,6 +835,7 @@ export const testnet = {
|
|
|
831
835
|
testnet_evm_mind_testnet,
|
|
832
836
|
testnet_evm_bitcoin_testnet_bitlayer_1,
|
|
833
837
|
testnet_evm_ethereum_testnet_sepolia_ronin_1,
|
|
838
|
+
testnet_evm_t_rex_testnet,
|
|
834
839
|
testnet_evm_ethereum_testnet_goerli_arbitrum_1,
|
|
835
840
|
testnet_evm_ethereum_testnet_sepolia_arbitrum_1,
|
|
836
841
|
testnet_evm_private_testnet_mica,
|
|
@@ -867,6 +872,7 @@ export const testnet = {
|
|
|
867
872
|
testnet_evm_tron_testnet_shasta_evm,
|
|
868
873
|
testnet_evm_tron_devnet_evm,
|
|
869
874
|
testnet_evm_tron_testnet_nile_evm,
|
|
875
|
+
testnet_evm_glamsterdam_devnet_6,
|
|
870
876
|
testnet_evm_glamsterdam_devnet_5,
|
|
871
877
|
],
|
|
872
878
|
solana: [testnet_solana_solana_testnet, testnet_solana_solana_devnet],
|
|
@@ -1125,6 +1131,7 @@ export const testnetBySelector = new Map([
|
|
|
1125
1131
|
[7189150270347329685n, testnet_evm_mind_testnet],
|
|
1126
1132
|
[3789623672476206327n, testnet_evm_bitcoin_testnet_bitlayer_1],
|
|
1127
1133
|
[1091131740251125869n, testnet_evm_ethereum_testnet_sepolia_ronin_1],
|
|
1134
|
+
[17611928792452358269n, testnet_evm_t_rex_testnet],
|
|
1128
1135
|
[6101244977088475029n, testnet_evm_ethereum_testnet_goerli_arbitrum_1],
|
|
1129
1136
|
[3478487238524512106n, testnet_evm_ethereum_testnet_sepolia_arbitrum_1],
|
|
1130
1137
|
[4489326297382772450n, testnet_evm_private_testnet_mica],
|
|
@@ -1161,6 +1168,7 @@ export const testnetBySelector = new Map([
|
|
|
1161
1168
|
[13231703482326770598n, testnet_evm_tron_testnet_shasta_evm],
|
|
1162
1169
|
[13231703482326770600n, testnet_evm_tron_devnet_evm],
|
|
1163
1170
|
[2052925811360307749n, testnet_evm_tron_testnet_nile_evm],
|
|
1171
|
+
[410896468069059699n, testnet_evm_glamsterdam_devnet_6],
|
|
1164
1172
|
[10073034426865795585n, testnet_evm_glamsterdam_devnet_5],
|
|
1165
1173
|
[6302590918974934319n, testnet_solana_solana_testnet],
|
|
1166
1174
|
[16423721717087811551n, testnet_solana_solana_devnet],
|
|
@@ -1429,6 +1437,7 @@ export const testnetByName = new Map([
|
|
|
1429
1437
|
['mind-testnet', testnet_evm_mind_testnet],
|
|
1430
1438
|
['bitcoin-testnet-bitlayer-1', testnet_evm_bitcoin_testnet_bitlayer_1],
|
|
1431
1439
|
['ethereum-testnet-sepolia-ronin-1', testnet_evm_ethereum_testnet_sepolia_ronin_1],
|
|
1440
|
+
['t-rex-testnet', testnet_evm_t_rex_testnet],
|
|
1432
1441
|
['ethereum-testnet-goerli-arbitrum-1', testnet_evm_ethereum_testnet_goerli_arbitrum_1],
|
|
1433
1442
|
['ethereum-testnet-sepolia-arbitrum-1', testnet_evm_ethereum_testnet_sepolia_arbitrum_1],
|
|
1434
1443
|
['private-testnet-mica', testnet_evm_private_testnet_mica],
|
|
@@ -1471,6 +1480,7 @@ export const testnetByName = new Map([
|
|
|
1471
1480
|
['tron-testnet-shasta-evm', testnet_evm_tron_testnet_shasta_evm],
|
|
1472
1481
|
['tron-devnet-evm', testnet_evm_tron_devnet_evm],
|
|
1473
1482
|
['tron-testnet-nile-evm', testnet_evm_tron_testnet_nile_evm],
|
|
1483
|
+
['glamsterdam-devnet-6', testnet_evm_glamsterdam_devnet_6],
|
|
1474
1484
|
['glamsterdam-devnet-5', testnet_evm_glamsterdam_devnet_5],
|
|
1475
1485
|
['solana-testnet', testnet_solana_solana_testnet],
|
|
1476
1486
|
['solana-devnet', testnet_solana_solana_devnet],
|
|
@@ -1733,6 +1743,7 @@ export const testnetBySelectorByFamily = {
|
|
|
1733
1743
|
[7189150270347329685n, testnet_evm_mind_testnet],
|
|
1734
1744
|
[3789623672476206327n, testnet_evm_bitcoin_testnet_bitlayer_1],
|
|
1735
1745
|
[1091131740251125869n, testnet_evm_ethereum_testnet_sepolia_ronin_1],
|
|
1746
|
+
[17611928792452358269n, testnet_evm_t_rex_testnet],
|
|
1736
1747
|
[6101244977088475029n, testnet_evm_ethereum_testnet_goerli_arbitrum_1],
|
|
1737
1748
|
[3478487238524512106n, testnet_evm_ethereum_testnet_sepolia_arbitrum_1],
|
|
1738
1749
|
[4489326297382772450n, testnet_evm_private_testnet_mica],
|
|
@@ -1769,6 +1780,7 @@ export const testnetBySelectorByFamily = {
|
|
|
1769
1780
|
[13231703482326770598n, testnet_evm_tron_testnet_shasta_evm],
|
|
1770
1781
|
[13231703482326770600n, testnet_evm_tron_devnet_evm],
|
|
1771
1782
|
[2052925811360307749n, testnet_evm_tron_testnet_nile_evm],
|
|
1783
|
+
[410896468069059699n, testnet_evm_glamsterdam_devnet_6],
|
|
1772
1784
|
[10073034426865795585n, testnet_evm_glamsterdam_devnet_5],
|
|
1773
1785
|
]),
|
|
1774
1786
|
solana: new Map([
|
|
@@ -2054,6 +2066,7 @@ export const testnetByNameByFamily = {
|
|
|
2054
2066
|
['mind-testnet', testnet_evm_mind_testnet],
|
|
2055
2067
|
['bitcoin-testnet-bitlayer-1', testnet_evm_bitcoin_testnet_bitlayer_1],
|
|
2056
2068
|
['ethereum-testnet-sepolia-ronin-1', testnet_evm_ethereum_testnet_sepolia_ronin_1],
|
|
2069
|
+
['t-rex-testnet', testnet_evm_t_rex_testnet],
|
|
2057
2070
|
['ethereum-testnet-goerli-arbitrum-1', testnet_evm_ethereum_testnet_goerli_arbitrum_1],
|
|
2058
2071
|
['ethereum-testnet-sepolia-arbitrum-1', testnet_evm_ethereum_testnet_sepolia_arbitrum_1],
|
|
2059
2072
|
['private-testnet-mica', testnet_evm_private_testnet_mica],
|
|
@@ -2096,6 +2109,7 @@ export const testnetByNameByFamily = {
|
|
|
2096
2109
|
['tron-testnet-shasta-evm', testnet_evm_tron_testnet_shasta_evm],
|
|
2097
2110
|
['tron-devnet-evm', testnet_evm_tron_devnet_evm],
|
|
2098
2111
|
['tron-testnet-nile-evm', testnet_evm_tron_testnet_nile_evm],
|
|
2112
|
+
['glamsterdam-devnet-6', testnet_evm_glamsterdam_devnet_6],
|
|
2099
2113
|
['glamsterdam-devnet-5', testnet_evm_glamsterdam_devnet_5],
|
|
2100
2114
|
]),
|
|
2101
2115
|
solana: new Map([
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Any } from '@bufbuild/protobuf/wkt';
|
|
2
2
|
import { type BalanceAtReply, type BalanceAtRequest, type BalanceAtRequestJson, type CallContractReply, type CallContractRequest, type CallContractRequestJson, type EstimateGasReply, type EstimateGasRequest, type EstimateGasRequestJson, type FilterLogsReply, type FilterLogsRequest, type FilterLogsRequestJson, type FilterLogTriggerRequest, type FilterLogTriggerRequestJson, type GasConfig, type GasConfigJson, type GetTransactionByHashReply, type GetTransactionByHashRequest, type GetTransactionByHashRequestJson, type GetTransactionReceiptReply, type GetTransactionReceiptRequest, type GetTransactionReceiptRequestJson, type HeaderByNumberReply, type HeaderByNumberRequest, type HeaderByNumberRequestJson, type Log, type WriteReportReply, type WriteReportRequest } from '../../../../../generated/capabilities/blockchain/evm/v1alpha/client_pb';
|
|
3
|
-
import { type CapabilityRestrictionJson } from '../../../../../generated/sdk/v1alpha/sdk_pb';
|
|
4
3
|
import type { Runtime } from '../../../../../sdk';
|
|
5
4
|
import { Report } from '../../../../../sdk/report';
|
|
6
5
|
import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
|
|
@@ -140,16 +139,4 @@ declare class ClientLogTrigger implements Trigger<Log, Log> {
|
|
|
140
139
|
*/
|
|
141
140
|
adapt(rawOutput: Log): Log;
|
|
142
141
|
}
|
|
143
|
-
export declare class ClientRestrictor {
|
|
144
|
-
private readonly ChainSelector;
|
|
145
|
-
constructor(ChainSelector: bigint);
|
|
146
|
-
limitCallContract(maxCalls: number): CapabilityRestrictionJson;
|
|
147
|
-
limitFilterLogs(maxCalls: number): CapabilityRestrictionJson;
|
|
148
|
-
limitBalanceAt(maxCalls: number): CapabilityRestrictionJson;
|
|
149
|
-
limitEstimateGas(maxCalls: number): CapabilityRestrictionJson;
|
|
150
|
-
limitGetTransactionByHash(maxCalls: number): CapabilityRestrictionJson;
|
|
151
|
-
limitGetTransactionReceipt(maxCalls: number): CapabilityRestrictionJson;
|
|
152
|
-
limitHeaderByNumber(maxCalls: number): CapabilityRestrictionJson;
|
|
153
|
-
limitWriteReport(maxCalls: number): CapabilityRestrictionJson;
|
|
154
|
-
}
|
|
155
142
|
export {};
|
|
@@ -363,97 +363,3 @@ class ClientLogTrigger {
|
|
|
363
363
|
return rawOutput;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
export class ClientRestrictor {
|
|
367
|
-
ChainSelector;
|
|
368
|
-
constructor(ChainSelector) {
|
|
369
|
-
this.ChainSelector = ChainSelector;
|
|
370
|
-
}
|
|
371
|
-
limitCallContract(maxCalls) {
|
|
372
|
-
// Include all labels in capability ID for routing when specified
|
|
373
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
374
|
-
return {
|
|
375
|
-
method: {
|
|
376
|
-
id: capabilityId,
|
|
377
|
-
method: 'CallContract',
|
|
378
|
-
maxCalls,
|
|
379
|
-
},
|
|
380
|
-
};
|
|
381
|
-
}
|
|
382
|
-
limitFilterLogs(maxCalls) {
|
|
383
|
-
// Include all labels in capability ID for routing when specified
|
|
384
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
385
|
-
return {
|
|
386
|
-
method: {
|
|
387
|
-
id: capabilityId,
|
|
388
|
-
method: 'FilterLogs',
|
|
389
|
-
maxCalls,
|
|
390
|
-
},
|
|
391
|
-
};
|
|
392
|
-
}
|
|
393
|
-
limitBalanceAt(maxCalls) {
|
|
394
|
-
// Include all labels in capability ID for routing when specified
|
|
395
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
396
|
-
return {
|
|
397
|
-
method: {
|
|
398
|
-
id: capabilityId,
|
|
399
|
-
method: 'BalanceAt',
|
|
400
|
-
maxCalls,
|
|
401
|
-
},
|
|
402
|
-
};
|
|
403
|
-
}
|
|
404
|
-
limitEstimateGas(maxCalls) {
|
|
405
|
-
// Include all labels in capability ID for routing when specified
|
|
406
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
407
|
-
return {
|
|
408
|
-
method: {
|
|
409
|
-
id: capabilityId,
|
|
410
|
-
method: 'EstimateGas',
|
|
411
|
-
maxCalls,
|
|
412
|
-
},
|
|
413
|
-
};
|
|
414
|
-
}
|
|
415
|
-
limitGetTransactionByHash(maxCalls) {
|
|
416
|
-
// Include all labels in capability ID for routing when specified
|
|
417
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
418
|
-
return {
|
|
419
|
-
method: {
|
|
420
|
-
id: capabilityId,
|
|
421
|
-
method: 'GetTransactionByHash',
|
|
422
|
-
maxCalls,
|
|
423
|
-
},
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
limitGetTransactionReceipt(maxCalls) {
|
|
427
|
-
// Include all labels in capability ID for routing when specified
|
|
428
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
429
|
-
return {
|
|
430
|
-
method: {
|
|
431
|
-
id: capabilityId,
|
|
432
|
-
method: 'GetTransactionReceipt',
|
|
433
|
-
maxCalls,
|
|
434
|
-
},
|
|
435
|
-
};
|
|
436
|
-
}
|
|
437
|
-
limitHeaderByNumber(maxCalls) {
|
|
438
|
-
// Include all labels in capability ID for routing when specified
|
|
439
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
440
|
-
return {
|
|
441
|
-
method: {
|
|
442
|
-
id: capabilityId,
|
|
443
|
-
method: 'HeaderByNumber',
|
|
444
|
-
maxCalls,
|
|
445
|
-
},
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
limitWriteReport(maxCalls) {
|
|
449
|
-
// Include all labels in capability ID for routing when specified
|
|
450
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
451
|
-
return {
|
|
452
|
-
method: {
|
|
453
|
-
id: capabilityId,
|
|
454
|
-
method: 'WriteReport',
|
|
455
|
-
maxCalls,
|
|
456
|
-
},
|
|
457
|
-
};
|
|
458
|
-
}
|
|
459
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Any } from '@bufbuild/protobuf/wkt';
|
|
2
2
|
import { type AccountMeta, type AccountMetaJson, type ComputeConfig, type ComputeConfigJson, type FilterLogTriggerRequest, type FilterLogTriggerRequestJson, type GetAccountInfoWithOptsReply, type GetAccountInfoWithOptsRequest, type GetAccountInfoWithOptsRequestJson, type GetBalanceReply, type GetBalanceRequest, type GetBalanceRequestJson, type GetBlockReply, type GetBlockRequest, type GetBlockRequestJson, type GetFeeForMessageReply, type GetFeeForMessageRequest, type GetFeeForMessageRequestJson, type GetMultipleAccountsWithOptsReply, type GetMultipleAccountsWithOptsRequest, type GetMultipleAccountsWithOptsRequestJson, type GetProgramAccountsReply, type GetProgramAccountsRequest, type GetProgramAccountsRequestJson, type GetSignatureStatusesReply, type GetSignatureStatusesRequest, type GetSignatureStatusesRequestJson, type GetSlotHeightReply, type GetSlotHeightRequest, type GetSlotHeightRequestJson, type GetTransactionReply, type GetTransactionRequest, type GetTransactionRequestJson, type Log, type WriteReportReply, type WriteReportRequest } from '../../../../../generated/capabilities/blockchain/solana/v1alpha/client_pb';
|
|
3
|
-
import { type CapabilityRestrictionJson } from '../../../../../generated/sdk/v1alpha/sdk_pb';
|
|
4
3
|
import type { Runtime } from '../../../../../sdk';
|
|
5
4
|
import { Report } from '../../../../../sdk/report';
|
|
6
5
|
import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
|
|
@@ -93,18 +92,4 @@ declare class ClientLogTrigger implements Trigger<Log, Log> {
|
|
|
93
92
|
*/
|
|
94
93
|
adapt(rawOutput: Log): Log;
|
|
95
94
|
}
|
|
96
|
-
export declare class ClientRestrictor {
|
|
97
|
-
private readonly ChainSelector;
|
|
98
|
-
constructor(ChainSelector: bigint);
|
|
99
|
-
limitGetAccountInfoWithOpts(maxCalls: number): CapabilityRestrictionJson;
|
|
100
|
-
limitGetBalance(maxCalls: number): CapabilityRestrictionJson;
|
|
101
|
-
limitGetBlock(maxCalls: number): CapabilityRestrictionJson;
|
|
102
|
-
limitGetFeeForMessage(maxCalls: number): CapabilityRestrictionJson;
|
|
103
|
-
limitGetMultipleAccountsWithOpts(maxCalls: number): CapabilityRestrictionJson;
|
|
104
|
-
limitGetProgramAccounts(maxCalls: number): CapabilityRestrictionJson;
|
|
105
|
-
limitGetSignatureStatuses(maxCalls: number): CapabilityRestrictionJson;
|
|
106
|
-
limitGetSlotHeight(maxCalls: number): CapabilityRestrictionJson;
|
|
107
|
-
limitGetTransaction(maxCalls: number): CapabilityRestrictionJson;
|
|
108
|
-
limitWriteReport(maxCalls: number): CapabilityRestrictionJson;
|
|
109
|
-
}
|
|
110
95
|
export {};
|
|
@@ -367,119 +367,3 @@ class ClientLogTrigger {
|
|
|
367
367
|
return rawOutput;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
export class ClientRestrictor {
|
|
371
|
-
ChainSelector;
|
|
372
|
-
constructor(ChainSelector) {
|
|
373
|
-
this.ChainSelector = ChainSelector;
|
|
374
|
-
}
|
|
375
|
-
limitGetAccountInfoWithOpts(maxCalls) {
|
|
376
|
-
// Include all labels in capability ID for routing when specified
|
|
377
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
378
|
-
return {
|
|
379
|
-
method: {
|
|
380
|
-
id: capabilityId,
|
|
381
|
-
method: 'GetAccountInfoWithOpts',
|
|
382
|
-
maxCalls,
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
}
|
|
386
|
-
limitGetBalance(maxCalls) {
|
|
387
|
-
// Include all labels in capability ID for routing when specified
|
|
388
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
389
|
-
return {
|
|
390
|
-
method: {
|
|
391
|
-
id: capabilityId,
|
|
392
|
-
method: 'GetBalance',
|
|
393
|
-
maxCalls,
|
|
394
|
-
},
|
|
395
|
-
};
|
|
396
|
-
}
|
|
397
|
-
limitGetBlock(maxCalls) {
|
|
398
|
-
// Include all labels in capability ID for routing when specified
|
|
399
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
400
|
-
return {
|
|
401
|
-
method: {
|
|
402
|
-
id: capabilityId,
|
|
403
|
-
method: 'GetBlock',
|
|
404
|
-
maxCalls,
|
|
405
|
-
},
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
|
-
limitGetFeeForMessage(maxCalls) {
|
|
409
|
-
// Include all labels in capability ID for routing when specified
|
|
410
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
411
|
-
return {
|
|
412
|
-
method: {
|
|
413
|
-
id: capabilityId,
|
|
414
|
-
method: 'GetFeeForMessage',
|
|
415
|
-
maxCalls,
|
|
416
|
-
},
|
|
417
|
-
};
|
|
418
|
-
}
|
|
419
|
-
limitGetMultipleAccountsWithOpts(maxCalls) {
|
|
420
|
-
// Include all labels in capability ID for routing when specified
|
|
421
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
422
|
-
return {
|
|
423
|
-
method: {
|
|
424
|
-
id: capabilityId,
|
|
425
|
-
method: 'GetMultipleAccountsWithOpts',
|
|
426
|
-
maxCalls,
|
|
427
|
-
},
|
|
428
|
-
};
|
|
429
|
-
}
|
|
430
|
-
limitGetProgramAccounts(maxCalls) {
|
|
431
|
-
// Include all labels in capability ID for routing when specified
|
|
432
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
433
|
-
return {
|
|
434
|
-
method: {
|
|
435
|
-
id: capabilityId,
|
|
436
|
-
method: 'GetProgramAccounts',
|
|
437
|
-
maxCalls,
|
|
438
|
-
},
|
|
439
|
-
};
|
|
440
|
-
}
|
|
441
|
-
limitGetSignatureStatuses(maxCalls) {
|
|
442
|
-
// Include all labels in capability ID for routing when specified
|
|
443
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
444
|
-
return {
|
|
445
|
-
method: {
|
|
446
|
-
id: capabilityId,
|
|
447
|
-
method: 'GetSignatureStatuses',
|
|
448
|
-
maxCalls,
|
|
449
|
-
},
|
|
450
|
-
};
|
|
451
|
-
}
|
|
452
|
-
limitGetSlotHeight(maxCalls) {
|
|
453
|
-
// Include all labels in capability ID for routing when specified
|
|
454
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
455
|
-
return {
|
|
456
|
-
method: {
|
|
457
|
-
id: capabilityId,
|
|
458
|
-
method: 'GetSlotHeight',
|
|
459
|
-
maxCalls,
|
|
460
|
-
},
|
|
461
|
-
};
|
|
462
|
-
}
|
|
463
|
-
limitGetTransaction(maxCalls) {
|
|
464
|
-
// Include all labels in capability ID for routing when specified
|
|
465
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
466
|
-
return {
|
|
467
|
-
method: {
|
|
468
|
-
id: capabilityId,
|
|
469
|
-
method: 'GetTransaction',
|
|
470
|
-
maxCalls,
|
|
471
|
-
},
|
|
472
|
-
};
|
|
473
|
-
}
|
|
474
|
-
limitWriteReport(maxCalls) {
|
|
475
|
-
// Include all labels in capability ID for routing when specified
|
|
476
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
477
|
-
return {
|
|
478
|
-
method: {
|
|
479
|
-
id: capabilityId,
|
|
480
|
-
method: 'WriteReport',
|
|
481
|
-
maxCalls,
|
|
482
|
-
},
|
|
483
|
-
};
|
|
484
|
-
}
|
|
485
|
-
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type ReportRequest, type ReportRequestJson, type SimpleConsensusInputs, type SimpleConsensusInputsJson } from '../../../../../generated/sdk/v1alpha/sdk_pb';
|
|
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';
|
|
@@ -22,7 +22,3 @@ export declare class ConsensusCapability {
|
|
|
22
22
|
result: () => Report;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
|
-
export declare class ConsensusRestrictor {
|
|
26
|
-
limitSimple(maxCalls: number): CapabilityRestrictionJson;
|
|
27
|
-
limitReport(maxCalls: number): CapabilityRestrictionJson;
|
|
28
|
-
}
|
|
@@ -68,25 +68,3 @@ export class ConsensusCapability {
|
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
export class ConsensusRestrictor {
|
|
72
|
-
limitSimple(maxCalls) {
|
|
73
|
-
const capabilityId = ConsensusCapability.CAPABILITY_ID;
|
|
74
|
-
return {
|
|
75
|
-
method: {
|
|
76
|
-
id: capabilityId,
|
|
77
|
-
method: 'Simple',
|
|
78
|
-
maxCalls,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
limitReport(maxCalls) {
|
|
83
|
-
const capabilityId = ConsensusCapability.CAPABILITY_ID;
|
|
84
|
-
return {
|
|
85
|
-
method: {
|
|
86
|
-
id: capabilityId,
|
|
87
|
-
method: 'Report',
|
|
88
|
-
maxCalls,
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
}
|
package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { type ConfidentialHTTPRequest, type ConfidentialHTTPRequestJson, type HTTPResponse } from '../../../../../generated/capabilities/networking/confidentialhttp/v1alpha/client_pb';
|
|
2
|
-
import type { CapabilityRestrictionJson } from '../../../../../generated/sdk/v1alpha/sdk_pb';
|
|
3
2
|
import type { Runtime } from '../../../../../sdk';
|
|
4
3
|
import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
|
|
5
4
|
/**
|
|
@@ -18,6 +17,3 @@ export declare class ClientCapability {
|
|
|
18
17
|
result: () => HTTPResponse;
|
|
19
18
|
};
|
|
20
19
|
}
|
|
21
|
-
export declare class ClientRestrictor {
|
|
22
|
-
limitSendRequest(maxCalls: number): CapabilityRestrictionJson;
|
|
23
|
-
}
|
package/dist/generated-sdk/capabilities/networking/confidentialhttp/v1alpha/client_sdk_gen.js
CHANGED
|
@@ -41,15 +41,3 @@ export class ClientCapability {
|
|
|
41
41
|
};
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
-
export class ClientRestrictor {
|
|
45
|
-
limitSendRequest(maxCalls) {
|
|
46
|
-
const capabilityId = ClientCapability.CAPABILITY_ID;
|
|
47
|
-
return {
|
|
48
|
-
method: {
|
|
49
|
-
id: capabilityId,
|
|
50
|
-
method: 'SendRequest',
|
|
51
|
-
maxCalls,
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type Request, type RequestJson, type Response } from '../../../../../generated/capabilities/networking/http/v1alpha/client_pb';
|
|
2
|
-
import type {
|
|
3
|
-
import type { NodeRuntime, Runtime, TeeRuntime } from '../../../../../sdk';
|
|
2
|
+
import type { NodeRuntime, Runtime } from '../../../../../sdk';
|
|
4
3
|
import type { ConsensusAggregation, PrimitiveTypes, UnwrapOptions } from '../../../../../sdk/utils';
|
|
5
4
|
import type { CapabilityInput } from '../../../../../sdk/utils/types/no-excess';
|
|
6
5
|
export declare class SendRequester {
|
|
@@ -23,21 +22,12 @@ export declare class ClientCapability {
|
|
|
23
22
|
static readonly CAPABILITY_ID = "http-actions@1.0.0-alpha";
|
|
24
23
|
static readonly CAPABILITY_NAME = "http-actions";
|
|
25
24
|
static readonly CAPABILITY_VERSION = "1.0.0-alpha";
|
|
26
|
-
sendRequest<TInput>(runtime: TeeRuntime<unknown>, input: CapabilityInput<TInput, Request, RequestJson>): {
|
|
27
|
-
result: () => Response;
|
|
28
|
-
};
|
|
29
25
|
sendRequest<TInput>(runtime: NodeRuntime<unknown>, input: CapabilityInput<TInput, Request, RequestJson>): {
|
|
30
26
|
result: () => Response;
|
|
31
27
|
};
|
|
32
|
-
sendRequest<TInput>(runtime: NodeRuntime<unknown> | TeeRuntime<unknown>, input: CapabilityInput<TInput, Request, RequestJson>): {
|
|
33
|
-
result: () => Response;
|
|
34
|
-
};
|
|
35
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) => {
|
|
36
29
|
result: () => TOutput;
|
|
37
30
|
};
|
|
38
31
|
private sendRequestCallHelper;
|
|
39
32
|
private sendRequestSugarHelper;
|
|
40
33
|
}
|
|
41
|
-
export declare class ClientRestrictor {
|
|
42
|
-
limitSendRequest(maxCalls: number): CapabilityRestrictionJson;
|
|
43
|
-
}
|
|
@@ -68,15 +68,3 @@ export class ClientCapability {
|
|
|
68
68
|
return runtime.runInNodeMode(wrappedFn, consensusAggregation, unwrapOptions);
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
export class ClientRestrictor {
|
|
72
|
-
limitSendRequest(maxCalls) {
|
|
73
|
-
const capabilityId = ClientCapability.CAPABILITY_ID;
|
|
74
|
-
return {
|
|
75
|
-
method: {
|
|
76
|
-
id: capabilityId,
|
|
77
|
-
method: 'SendRequest',
|
|
78
|
-
maxCalls,
|
|
79
|
-
},
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
}
|