@chainlink/cre-sdk 1.6.0-alpha.5 → 1.7.0-alpha.1
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/dist/sdk/cre/index.d.ts +0 -6
- package/dist/sdk/cre/index.js +0 -8
- package/dist/sdk/errors.d.ts +5 -0
- package/dist/sdk/errors.js +10 -0
- package/dist/sdk/impl/runtime-impl.d.ts +8 -12
- package/dist/sdk/impl/runtime-impl.js +61 -33
- package/dist/sdk/runtime.d.ts +1 -3
- package/dist/sdk/test/generated/index.d.ts +0 -2
- package/dist/sdk/test/generated/index.js +0 -2
- package/dist/sdk/testutils/test-runtime.d.ts +0 -2
- package/dist/sdk/testutils/test-runtime.js +0 -8
- 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/wasm/host-bindings.d.ts +0 -1
- package/dist/sdk/wasm/host-bindings.js +0 -4
- package/dist/sdk/wasm/runner.js +1 -0
- package/dist/sdk/wasm/runtime.js +1 -4
- package/dist/sdk/workflow.d.ts +5 -2
- package/dist/sdk/workflow.js +0 -1
- package/package.json +2 -2
- package/scripts/src/generate-sdks.ts +0 -12
- package/dist/generated/capabilities/blockchain/aptos/v1alpha/client_pb.d.ts +0 -1023
- package/dist/generated/capabilities/blockchain/aptos/v1alpha/client_pb.js +0 -290
- package/dist/generated/capabilities/blockchain/solana/v1alpha/client_pb.d.ts +0 -2904
- package/dist/generated/capabilities/blockchain/solana/v1alpha/client_pb.js +0 -506
- 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 -52
- package/dist/generated-sdk/capabilities/blockchain/aptos/v1alpha/client_sdk_gen.js +0 -186
- package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.d.ts +0 -92
- package/dist/generated-sdk/capabilities/blockchain/solana/v1alpha/client_sdk_gen.js +0 -343
- 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/sdk/test/generated/capabilities/blockchain/solana/v1alpha/solana_mock_gen.d.ts +0 -33
- package/dist/sdk/test/generated/capabilities/blockchain/solana/v1alpha/solana_mock_gen.js +0 -178
- package/dist/sdk/utils/secrets-error.d.ts +0 -3
- package/dist/sdk/utils/secrets-error.js +0 -6
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type { Message } from '@bufbuild/protobuf';
|
|
2
|
-
import type { GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
3
|
-
/**
|
|
4
|
-
* Describes the file workflows/v2/workflow_key.proto.
|
|
5
|
-
*/
|
|
6
|
-
export declare const file_workflows_v2_workflow_key: GenFile;
|
|
7
|
-
/**
|
|
8
|
-
* @generated from message workflows.v2.WorkflowKey
|
|
9
|
-
*/
|
|
10
|
-
export type WorkflowKey = Message<'workflows.v2.WorkflowKey'> & {
|
|
11
|
-
/**
|
|
12
|
-
* @generated from field: string workflowOwner = 1;
|
|
13
|
-
*/
|
|
14
|
-
workflowOwner: string;
|
|
15
|
-
/**
|
|
16
|
-
* @generated from field: string workflowName = 2;
|
|
17
|
-
*/
|
|
18
|
-
workflowName: string;
|
|
19
|
-
/**
|
|
20
|
-
* @generated from field: string workflowID = 3;
|
|
21
|
-
*/
|
|
22
|
-
workflowID: string;
|
|
23
|
-
/**
|
|
24
|
-
* @generated from field: string organizationID = 4;
|
|
25
|
-
*/
|
|
26
|
-
organizationID: string;
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* @generated from message workflows.v2.WorkflowKey
|
|
30
|
-
*/
|
|
31
|
-
export type WorkflowKeyJson = {
|
|
32
|
-
/**
|
|
33
|
-
* @generated from field: string workflowOwner = 1;
|
|
34
|
-
*/
|
|
35
|
-
workflowOwner?: string;
|
|
36
|
-
/**
|
|
37
|
-
* @generated from field: string workflowName = 2;
|
|
38
|
-
*/
|
|
39
|
-
workflowName?: string;
|
|
40
|
-
/**
|
|
41
|
-
* @generated from field: string workflowID = 3;
|
|
42
|
-
*/
|
|
43
|
-
workflowID?: string;
|
|
44
|
-
/**
|
|
45
|
-
* @generated from field: string organizationID = 4;
|
|
46
|
-
*/
|
|
47
|
-
organizationID?: string;
|
|
48
|
-
};
|
|
49
|
-
/**
|
|
50
|
-
* Describes the message workflows.v2.WorkflowKey.
|
|
51
|
-
* Use `create(WorkflowKeySchema)` to create a new message.
|
|
52
|
-
*/
|
|
53
|
-
export declare const WorkflowKeySchema: GenMessage<WorkflowKey, {
|
|
54
|
-
jsonType: WorkflowKeyJson;
|
|
55
|
-
}>;
|
|
@@ -1,17 +0,0 @@
|
|
|
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 workflows/v2/workflow_key.proto (package workflows.v2, syntax proto3)
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
import { fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv2';
|
|
5
|
-
/**
|
|
6
|
-
* Describes the file workflows/v2/workflow_key.proto.
|
|
7
|
-
*/
|
|
8
|
-
export const file_workflows_v2_workflow_key =
|
|
9
|
-
/*@__PURE__*/
|
|
10
|
-
fileDesc('Ch93b3JrZmxvd3MvdjIvd29ya2Zsb3dfa2V5LnByb3RvEgx3b3JrZmxvd3MudjIiZgoLV29ya2Zsb3dLZXkSFQoNd29ya2Zsb3dPd25lchgBIAEoCRIUCgx3b3JrZmxvd05hbWUYAiABKAkSEgoKd29ya2Zsb3dJRBgDIAEoCRIWCg5vcmdhbml6YXRpb25JRBgEIAEoCUKzAQoQY29tLndvcmtmbG93cy52MkIQV29ya2Zsb3dLZXlQcm90b1ABWjxnaXRodWIuY29tL3NtYXJ0Y29udHJhY3RraXQvY2hhaW5saW5rLXByb3Rvcy93b3JrZmxvd3MvZ28vdjKiAgNXWFiqAgxXb3JrZmxvd3MuVjLKAgxXb3JrZmxvd3NcVjLiAhhXb3JrZmxvd3NcVjJcR1BCTWV0YWRhdGHqAg1Xb3JrZmxvd3M6OlYyYgZwcm90bzM');
|
|
11
|
-
/**
|
|
12
|
-
* Describes the message workflows.v2.WorkflowKey.
|
|
13
|
-
* Use `create(WorkflowKeySchema)` to create a new message.
|
|
14
|
-
*/
|
|
15
|
-
export const WorkflowKeySchema =
|
|
16
|
-
/*@__PURE__*/
|
|
17
|
-
messageDesc(file_workflows_v2_workflow_key, 0);
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
import type { Message } from '@bufbuild/protobuf';
|
|
2
|
-
import type { GenEnum, GenFile, GenMessage } from '@bufbuild/protobuf/codegenv2';
|
|
3
|
-
import type { CreInfo, CreInfoJson } from './cre_info_pb';
|
|
4
|
-
import type { WorkflowKey, WorkflowKeyJson } from './workflow_key_pb';
|
|
5
|
-
/**
|
|
6
|
-
* Describes the file workflows/v2/workflow_user_metric.proto.
|
|
7
|
-
*/
|
|
8
|
-
export declare const file_workflows_v2_workflow_user_metric: GenFile;
|
|
9
|
-
/**
|
|
10
|
-
* @generated from message workflows.v2.WorkflowUserMetric
|
|
11
|
-
*/
|
|
12
|
-
export type WorkflowUserMetric = Message<'workflows.v2.WorkflowUserMetric'> & {
|
|
13
|
-
/**
|
|
14
|
-
* @generated from field: workflows.v2.CreInfo creInfo = 1;
|
|
15
|
-
*/
|
|
16
|
-
creInfo?: CreInfo;
|
|
17
|
-
/**
|
|
18
|
-
* @generated from field: workflows.v2.WorkflowKey workflow = 2;
|
|
19
|
-
*/
|
|
20
|
-
workflow?: WorkflowKey;
|
|
21
|
-
/**
|
|
22
|
-
* @generated from field: string workflowExecutionID = 3;
|
|
23
|
-
*/
|
|
24
|
-
workflowExecutionID: string;
|
|
25
|
-
/**
|
|
26
|
-
* @generated from field: string timestamp = 4;
|
|
27
|
-
*/
|
|
28
|
-
timestamp: string;
|
|
29
|
-
/**
|
|
30
|
-
* @generated from field: string name = 5;
|
|
31
|
-
*/
|
|
32
|
-
name: string;
|
|
33
|
-
/**
|
|
34
|
-
* @generated from field: double value = 6;
|
|
35
|
-
*/
|
|
36
|
-
value: number;
|
|
37
|
-
/**
|
|
38
|
-
* @generated from field: workflows.v2.UserMetricType type = 7;
|
|
39
|
-
*/
|
|
40
|
-
type: UserMetricType;
|
|
41
|
-
/**
|
|
42
|
-
* @generated from field: map<string, string> labels = 8;
|
|
43
|
-
*/
|
|
44
|
-
labels: {
|
|
45
|
-
[key: string]: string;
|
|
46
|
-
};
|
|
47
|
-
};
|
|
48
|
-
/**
|
|
49
|
-
* @generated from message workflows.v2.WorkflowUserMetric
|
|
50
|
-
*/
|
|
51
|
-
export type WorkflowUserMetricJson = {
|
|
52
|
-
/**
|
|
53
|
-
* @generated from field: workflows.v2.CreInfo creInfo = 1;
|
|
54
|
-
*/
|
|
55
|
-
creInfo?: CreInfoJson;
|
|
56
|
-
/**
|
|
57
|
-
* @generated from field: workflows.v2.WorkflowKey workflow = 2;
|
|
58
|
-
*/
|
|
59
|
-
workflow?: WorkflowKeyJson;
|
|
60
|
-
/**
|
|
61
|
-
* @generated from field: string workflowExecutionID = 3;
|
|
62
|
-
*/
|
|
63
|
-
workflowExecutionID?: string;
|
|
64
|
-
/**
|
|
65
|
-
* @generated from field: string timestamp = 4;
|
|
66
|
-
*/
|
|
67
|
-
timestamp?: string;
|
|
68
|
-
/**
|
|
69
|
-
* @generated from field: string name = 5;
|
|
70
|
-
*/
|
|
71
|
-
name?: string;
|
|
72
|
-
/**
|
|
73
|
-
* @generated from field: double value = 6;
|
|
74
|
-
*/
|
|
75
|
-
value?: number | 'NaN' | 'Infinity' | '-Infinity';
|
|
76
|
-
/**
|
|
77
|
-
* @generated from field: workflows.v2.UserMetricType type = 7;
|
|
78
|
-
*/
|
|
79
|
-
type?: UserMetricTypeJson;
|
|
80
|
-
/**
|
|
81
|
-
* @generated from field: map<string, string> labels = 8;
|
|
82
|
-
*/
|
|
83
|
-
labels?: {
|
|
84
|
-
[key: string]: string;
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
/**
|
|
88
|
-
* Describes the message workflows.v2.WorkflowUserMetric.
|
|
89
|
-
* Use `create(WorkflowUserMetricSchema)` to create a new message.
|
|
90
|
-
*/
|
|
91
|
-
export declare const WorkflowUserMetricSchema: GenMessage<WorkflowUserMetric, {
|
|
92
|
-
jsonType: WorkflowUserMetricJson;
|
|
93
|
-
}>;
|
|
94
|
-
/**
|
|
95
|
-
* @generated from enum workflows.v2.UserMetricType
|
|
96
|
-
*/
|
|
97
|
-
export declare enum UserMetricType {
|
|
98
|
-
/**
|
|
99
|
-
* @generated from enum value: USER_METRIC_TYPE_UNSPECIFIED = 0;
|
|
100
|
-
*/
|
|
101
|
-
UNSPECIFIED = 0,
|
|
102
|
-
/**
|
|
103
|
-
* @generated from enum value: USER_METRIC_TYPE_COUNTER = 1;
|
|
104
|
-
*/
|
|
105
|
-
COUNTER = 1,
|
|
106
|
-
/**
|
|
107
|
-
* @generated from enum value: USER_METRIC_TYPE_GAUGE = 2;
|
|
108
|
-
*/
|
|
109
|
-
GAUGE = 2
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* @generated from enum workflows.v2.UserMetricType
|
|
113
|
-
*/
|
|
114
|
-
export type UserMetricTypeJson = 'USER_METRIC_TYPE_UNSPECIFIED' | 'USER_METRIC_TYPE_COUNTER' | 'USER_METRIC_TYPE_GAUGE';
|
|
115
|
-
/**
|
|
116
|
-
* Describes the enum workflows.v2.UserMetricType.
|
|
117
|
-
*/
|
|
118
|
-
export declare const UserMetricTypeSchema: GenEnum<UserMetricType, UserMetricTypeJson>;
|
|
@@ -1,41 +0,0 @@
|
|
|
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 workflows/v2/workflow_user_metric.proto (package workflows.v2, syntax proto3)
|
|
3
|
-
/* eslint-disable */
|
|
4
|
-
import { enumDesc, fileDesc, messageDesc } from '@bufbuild/protobuf/codegenv2';
|
|
5
|
-
import { file_workflows_v2_cre_info } from './cre_info_pb';
|
|
6
|
-
import { file_workflows_v2_workflow_key } from './workflow_key_pb';
|
|
7
|
-
/**
|
|
8
|
-
* Describes the file workflows/v2/workflow_user_metric.proto.
|
|
9
|
-
*/
|
|
10
|
-
export const file_workflows_v2_workflow_user_metric =
|
|
11
|
-
/*@__PURE__*/
|
|
12
|
-
fileDesc('Cid3b3JrZmxvd3MvdjIvd29ya2Zsb3dfdXNlcl9tZXRyaWMucHJvdG8SDHdvcmtmbG93cy52MiLPAgoSV29ya2Zsb3dVc2VyTWV0cmljEiYKB2NyZUluZm8YASABKAsyFS53b3JrZmxvd3MudjIuQ3JlSW5mbxIrCgh3b3JrZmxvdxgCIAEoCzIZLndvcmtmbG93cy52Mi5Xb3JrZmxvd0tleRIbChN3b3JrZmxvd0V4ZWN1dGlvbklEGAMgASgJEhEKCXRpbWVzdGFtcBgEIAEoCRIMCgRuYW1lGAUgASgJEg0KBXZhbHVlGAYgASgBEioKBHR5cGUYByABKA4yHC53b3JrZmxvd3MudjIuVXNlck1ldHJpY1R5cGUSPAoGbGFiZWxzGAggAygLMiwud29ya2Zsb3dzLnYyLldvcmtmbG93VXNlck1ldHJpYy5MYWJlbHNFbnRyeRotCgtMYWJlbHNFbnRyeRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBKmwKDlVzZXJNZXRyaWNUeXBlEiAKHFVTRVJfTUVUUklDX1RZUEVfVU5TUEVDSUZJRUQQABIcChhVU0VSX01FVFJJQ19UWVBFX0NPVU5URVIQARIaChZVU0VSX01FVFJJQ19UWVBFX0dBVUdFEAJCugEKEGNvbS53b3JrZmxvd3MudjJCF1dvcmtmbG93VXNlck1ldHJpY1Byb3RvUAFaPGdpdGh1Yi5jb20vc21hcnRjb250cmFjdGtpdC9jaGFpbmxpbmstcHJvdG9zL3dvcmtmbG93cy9nby92MqICA1dYWKoCDFdvcmtmbG93cy5WMsoCDFdvcmtmbG93c1xWMuICGFdvcmtmbG93c1xWMlxHUEJNZXRhZGF0YeoCDVdvcmtmbG93czo6VjJiBnByb3RvMw', [file_workflows_v2_cre_info, file_workflows_v2_workflow_key]);
|
|
13
|
-
/**
|
|
14
|
-
* Describes the message workflows.v2.WorkflowUserMetric.
|
|
15
|
-
* Use `create(WorkflowUserMetricSchema)` to create a new message.
|
|
16
|
-
*/
|
|
17
|
-
export const WorkflowUserMetricSchema = /*@__PURE__*/ messageDesc(file_workflows_v2_workflow_user_metric, 0);
|
|
18
|
-
/**
|
|
19
|
-
* @generated from enum workflows.v2.UserMetricType
|
|
20
|
-
*/
|
|
21
|
-
export var UserMetricType;
|
|
22
|
-
(function (UserMetricType) {
|
|
23
|
-
/**
|
|
24
|
-
* @generated from enum value: USER_METRIC_TYPE_UNSPECIFIED = 0;
|
|
25
|
-
*/
|
|
26
|
-
UserMetricType[UserMetricType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
27
|
-
/**
|
|
28
|
-
* @generated from enum value: USER_METRIC_TYPE_COUNTER = 1;
|
|
29
|
-
*/
|
|
30
|
-
UserMetricType[UserMetricType["COUNTER"] = 1] = "COUNTER";
|
|
31
|
-
/**
|
|
32
|
-
* @generated from enum value: USER_METRIC_TYPE_GAUGE = 2;
|
|
33
|
-
*/
|
|
34
|
-
UserMetricType[UserMetricType["GAUGE"] = 2] = "GAUGE";
|
|
35
|
-
})(UserMetricType || (UserMetricType = {}));
|
|
36
|
-
/**
|
|
37
|
-
* Describes the enum workflows.v2.UserMetricType.
|
|
38
|
-
*/
|
|
39
|
-
export const UserMetricTypeSchema =
|
|
40
|
-
/*@__PURE__*/
|
|
41
|
-
enumDesc(file_workflows_v2_workflow_user_metric, 0);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { type AccountAPTBalanceReply, type AccountAPTBalanceRequest, type AccountAPTBalanceRequestJson, type AccountTransactionsReply, type AccountTransactionsRequest, type AccountTransactionsRequestJson, type GasConfig, type GasConfigJson, type TransactionByHashReply, type TransactionByHashRequest, type TransactionByHashRequestJson, type ViewReply, type ViewRequest, type ViewRequestJson, type WriteReportReply, type WriteReportRequest } from '../../../../../generated/capabilities/blockchain/aptos/v1alpha/client_pb';
|
|
2
|
-
import type { Runtime } from '../../../../../sdk';
|
|
3
|
-
import { Report } from '../../../../../sdk/report';
|
|
4
|
-
export type WriteCreReportRequest = {
|
|
5
|
-
receiver: Uint8Array;
|
|
6
|
-
gasConfig?: GasConfig;
|
|
7
|
-
report?: Report;
|
|
8
|
-
$report: true;
|
|
9
|
-
};
|
|
10
|
-
export type WriteCreReportRequestJson = {
|
|
11
|
-
receiver: string;
|
|
12
|
-
gasConfig?: GasConfigJson;
|
|
13
|
-
report?: Report;
|
|
14
|
-
};
|
|
15
|
-
export declare function x_generatedCodeOnly_wrap_WriteCreReportRequest(input: WriteReportRequest): WriteCreReportRequest;
|
|
16
|
-
export declare function createWriteCreReportRequest(input: WriteCreReportRequestJson): WriteCreReportRequest;
|
|
17
|
-
export declare function x_generatedCodeOnly_unwrap_WriteCreReportRequest(input: WriteCreReportRequest): WriteReportRequest;
|
|
18
|
-
/**
|
|
19
|
-
* Client Capability
|
|
20
|
-
*
|
|
21
|
-
* Capability ID: aptos@1.0.0
|
|
22
|
-
* Capability Name: aptos
|
|
23
|
-
* Capability Version: 1.0.0
|
|
24
|
-
*/
|
|
25
|
-
export declare class ClientCapability {
|
|
26
|
-
private readonly ChainSelector;
|
|
27
|
-
/** The capability ID for this service */
|
|
28
|
-
static readonly CAPABILITY_ID = "aptos@1.0.0";
|
|
29
|
-
static readonly CAPABILITY_NAME = "aptos";
|
|
30
|
-
static readonly CAPABILITY_VERSION = "1.0.0";
|
|
31
|
-
/** Available ChainSelector values */
|
|
32
|
-
static readonly SUPPORTED_CHAIN_SELECTORS: {
|
|
33
|
-
readonly 'aptos-mainnet': 4741433654826277614n;
|
|
34
|
-
readonly 'aptos-testnet': 743186221051783445n;
|
|
35
|
-
};
|
|
36
|
-
constructor(ChainSelector: bigint);
|
|
37
|
-
accountAPTBalance(runtime: Runtime<unknown>, input: AccountAPTBalanceRequest | AccountAPTBalanceRequestJson): {
|
|
38
|
-
result: () => AccountAPTBalanceReply;
|
|
39
|
-
};
|
|
40
|
-
view(runtime: Runtime<unknown>, input: ViewRequest | ViewRequestJson): {
|
|
41
|
-
result: () => ViewReply;
|
|
42
|
-
};
|
|
43
|
-
transactionByHash(runtime: Runtime<unknown>, input: TransactionByHashRequest | TransactionByHashRequestJson): {
|
|
44
|
-
result: () => TransactionByHashReply;
|
|
45
|
-
};
|
|
46
|
-
accountTransactions(runtime: Runtime<unknown>, input: AccountTransactionsRequest | AccountTransactionsRequestJson): {
|
|
47
|
-
result: () => AccountTransactionsReply;
|
|
48
|
-
};
|
|
49
|
-
writeReport(runtime: Runtime<unknown>, input: WriteCreReportRequest | WriteCreReportRequestJson): {
|
|
50
|
-
result: () => WriteReportReply;
|
|
51
|
-
};
|
|
52
|
-
}
|
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
import { create, fromJson } from '@bufbuild/protobuf';
|
|
2
|
-
import { AccountAPTBalanceReplySchema, AccountAPTBalanceRequestSchema, AccountTransactionsReplySchema, AccountTransactionsRequestSchema, GasConfigSchema, TransactionByHashReplySchema, TransactionByHashRequestSchema, ViewReplySchema, ViewRequestSchema, WriteReportReplySchema, WriteReportRequestSchema, } from '../../../../../generated/capabilities/blockchain/aptos/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
|
-
receiver: input.receiver,
|
|
9
|
-
gasConfig: input.gasConfig,
|
|
10
|
-
report: input.report !== undefined ? new Report(input.report) : undefined,
|
|
11
|
-
$report: true,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
export function createWriteCreReportRequest(input) {
|
|
15
|
-
return {
|
|
16
|
-
receiver: hexToBytes(input.receiver),
|
|
17
|
-
gasConfig: input.gasConfig !== undefined ? fromJson(GasConfigSchema, input.gasConfig) : undefined,
|
|
18
|
-
report: input.report,
|
|
19
|
-
$report: true,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function x_generatedCodeOnly_unwrap_WriteCreReportRequest(input) {
|
|
23
|
-
return create(WriteReportRequestSchema, {
|
|
24
|
-
receiver: input.receiver,
|
|
25
|
-
gasConfig: input.gasConfig,
|
|
26
|
-
report: input.report !== undefined ? input.report.x_generatedCodeOnly_unwrap() : undefined,
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* Client Capability
|
|
31
|
-
*
|
|
32
|
-
* Capability ID: aptos@1.0.0
|
|
33
|
-
* Capability Name: aptos
|
|
34
|
-
* Capability Version: 1.0.0
|
|
35
|
-
*/
|
|
36
|
-
export class ClientCapability {
|
|
37
|
-
ChainSelector;
|
|
38
|
-
/** The capability ID for this service */
|
|
39
|
-
static CAPABILITY_ID = 'aptos@1.0.0';
|
|
40
|
-
static CAPABILITY_NAME = 'aptos';
|
|
41
|
-
static CAPABILITY_VERSION = '1.0.0';
|
|
42
|
-
/** Available ChainSelector values */
|
|
43
|
-
static SUPPORTED_CHAIN_SELECTORS = {
|
|
44
|
-
'aptos-mainnet': 4741433654826277614n,
|
|
45
|
-
'aptos-testnet': 743186221051783445n,
|
|
46
|
-
};
|
|
47
|
-
constructor(ChainSelector) {
|
|
48
|
-
this.ChainSelector = ChainSelector;
|
|
49
|
-
}
|
|
50
|
-
accountAPTBalance(runtime, input) {
|
|
51
|
-
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
52
|
-
let payload;
|
|
53
|
-
if (input.$typeName) {
|
|
54
|
-
// It's the original protobuf type
|
|
55
|
-
payload = input;
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
// It's regular JSON, convert using fromJson
|
|
59
|
-
payload = fromJson(AccountAPTBalanceRequestSchema, input);
|
|
60
|
-
}
|
|
61
|
-
// Include all labels in capability ID for routing when specified
|
|
62
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
63
|
-
const capabilityResponse = runtime.callCapability({
|
|
64
|
-
capabilityId,
|
|
65
|
-
method: 'AccountAPTBalance',
|
|
66
|
-
payload,
|
|
67
|
-
inputSchema: AccountAPTBalanceRequestSchema,
|
|
68
|
-
outputSchema: AccountAPTBalanceReplySchema,
|
|
69
|
-
});
|
|
70
|
-
return {
|
|
71
|
-
result: () => {
|
|
72
|
-
const result = capabilityResponse.result();
|
|
73
|
-
return result;
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
view(runtime, input) {
|
|
78
|
-
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
79
|
-
let payload;
|
|
80
|
-
if (input.$typeName) {
|
|
81
|
-
// It's the original protobuf type
|
|
82
|
-
payload = input;
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
// It's regular JSON, convert using fromJson
|
|
86
|
-
payload = fromJson(ViewRequestSchema, input);
|
|
87
|
-
}
|
|
88
|
-
// Include all labels in capability ID for routing when specified
|
|
89
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
90
|
-
const capabilityResponse = runtime.callCapability({
|
|
91
|
-
capabilityId,
|
|
92
|
-
method: 'View',
|
|
93
|
-
payload,
|
|
94
|
-
inputSchema: ViewRequestSchema,
|
|
95
|
-
outputSchema: ViewReplySchema,
|
|
96
|
-
});
|
|
97
|
-
return {
|
|
98
|
-
result: () => {
|
|
99
|
-
const result = capabilityResponse.result();
|
|
100
|
-
return result;
|
|
101
|
-
},
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
transactionByHash(runtime, input) {
|
|
105
|
-
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
106
|
-
let payload;
|
|
107
|
-
if (input.$typeName) {
|
|
108
|
-
// It's the original protobuf type
|
|
109
|
-
payload = input;
|
|
110
|
-
}
|
|
111
|
-
else {
|
|
112
|
-
// It's regular JSON, convert using fromJson
|
|
113
|
-
payload = fromJson(TransactionByHashRequestSchema, input);
|
|
114
|
-
}
|
|
115
|
-
// Include all labels in capability ID for routing when specified
|
|
116
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
117
|
-
const capabilityResponse = runtime.callCapability({
|
|
118
|
-
capabilityId,
|
|
119
|
-
method: 'TransactionByHash',
|
|
120
|
-
payload,
|
|
121
|
-
inputSchema: TransactionByHashRequestSchema,
|
|
122
|
-
outputSchema: TransactionByHashReplySchema,
|
|
123
|
-
});
|
|
124
|
-
return {
|
|
125
|
-
result: () => {
|
|
126
|
-
const result = capabilityResponse.result();
|
|
127
|
-
return result;
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
accountTransactions(runtime, input) {
|
|
132
|
-
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
133
|
-
let payload;
|
|
134
|
-
if (input.$typeName) {
|
|
135
|
-
// It's the original protobuf type
|
|
136
|
-
payload = input;
|
|
137
|
-
}
|
|
138
|
-
else {
|
|
139
|
-
// It's regular JSON, convert using fromJson
|
|
140
|
-
payload = fromJson(AccountTransactionsRequestSchema, input);
|
|
141
|
-
}
|
|
142
|
-
// Include all labels in capability ID for routing when specified
|
|
143
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
144
|
-
const capabilityResponse = runtime.callCapability({
|
|
145
|
-
capabilityId,
|
|
146
|
-
method: 'AccountTransactions',
|
|
147
|
-
payload,
|
|
148
|
-
inputSchema: AccountTransactionsRequestSchema,
|
|
149
|
-
outputSchema: AccountTransactionsReplySchema,
|
|
150
|
-
});
|
|
151
|
-
return {
|
|
152
|
-
result: () => {
|
|
153
|
-
const result = capabilityResponse.result();
|
|
154
|
-
return result;
|
|
155
|
-
},
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
writeReport(runtime, input) {
|
|
159
|
-
// Handle input conversion - unwrap if it's a wrapped type, convert from JSON if needed
|
|
160
|
-
let payload;
|
|
161
|
-
// Check if it's a wrapped type by looking for the $report property
|
|
162
|
-
if (input.$report) {
|
|
163
|
-
// It's a wrapped type, unwrap it
|
|
164
|
-
payload = x_generatedCodeOnly_unwrap_WriteCreReportRequest(input);
|
|
165
|
-
}
|
|
166
|
-
else {
|
|
167
|
-
// It's wrapped JSON, convert using create function
|
|
168
|
-
payload = x_generatedCodeOnly_unwrap_WriteCreReportRequest(createWriteCreReportRequest(input));
|
|
169
|
-
}
|
|
170
|
-
// Include all labels in capability ID for routing when specified
|
|
171
|
-
const capabilityId = `${ClientCapability.CAPABILITY_NAME}:ChainSelector:${this.ChainSelector}@${ClientCapability.CAPABILITY_VERSION}`;
|
|
172
|
-
const capabilityResponse = runtime.callCapability({
|
|
173
|
-
capabilityId,
|
|
174
|
-
method: 'WriteReport',
|
|
175
|
-
payload,
|
|
176
|
-
inputSchema: WriteReportRequestSchema,
|
|
177
|
-
outputSchema: WriteReportReplySchema,
|
|
178
|
-
});
|
|
179
|
-
return {
|
|
180
|
-
result: () => {
|
|
181
|
-
const result = capabilityResponse.result();
|
|
182
|
-
return result;
|
|
183
|
-
},
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { type Any } from '@bufbuild/protobuf/wkt';
|
|
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 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 { Runtime } from '../../../../../sdk';
|
|
4
|
-
import { Report } from '../../../../../sdk/report';
|
|
5
|
-
import type { Trigger } from '../../../../../sdk/utils/triggers/trigger-interface';
|
|
6
|
-
export type WriteCreReportRequest = {
|
|
7
|
-
remainingAccounts: AccountMeta[];
|
|
8
|
-
receiver: Uint8Array;
|
|
9
|
-
computeConfig?: ComputeConfig;
|
|
10
|
-
report?: Report;
|
|
11
|
-
$report: true;
|
|
12
|
-
};
|
|
13
|
-
export type WriteCreReportRequestJson = {
|
|
14
|
-
remainingAccounts: AccountMetaJson[];
|
|
15
|
-
receiver: string;
|
|
16
|
-
computeConfig?: ComputeConfigJson;
|
|
17
|
-
report?: Report;
|
|
18
|
-
};
|
|
19
|
-
export declare function x_generatedCodeOnly_wrap_WriteCreReportRequest(input: WriteReportRequest): WriteCreReportRequest;
|
|
20
|
-
export declare function createWriteCreReportRequest(input: WriteCreReportRequestJson): WriteCreReportRequest;
|
|
21
|
-
export declare function x_generatedCodeOnly_unwrap_WriteCreReportRequest(input: WriteCreReportRequest): WriteReportRequest;
|
|
22
|
-
/**
|
|
23
|
-
* Client Capability
|
|
24
|
-
*
|
|
25
|
-
* Capability ID: solana@1.0.0
|
|
26
|
-
* Capability Name: solana
|
|
27
|
-
* Capability Version: 1.0.0
|
|
28
|
-
*/
|
|
29
|
-
export declare class ClientCapability {
|
|
30
|
-
private readonly ChainSelector;
|
|
31
|
-
/** The capability ID for this service */
|
|
32
|
-
static readonly CAPABILITY_ID = "solana@1.0.0";
|
|
33
|
-
static readonly CAPABILITY_NAME = "solana";
|
|
34
|
-
static readonly CAPABILITY_VERSION = "1.0.0";
|
|
35
|
-
/** Available ChainSelector values */
|
|
36
|
-
static readonly SUPPORTED_CHAIN_SELECTORS: {
|
|
37
|
-
readonly 'solana-devnet': 16423721717087811551n;
|
|
38
|
-
readonly 'solana-mainnet': 124615329519749607n;
|
|
39
|
-
readonly 'solana-testnet': 6302590918974934319n;
|
|
40
|
-
};
|
|
41
|
-
constructor(ChainSelector: bigint);
|
|
42
|
-
getAccountInfoWithOpts(runtime: Runtime<unknown>, input: GetAccountInfoWithOptsRequest | GetAccountInfoWithOptsRequestJson): {
|
|
43
|
-
result: () => GetAccountInfoWithOptsReply;
|
|
44
|
-
};
|
|
45
|
-
getBalance(runtime: Runtime<unknown>, input: GetBalanceRequest | GetBalanceRequestJson): {
|
|
46
|
-
result: () => GetBalanceReply;
|
|
47
|
-
};
|
|
48
|
-
getBlock(runtime: Runtime<unknown>, input: GetBlockRequest | GetBlockRequestJson): {
|
|
49
|
-
result: () => GetBlockReply;
|
|
50
|
-
};
|
|
51
|
-
getFeeForMessage(runtime: Runtime<unknown>, input: GetFeeForMessageRequest | GetFeeForMessageRequestJson): {
|
|
52
|
-
result: () => GetFeeForMessageReply;
|
|
53
|
-
};
|
|
54
|
-
getMultipleAccountsWithOpts(runtime: Runtime<unknown>, input: GetMultipleAccountsWithOptsRequest | GetMultipleAccountsWithOptsRequestJson): {
|
|
55
|
-
result: () => GetMultipleAccountsWithOptsReply;
|
|
56
|
-
};
|
|
57
|
-
getSignatureStatuses(runtime: Runtime<unknown>, input: GetSignatureStatusesRequest | GetSignatureStatusesRequestJson): {
|
|
58
|
-
result: () => GetSignatureStatusesReply;
|
|
59
|
-
};
|
|
60
|
-
getSlotHeight(runtime: Runtime<unknown>, input: GetSlotHeightRequest | GetSlotHeightRequestJson): {
|
|
61
|
-
result: () => GetSlotHeightReply;
|
|
62
|
-
};
|
|
63
|
-
getTransaction(runtime: Runtime<unknown>, input: GetTransactionRequest | GetTransactionRequestJson): {
|
|
64
|
-
result: () => GetTransactionReply;
|
|
65
|
-
};
|
|
66
|
-
logTrigger(config: FilterLogTriggerRequestJson): ClientLogTrigger;
|
|
67
|
-
writeReport(runtime: Runtime<unknown>, input: WriteCreReportRequest | WriteCreReportRequestJson): {
|
|
68
|
-
result: () => WriteReportReply;
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Trigger implementation for LogTrigger
|
|
73
|
-
*/
|
|
74
|
-
declare class ClientLogTrigger implements Trigger<Log, Log> {
|
|
75
|
-
private readonly _capabilityId;
|
|
76
|
-
private readonly _method;
|
|
77
|
-
private readonly ChainSelector;
|
|
78
|
-
readonly config: FilterLogTriggerRequest;
|
|
79
|
-
constructor(config: FilterLogTriggerRequest | FilterLogTriggerRequestJson, _capabilityId: string, _method: string, ChainSelector: bigint);
|
|
80
|
-
capabilityId(): string;
|
|
81
|
-
method(): string;
|
|
82
|
-
outputSchema(): import("@bufbuild/protobuf/codegenv2").GenMessage<Log, {
|
|
83
|
-
jsonType: import("../../../../../generated/capabilities/blockchain/solana/v1alpha/client_pb").LogJson;
|
|
84
|
-
}>;
|
|
85
|
-
configAsAny(): Any;
|
|
86
|
-
/**
|
|
87
|
-
* Transform the raw trigger output - override this method if needed
|
|
88
|
-
* Default implementation returns the raw output unchanged
|
|
89
|
-
*/
|
|
90
|
-
adapt(rawOutput: Log): Log;
|
|
91
|
-
}
|
|
92
|
-
export {};
|