@silvana-one/agent 1.0.42 → 1.1.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/node/grpc.d.ts +102 -37
- package/dist/node/grpc.js +166 -127
- package/dist/node/grpc.js.map +1 -1
- package/dist/node/index.cjs +169 -127
- package/dist/node/proto/silvana/coordinator/v1/coordinator_pb.d.ts +124 -0
- package/dist/node/proto/silvana/coordinator/v1/coordinator_pb.js +58 -38
- package/dist/node/proto/silvana/coordinator/v1/coordinator_pb.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/tsconfig.web.tsbuildinfo +1 -1
- package/dist/web/grpc.d.ts +102 -37
- package/dist/web/grpc.js +166 -127
- package/dist/web/grpc.js.map +1 -1
- package/dist/web/proto/silvana/coordinator/v1/coordinator_pb.d.ts +124 -0
- package/dist/web/proto/silvana/coordinator/v1/coordinator_pb.js +58 -38
- package/dist/web/proto/silvana/coordinator/v1/coordinator_pb.js.map +1 -1
- package/package.json +8 -8
- package/src/grpc.ts +245 -177
- package/src/proto/silvana/coordinator/v1/coordinator_pb.ts +184 -38
package/dist/node/grpc.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LogLevel, ProofEventType, type GetJobResponse, type CompleteJobResponse, type FailJobResponse, type TerminateJobResponse, type GetSequenceStatesResponse, type SubmitProofResponse, type SubmitStateResponse, type GetProofResponse, type GetBlockProofResponse, type GetBlockResponse, type GetBlockSettlementResponse, type UpdateBlockSettlementResponse, type Block, type BlockSettlement, type Metadata, type ReadDataAvailabilityResponse, type RetrieveSecretResponse, type SetKVResponse, type GetKVResponse, type DeleteKVResponse, type AddMetadataResponse, type GetMetadataResponse, type TryCreateBlockResponse, type UpdateBlockStateDataAvailabilityResponse, type UpdateBlockProofDataAvailabilityResponse, type UpdateBlockSettlementTxHashResponse, type UpdateBlockSettlementTxIncludedInBlockResponse, type CreateAppJobResponse, type RejectProofResponse, type ProofEventResponse, type AgentMessageResponse } from "./proto/silvana/coordinator/v1/coordinator_pb.js";
|
|
1
|
+
import { LogLevel, ProofEventType, type GetJobResponse, type CompleteJobResponse, type FailJobResponse, type TerminateJobResponse, type GetSequenceStatesResponse, type SubmitProofResponse, type SubmitStateResponse, type GetProofResponse, type GetBlockProofResponse, type GetBlockResponse, type GetBlockSettlementResponse, type UpdateBlockSettlementResponse, type GetSettlementProofResponse, type SubmitSettlementProofResponse, type Block, type BlockSettlement, type Metadata, type ReadDataAvailabilityResponse, type RetrieveSecretResponse, type SetKVResponse, type GetKVResponse, type DeleteKVResponse, type AddMetadataResponse, type GetMetadataResponse, type TryCreateBlockResponse, type UpdateBlockStateDataAvailabilityResponse, type UpdateBlockProofDataAvailabilityResponse, type UpdateBlockSettlementTxHashResponse, type UpdateBlockSettlementTxIncludedInBlockResponse, type CreateAppJobResponse, type RejectProofResponse, type ProofEventResponse, type AgentMessageResponse } from "./proto/silvana/coordinator/v1/coordinator_pb.js";
|
|
2
2
|
/**
|
|
3
3
|
* Retrieves a secret value from the coordinator service
|
|
4
4
|
* @param key The name/key of the secret to retrieve
|
|
@@ -28,15 +28,29 @@ export declare function getSequenceStates(sequence: bigint): Promise<GetSequence
|
|
|
28
28
|
/**
|
|
29
29
|
* Submits a proof
|
|
30
30
|
*/
|
|
31
|
-
export declare function submitProof(
|
|
31
|
+
export declare function submitProof(params: {
|
|
32
|
+
blockNumber: bigint;
|
|
33
|
+
sequences: bigint[];
|
|
34
|
+
proof: string;
|
|
35
|
+
cpuTime: bigint;
|
|
36
|
+
mergedSequences1?: bigint[];
|
|
37
|
+
mergedSequences2?: bigint[];
|
|
38
|
+
}): Promise<SubmitProofResponse>;
|
|
32
39
|
/**
|
|
33
40
|
* Submits state
|
|
34
41
|
*/
|
|
35
|
-
export declare function submitState(
|
|
42
|
+
export declare function submitState(params: {
|
|
43
|
+
sequence: bigint;
|
|
44
|
+
newStateData?: Uint8Array;
|
|
45
|
+
serializedState?: string;
|
|
46
|
+
}): Promise<SubmitStateResponse>;
|
|
36
47
|
/**
|
|
37
48
|
* Gets a proof
|
|
38
49
|
*/
|
|
39
|
-
export declare function getProof(
|
|
50
|
+
export declare function getProof(params: {
|
|
51
|
+
blockNumber: bigint;
|
|
52
|
+
sequences: bigint[];
|
|
53
|
+
}): Promise<GetProofResponse>;
|
|
40
54
|
/**
|
|
41
55
|
* Gets a block proof
|
|
42
56
|
*/
|
|
@@ -48,7 +62,10 @@ export declare function readDataAvailability(daHash: string): Promise<ReadDataAv
|
|
|
48
62
|
/**
|
|
49
63
|
* Sets a key-value pair in the app instance KV store
|
|
50
64
|
*/
|
|
51
|
-
export declare function setKv(
|
|
65
|
+
export declare function setKv(params: {
|
|
66
|
+
key: string;
|
|
67
|
+
value: string;
|
|
68
|
+
}): Promise<SetKVResponse>;
|
|
52
69
|
/**
|
|
53
70
|
* Gets a value from the app instance KV store
|
|
54
71
|
*/
|
|
@@ -60,7 +77,10 @@ export declare function deleteKv(key: string): Promise<DeleteKVResponse>;
|
|
|
60
77
|
/**
|
|
61
78
|
* Adds metadata to the app instance (write-once)
|
|
62
79
|
*/
|
|
63
|
-
export declare function addMetadata(
|
|
80
|
+
export declare function addMetadata(params: {
|
|
81
|
+
key: string;
|
|
82
|
+
value: string;
|
|
83
|
+
}): Promise<AddMetadataResponse>;
|
|
64
84
|
/**
|
|
65
85
|
* Gets metadata from the app instance
|
|
66
86
|
* @param key Optional metadata key. If not provided, returns app instance info only
|
|
@@ -78,19 +98,33 @@ export declare function tryCreateBlock(): Promise<TryCreateBlockResponse>;
|
|
|
78
98
|
/**
|
|
79
99
|
* Updates block state data availability
|
|
80
100
|
*/
|
|
81
|
-
export declare function updateBlockStateDataAvailability(
|
|
101
|
+
export declare function updateBlockStateDataAvailability(params: {
|
|
102
|
+
blockNumber: bigint;
|
|
103
|
+
stateDataAvailability: string;
|
|
104
|
+
}): Promise<UpdateBlockStateDataAvailabilityResponse>;
|
|
82
105
|
/**
|
|
83
106
|
* Updates block proof data availability
|
|
84
107
|
*/
|
|
85
|
-
export declare function updateBlockProofDataAvailability(
|
|
108
|
+
export declare function updateBlockProofDataAvailability(params: {
|
|
109
|
+
blockNumber: bigint;
|
|
110
|
+
proofDataAvailability: string;
|
|
111
|
+
}): Promise<UpdateBlockProofDataAvailabilityResponse>;
|
|
86
112
|
/**
|
|
87
113
|
* Updates block settlement transaction hash
|
|
88
114
|
*/
|
|
89
|
-
export declare function updateBlockSettlementTxHash(
|
|
115
|
+
export declare function updateBlockSettlementTxHash(params: {
|
|
116
|
+
blockNumber: bigint;
|
|
117
|
+
settlementTxHash: string;
|
|
118
|
+
settlementChain: string;
|
|
119
|
+
}): Promise<UpdateBlockSettlementTxHashResponse>;
|
|
90
120
|
/**
|
|
91
121
|
* Updates block settlement transaction included in block
|
|
92
122
|
*/
|
|
93
|
-
export declare function updateBlockSettlementTxIncludedInBlock(
|
|
123
|
+
export declare function updateBlockSettlementTxIncludedInBlock(params: {
|
|
124
|
+
blockNumber: bigint;
|
|
125
|
+
settledAt: bigint;
|
|
126
|
+
settlementChain: string;
|
|
127
|
+
}): Promise<UpdateBlockSettlementTxIncludedInBlockResponse>;
|
|
94
128
|
/**
|
|
95
129
|
* Creates a new app job
|
|
96
130
|
*/
|
|
@@ -111,20 +145,45 @@ export declare function getBlock(blockNumber: bigint): Promise<GetBlockResponse>
|
|
|
111
145
|
/**
|
|
112
146
|
* Rejects a proof for specific sequences
|
|
113
147
|
*/
|
|
114
|
-
export declare function rejectProof(
|
|
148
|
+
export declare function rejectProof(params: {
|
|
149
|
+
blockNumber: bigint;
|
|
150
|
+
sequences: bigint[];
|
|
151
|
+
}): Promise<RejectProofResponse>;
|
|
115
152
|
/**
|
|
116
153
|
* Gets a block settlement for a specific chain
|
|
117
154
|
*/
|
|
118
|
-
export declare function getBlockSettlement(
|
|
155
|
+
export declare function getBlockSettlement(params: {
|
|
156
|
+
blockNumber: bigint;
|
|
157
|
+
chain: string;
|
|
158
|
+
}): Promise<GetBlockSettlementResponse>;
|
|
119
159
|
/**
|
|
120
160
|
* Updates a block settlement for a specific chain
|
|
121
161
|
*/
|
|
122
|
-
export declare function updateBlockSettlement(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
162
|
+
export declare function updateBlockSettlement(params: {
|
|
163
|
+
blockNumber: bigint;
|
|
164
|
+
chain: string;
|
|
165
|
+
settlementData: {
|
|
166
|
+
settlementTxHash?: string;
|
|
167
|
+
settlementTxIncludedInBlock?: boolean;
|
|
168
|
+
sentToSettlementAt?: bigint;
|
|
169
|
+
settledAt?: bigint;
|
|
170
|
+
};
|
|
127
171
|
}): Promise<UpdateBlockSettlementResponse>;
|
|
172
|
+
/**
|
|
173
|
+
* Gets a settlement proof for a specific block and chain
|
|
174
|
+
*/
|
|
175
|
+
export declare function getSettlementProof(params: {
|
|
176
|
+
blockNumber: bigint;
|
|
177
|
+
settlementChain: string;
|
|
178
|
+
}): Promise<GetSettlementProofResponse>;
|
|
179
|
+
/**
|
|
180
|
+
* Submits a settlement proof
|
|
181
|
+
*/
|
|
182
|
+
export declare function submitSettlementProof(params: {
|
|
183
|
+
blockNumber: bigint;
|
|
184
|
+
proof: string;
|
|
185
|
+
cpuTime: bigint;
|
|
186
|
+
}): Promise<SubmitSettlementProofResponse>;
|
|
128
187
|
/**
|
|
129
188
|
* Sends a proof event to the coordinator
|
|
130
189
|
*/
|
|
@@ -142,24 +201,30 @@ export declare function proofEvent(params: {
|
|
|
142
201
|
*/
|
|
143
202
|
export declare function agentMessage(level: LogLevel, message: string): Promise<AgentMessageResponse>;
|
|
144
203
|
/**
|
|
145
|
-
*
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
204
|
+
* Agent logging interface
|
|
205
|
+
* Provides methods to log messages to both the console and coordinator
|
|
206
|
+
*/
|
|
207
|
+
export declare const agent: {
|
|
208
|
+
/**
|
|
209
|
+
* Logs a debug message to the coordinator and console
|
|
210
|
+
*/
|
|
211
|
+
debug: (...args: any[]) => Promise<void>;
|
|
212
|
+
/**
|
|
213
|
+
* Logs an info message to the coordinator and console
|
|
214
|
+
*/
|
|
215
|
+
info: (...args: any[]) => Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* Logs a warning message to the coordinator and console
|
|
218
|
+
*/
|
|
219
|
+
warn: (...args: any[]) => Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* Logs an error message to the coordinator and console
|
|
222
|
+
*/
|
|
223
|
+
error: (...args: any[]) => Promise<void>;
|
|
224
|
+
/**
|
|
225
|
+
* Logs a fatal message to the coordinator and console
|
|
226
|
+
*/
|
|
227
|
+
fatal: (...args: any[]) => Promise<void>;
|
|
228
|
+
};
|
|
229
|
+
export type { Block, BlockSettlement, Metadata, RetrieveSecretResponse, TerminateJobResponse, GetBlockResponse, GetBlockSettlementResponse, UpdateBlockSettlementResponse, GetSettlementProofResponse, SubmitSettlementProofResponse, RejectProofResponse, ProofEventResponse, AgentMessageResponse, };
|
|
165
230
|
export { LogLevel, ProofEventType };
|