@mysten/sui 2.22.1 → 2.23.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/CHANGELOG.md +38 -0
- package/dist/bcs/bcs.d.mts +6 -6
- package/dist/bcs/bcs.d.mts.map +1 -1
- package/dist/bcs/bcs.mjs +1 -19
- package/dist/bcs/bcs.mjs.map +1 -1
- package/dist/bcs/index.d.mts +3812 -906
- package/dist/bcs/index.d.mts.map +1 -1
- package/dist/bcs/index.mjs +2 -1
- package/dist/bcs/index.mjs.map +1 -1
- package/dist/bcs/transactions.mjs +147 -0
- package/dist/bcs/transactions.mjs.map +1 -0
- package/dist/client/core-resolver.mjs +2 -1
- package/dist/client/core-resolver.mjs.map +1 -1
- package/dist/client/core.d.mts +2 -0
- package/dist/client/core.d.mts.map +1 -1
- package/dist/client/core.mjs.map +1 -1
- package/dist/client/query-filters.mjs +119 -0
- package/dist/client/query-filters.mjs.map +1 -0
- package/dist/client/types.d.mts +166 -1
- package/dist/client/types.d.mts.map +1 -1
- package/dist/client/utils.d.mts.map +1 -1
- package/dist/client/utils.mjs +13 -1
- package/dist/client/utils.mjs.map +1 -1
- package/dist/cryptography/signature.d.mts +6 -6
- package/dist/graphql/client.d.mts +15 -2
- package/dist/graphql/client.d.mts.map +1 -1
- package/dist/graphql/client.mjs +6 -0
- package/dist/graphql/client.mjs.map +1 -1
- package/dist/graphql/core.d.mts +5 -1
- package/dist/graphql/core.d.mts.map +1 -1
- package/dist/graphql/core.mjs +85 -3
- package/dist/graphql/core.mjs.map +1 -1
- package/dist/graphql/generated/queries.d.mts.map +1 -1
- package/dist/graphql/generated/queries.mjs +137 -1
- package/dist/graphql/generated/queries.mjs.map +1 -1
- package/dist/graphql/generated/tada-env.d.mts +108 -0
- package/dist/graphql/index.d.mts +2 -2
- package/dist/grpc/client.d.mts +11 -0
- package/dist/grpc/client.d.mts.map +1 -1
- package/dist/grpc/client.mjs +6 -0
- package/dist/grpc/client.mjs.map +1 -1
- package/dist/grpc/core.d.mts +5 -1
- package/dist/grpc/core.d.mts.map +1 -1
- package/dist/grpc/core.mjs +100 -2
- package/dist/grpc/core.mjs.map +1 -1
- package/dist/grpc/filters.mjs +45 -0
- package/dist/grpc/filters.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/event.d.mts +31 -0
- package/dist/grpc/proto/sui/rpc/v2/event.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/event.mjs +30 -0
- package/dist/grpc/proto/sui/rpc/v2/event.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts +7 -0
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.mjs +8 -0
- package/dist/grpc/proto/sui/rpc/v2/executed_transaction.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/filter.d.mts +423 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.d.mts.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.mjs +297 -0
- package/dist/grpc/proto/sui/rpc/v2/filter.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts +62 -6
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.mjs +37 -0
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.client.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts +293 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs +241 -1
- package/dist/grpc/proto/sui/rpc/v2/ledger_service.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/move_package_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/name_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.d.mts +15 -2
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.mjs +11 -0
- package/dist/grpc/proto/sui/rpc/v2/protocol_config.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts +211 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.d.mts.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs +163 -0
- package/dist/grpc/proto/sui/rpc/v2/query_options.mjs.map +1 -0
- package/dist/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/state_service.client.d.mts +4 -4
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts +105 -23
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs +56 -9
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.client.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.d.mts +148 -8
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.d.mts.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.mjs +109 -8
- package/dist/grpc/proto/sui/rpc/v2/subscription_service.mjs.map +1 -1
- package/dist/grpc/proto/sui/rpc/v2/transaction_execution_service.client.d.mts +4 -4
- package/dist/grpc/proto/types.d.mts +5 -3
- package/dist/grpc/proto/types.mjs +33 -2
- package/dist/grpc/proto/types.mjs.map +1 -1
- package/dist/jsonRpc/core.d.mts +10 -0
- package/dist/jsonRpc/core.d.mts.map +1 -1
- package/dist/jsonRpc/core.mjs +85 -2
- package/dist/jsonRpc/core.mjs.map +1 -1
- package/dist/transactions/Transaction.d.mts +9 -9
- package/dist/transactions/Transaction.d.mts.map +1 -1
- package/dist/transactions/intents/CoinWithBalance.mjs +14 -18
- package/dist/transactions/intents/CoinWithBalance.mjs.map +1 -1
- package/dist/version.mjs +1 -1
- package/dist/version.mjs.map +1 -1
- package/dist/zklogin/bcs.d.mts +14 -14
- package/dist/zklogin/bcs.d.mts.map +1 -1
- package/docs/clients/core.md +115 -1
- package/docs/clients/grpc.md +68 -0
- package/docs/migrations/sui-2.0/json-rpc-migration.md +104 -101
- package/package.json +2 -2
- package/src/bcs/bcs.ts +0 -27
- package/src/bcs/index.ts +7 -5
- package/src/bcs/transactions.ts +226 -0
- package/src/client/core-resolver.ts +5 -1
- package/src/client/core.ts +8 -0
- package/src/client/query-filters.ts +195 -0
- package/src/client/types.ts +186 -1
- package/src/client/utils.ts +13 -0
- package/src/graphql/client.ts +25 -1
- package/src/graphql/core.ts +143 -3
- package/src/graphql/generated/queries.ts +226 -0
- package/src/graphql/generated/schema.graphql +75 -0
- package/src/graphql/generated/tada-env.ts +133 -0
- package/src/graphql/index.ts +1 -0
- package/src/graphql/queries/listEvents.graphql +40 -0
- package/src/graphql/queries/transactions.graphql +26 -0
- package/src/grpc/client.ts +19 -0
- package/src/grpc/core.ts +187 -3
- package/src/grpc/filters.ts +68 -0
- package/src/grpc/proto/sui/rpc/v2/event.ts +49 -0
- package/src/grpc/proto/sui/rpc/v2/executed_transaction.ts +15 -0
- package/src/grpc/proto/sui/rpc/v2/filter.ts +589 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.client.ts +111 -0
- package/src/grpc/proto/sui/rpc/v2/ledger_service.ts +406 -0
- package/src/grpc/proto/sui/rpc/v2/protocol_config.ts +22 -2
- package/src/grpc/proto/sui/rpc/v2/query_options.ts +255 -0
- package/src/grpc/proto/sui/rpc/v2/subscription_service.client.ts +136 -18
- package/src/grpc/proto/sui/rpc/v2/subscription_service.ts +187 -7
- package/src/grpc/proto/types.ts +2 -0
- package/src/jsonRpc/core.ts +136 -2
- package/src/transactions/intents/CoinWithBalance.ts +41 -41
- package/src/version.ts +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { MessageType } from "@protobuf-ts/runtime";
|
|
2
|
+
|
|
3
|
+
//#region src/grpc/proto/sui/rpc/v2/query_options.ts
|
|
4
|
+
/**
|
|
5
|
+
* Ordering for the returned result set.
|
|
6
|
+
*
|
|
7
|
+
* @generated from protobuf enum sui.rpc.v2.Ordering
|
|
8
|
+
*/
|
|
9
|
+
let Ordering = /* @__PURE__ */ function(Ordering$1) {
|
|
10
|
+
/**
|
|
11
|
+
* Return results in increasing cursor order.
|
|
12
|
+
*
|
|
13
|
+
* @generated from protobuf enum value: ORDERING_ASCENDING = 0;
|
|
14
|
+
*/
|
|
15
|
+
Ordering$1[Ordering$1["ASCENDING"] = 0] = "ASCENDING";
|
|
16
|
+
/**
|
|
17
|
+
* Return results in decreasing cursor order.
|
|
18
|
+
*
|
|
19
|
+
* @generated from protobuf enum value: ORDERING_DESCENDING = 1;
|
|
20
|
+
*/
|
|
21
|
+
Ordering$1[Ordering$1["DESCENDING"] = 1] = "DESCENDING";
|
|
22
|
+
return Ordering$1;
|
|
23
|
+
}({});
|
|
24
|
+
/**
|
|
25
|
+
* Reason the server stopped this query response.
|
|
26
|
+
*
|
|
27
|
+
* @generated from protobuf enum sui.rpc.v2.QueryEndReason
|
|
28
|
+
*/
|
|
29
|
+
let QueryEndReason = /* @__PURE__ */ function(QueryEndReason$1) {
|
|
30
|
+
/**
|
|
31
|
+
* The stop reason was not specified.
|
|
32
|
+
*
|
|
33
|
+
* @generated from protobuf enum value: QUERY_END_REASON_UNKNOWN = 0;
|
|
34
|
+
*/
|
|
35
|
+
QueryEndReason$1[QueryEndReason$1["UNKNOWN"] = 0] = "UNKNOWN";
|
|
36
|
+
/**
|
|
37
|
+
* The response reached the requested item limit. The final matching item's
|
|
38
|
+
* frame carries `QueryEnd` and the final watermark. Resume from that frame's
|
|
39
|
+
* `Watermark.cursor` to continue reading the same effective interval.
|
|
40
|
+
*
|
|
41
|
+
* @generated from protobuf enum value: QUERY_END_REASON_ITEM_LIMIT = 1;
|
|
42
|
+
*/
|
|
43
|
+
QueryEndReason$1[QueryEndReason$1["ITEM_LIMIT"] = 1] = "ITEM_LIMIT";
|
|
44
|
+
/**
|
|
45
|
+
* The response reached the server's per-request bucket-fetch budget for
|
|
46
|
+
* filtered scans before reaching the effective interval bound. The terminal
|
|
47
|
+
* frame carries no item. Its watermark cursor is the authoritative scan
|
|
48
|
+
* frontier from which to resume.
|
|
49
|
+
*
|
|
50
|
+
* @generated from protobuf enum value: QUERY_END_REASON_SCAN_LIMIT = 2;
|
|
51
|
+
*/
|
|
52
|
+
QueryEndReason$1[QueryEndReason$1["SCAN_LIMIT"] = 2] = "SCAN_LIMIT";
|
|
53
|
+
/**
|
|
54
|
+
* The scan reached a requested checkpoint range bound. The terminal frame
|
|
55
|
+
* carries no item.
|
|
56
|
+
*
|
|
57
|
+
* @generated from protobuf enum value: QUERY_END_REASON_CHECKPOINT_BOUND = 3;
|
|
58
|
+
*/
|
|
59
|
+
QueryEndReason$1[QueryEndReason$1["CHECKPOINT_BOUND"] = 3] = "CHECKPOINT_BOUND";
|
|
60
|
+
/**
|
|
61
|
+
* The scan reached an exclusive cursor bound. The terminal frame carries no
|
|
62
|
+
* item. Its watermark cursor represents that resolved bound without claiming
|
|
63
|
+
* that its containing checkpoint was fully covered.
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf enum value: QUERY_END_REASON_CURSOR_BOUND = 4;
|
|
66
|
+
*/
|
|
67
|
+
QueryEndReason$1[QueryEndReason$1["CURSOR_BOUND"] = 4] = "CURSOR_BOUND";
|
|
68
|
+
/**
|
|
69
|
+
* The scan reached the currently indexed ledger tip. The terminal frame
|
|
70
|
+
* carries no item.
|
|
71
|
+
*
|
|
72
|
+
* @generated from protobuf enum value: QUERY_END_REASON_LEDGER_TIP = 5;
|
|
73
|
+
*/
|
|
74
|
+
QueryEndReason$1[QueryEndReason$1["LEDGER_TIP"] = 5] = "LEDGER_TIP";
|
|
75
|
+
return QueryEndReason$1;
|
|
76
|
+
}({});
|
|
77
|
+
var QueryOptions$Type = class extends MessageType {
|
|
78
|
+
constructor() {
|
|
79
|
+
super("sui.rpc.v2.QueryOptions", [
|
|
80
|
+
{
|
|
81
|
+
no: 1,
|
|
82
|
+
name: "limit",
|
|
83
|
+
kind: "scalar",
|
|
84
|
+
opt: true,
|
|
85
|
+
T: 13
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
no: 2,
|
|
89
|
+
name: "after",
|
|
90
|
+
kind: "scalar",
|
|
91
|
+
opt: true,
|
|
92
|
+
T: 12
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
no: 3,
|
|
96
|
+
name: "before",
|
|
97
|
+
kind: "scalar",
|
|
98
|
+
opt: true,
|
|
99
|
+
T: 12
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
no: 4,
|
|
103
|
+
name: "ordering",
|
|
104
|
+
kind: "enum",
|
|
105
|
+
opt: true,
|
|
106
|
+
T: () => [
|
|
107
|
+
"sui.rpc.v2.Ordering",
|
|
108
|
+
Ordering,
|
|
109
|
+
"ORDERING_"
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
]);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* @generated MessageType for protobuf message sui.rpc.v2.QueryOptions
|
|
117
|
+
*/
|
|
118
|
+
const QueryOptions = new QueryOptions$Type();
|
|
119
|
+
var Watermark$Type = class extends MessageType {
|
|
120
|
+
constructor() {
|
|
121
|
+
super("sui.rpc.v2.Watermark", [{
|
|
122
|
+
no: 1,
|
|
123
|
+
name: "cursor",
|
|
124
|
+
kind: "scalar",
|
|
125
|
+
opt: true,
|
|
126
|
+
T: 12
|
|
127
|
+
}, {
|
|
128
|
+
no: 2,
|
|
129
|
+
name: "checkpoint",
|
|
130
|
+
kind: "scalar",
|
|
131
|
+
opt: true,
|
|
132
|
+
T: 4,
|
|
133
|
+
L: 0
|
|
134
|
+
}]);
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
/**
|
|
138
|
+
* @generated MessageType for protobuf message sui.rpc.v2.Watermark
|
|
139
|
+
*/
|
|
140
|
+
const Watermark = new Watermark$Type();
|
|
141
|
+
var QueryEnd$Type = class extends MessageType {
|
|
142
|
+
constructor() {
|
|
143
|
+
super("sui.rpc.v2.QueryEnd", [{
|
|
144
|
+
no: 1,
|
|
145
|
+
name: "reason",
|
|
146
|
+
kind: "enum",
|
|
147
|
+
opt: true,
|
|
148
|
+
T: () => [
|
|
149
|
+
"sui.rpc.v2.QueryEndReason",
|
|
150
|
+
QueryEndReason,
|
|
151
|
+
"QUERY_END_REASON_"
|
|
152
|
+
]
|
|
153
|
+
}]);
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
/**
|
|
157
|
+
* @generated MessageType for protobuf message sui.rpc.v2.QueryEnd
|
|
158
|
+
*/
|
|
159
|
+
const QueryEnd = new QueryEnd$Type();
|
|
160
|
+
|
|
161
|
+
//#endregion
|
|
162
|
+
export { Ordering, QueryEnd, QueryEndReason, QueryOptions, Watermark };
|
|
163
|
+
//# sourceMappingURL=query_options.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query_options.mjs","names":[],"sources":["../../../../../../src/grpc/proto/sui/rpc/v2/query_options.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"sui/rpc/v2/query_options.proto\" (package \"sui.rpc.v2\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n//\nimport { MessageType } from '@protobuf-ts/runtime';\n/**\n * Cursor-bounded query options.\n *\n * `after` and `before` are canonical ledger-position bounds, not\n * ordering-relative cursors. `after` always excludes items at or below that\n * cursor, and `before` always excludes items at or above that cursor. Ordering\n * only controls the order of returned items within the resulting open interval.\n *\n * When a request also specifies a checkpoint range, cursor bounds and\n * checkpoint bounds compose by intersection: results come only from ledger\n * positions inside both. Checkpoint bounds are likewise canonical and\n * ordering-independent.\n *\n * For example, with `after = A`, `before = B`, `ordering = DESCENDING`, and\n * `limit = N`, the response contains up to N matching items in descending\n * order from the interval `(A, B)`. If the response ends with\n * `QUERY_END_REASON_ITEM_LIMIT`, resume by keeping `after = A` and setting\n * `before` to the last `Watermark.cursor` received. That cursor is the\n * lowest position reached in ledger order, so it becomes the next exclusive\n * upper bound.\n *\n * @generated from protobuf message sui.rpc.v2.QueryOptions\n */\nexport interface QueryOptions {\n\t/**\n\t * The maximum number of items to return. Each method applies its own default\n\t * and maximum. QueryEnd does not count against this limit.\n\t *\n\t * @generated from protobuf field: optional uint32 limit = 1;\n\t */\n\tlimit?: number;\n\t/**\n\t * Opaque exclusive lower bound. Results must be strictly after this cursor in\n\t * canonical ledger order.\n\t *\n\t * @generated from protobuf field: optional bytes after = 2;\n\t */\n\tafter?: Uint8Array;\n\t/**\n\t * Opaque exclusive upper bound. Results must be strictly before this cursor\n\t * in canonical ledger order.\n\t *\n\t * @generated from protobuf field: optional bytes before = 3;\n\t */\n\tbefore?: Uint8Array;\n\t/**\n\t * Ordering for returned results. Defaults to ASCENDING.\n\t *\n\t * Ordering only controls the order of results within the bounded interval;\n\t * cursor bounds keep the same meaning for ascending and descending reads.\n\t *\n\t * @generated from protobuf field: optional sui.rpc.v2.Ordering ordering = 4;\n\t */\n\tordering?: Ordering;\n}\n/**\n * Progress marker for a query scan. Carried on every response frame, whether or\n * not the frame delivers a matching item. Watermarks never regress in the\n * requested ordering, but consecutive frames may carry the same watermark when\n * additional work does not advance the safe resume frontier.\n *\n * @generated from protobuf message sui.rpc.v2.Watermark\n */\nexport interface Watermark {\n\t/**\n\t * Opaque cursor at this scan position. Set on every watermark. Use as\n\t * `options.after` (ascending) or `options.before` (descending) on the next\n\t * request to resume from here. The most recently received cursor is always\n\t * the safe resume point.\n\t *\n\t * @generated from protobuf field: optional bytes cursor = 1;\n\t */\n\tcursor?: Uint8Array;\n\t/**\n\t * The inclusive boundary checkpoint that the scan has fully covered within\n\t * the request's effective interval, in the request's ordering direction: an\n\t * ascending scan has emitted every matching item in the interval at\n\t * checkpoints `<= checkpoint` (strictly greater ones may still hold\n\t * matches); a descending scan has emitted every matching item in the\n\t * interval at checkpoints `>= checkpoint`. This boundary never regresses in\n\t * the scan direction, but it may repeat while the cursor advances.\n\t *\n\t * Unset until the scan's first checkpoint is fully covered. For example, a\n\t * scan resumed from a cursor that lands mid-checkpoint leaves this unset\n\t * until the next checkpoint boundary in the scan direction is fully covered.\n\t * A watermark still has a valid resume cursor while this field is unset.\n\t *\n\t * @generated from protobuf field: optional uint64 checkpoint = 2;\n\t */\n\tcheckpoint?: bigint;\n}\n/**\n * Marker for the final frame of a successful query stream. Every successful\n * stream sets `QueryEnd` on exactly one frame, after which no further frames\n * are sent. That frame always carries the final watermark. For `ItemLimit`, it\n * also carries the final matching item; for every other reason it carries no\n * item. A ScanLimit terminal watermark may repeat the previous frame's cursor\n * when its authoritative scan frontier was already emitted; this does not\n * repeat an item.\n *\n * A stream that fails or is cancelled terminates with a gRPC status and does\n * not send `QueryEnd`.\n *\n * @generated from protobuf message sui.rpc.v2.QueryEnd\n */\nexport interface QueryEnd {\n\t/**\n\t * Reason this response stopped.\n\t *\n\t * @generated from protobuf field: optional sui.rpc.v2.QueryEndReason reason = 1;\n\t */\n\treason?: QueryEndReason;\n}\n/**\n * Ordering for the returned result set.\n *\n * @generated from protobuf enum sui.rpc.v2.Ordering\n */\nexport enum Ordering {\n\t/**\n\t * Return results in increasing cursor order.\n\t *\n\t * @generated from protobuf enum value: ORDERING_ASCENDING = 0;\n\t */\n\tASCENDING = 0,\n\t/**\n\t * Return results in decreasing cursor order.\n\t *\n\t * @generated from protobuf enum value: ORDERING_DESCENDING = 1;\n\t */\n\tDESCENDING = 1,\n}\n/**\n * Reason the server stopped this query response.\n *\n * @generated from protobuf enum sui.rpc.v2.QueryEndReason\n */\nexport enum QueryEndReason {\n\t/**\n\t * The stop reason was not specified.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_UNKNOWN = 0;\n\t */\n\tUNKNOWN = 0,\n\t/**\n\t * The response reached the requested item limit. The final matching item's\n\t * frame carries `QueryEnd` and the final watermark. Resume from that frame's\n\t * `Watermark.cursor` to continue reading the same effective interval.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_ITEM_LIMIT = 1;\n\t */\n\tITEM_LIMIT = 1,\n\t/**\n\t * The response reached the server's per-request bucket-fetch budget for\n\t * filtered scans before reaching the effective interval bound. The terminal\n\t * frame carries no item. Its watermark cursor is the authoritative scan\n\t * frontier from which to resume.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_SCAN_LIMIT = 2;\n\t */\n\tSCAN_LIMIT = 2,\n\t/**\n\t * The scan reached a requested checkpoint range bound. The terminal frame\n\t * carries no item.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_CHECKPOINT_BOUND = 3;\n\t */\n\tCHECKPOINT_BOUND = 3,\n\t/**\n\t * The scan reached an exclusive cursor bound. The terminal frame carries no\n\t * item. Its watermark cursor represents that resolved bound without claiming\n\t * that its containing checkpoint was fully covered.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_CURSOR_BOUND = 4;\n\t */\n\tCURSOR_BOUND = 4,\n\t/**\n\t * The scan reached the currently indexed ledger tip. The terminal frame\n\t * carries no item.\n\t *\n\t * @generated from protobuf enum value: QUERY_END_REASON_LEDGER_TIP = 5;\n\t */\n\tLEDGER_TIP = 5,\n}\n// @generated message type with reflection information, may provide speed optimized methods\nclass QueryOptions$Type extends MessageType<QueryOptions> {\n\tconstructor() {\n\t\tsuper('sui.rpc.v2.QueryOptions', [\n\t\t\t{ no: 1, name: 'limit', kind: 'scalar', opt: true, T: 13 /*ScalarType.UINT32*/ },\n\t\t\t{ no: 2, name: 'after', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },\n\t\t\t{ no: 3, name: 'before', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },\n\t\t\t{\n\t\t\t\tno: 4,\n\t\t\t\tname: 'ordering',\n\t\t\t\tkind: 'enum',\n\t\t\t\topt: true,\n\t\t\t\tT: () => ['sui.rpc.v2.Ordering', Ordering, 'ORDERING_'],\n\t\t\t},\n\t\t]);\n\t}\n}\n/**\n * @generated MessageType for protobuf message sui.rpc.v2.QueryOptions\n */\nexport const QueryOptions = new QueryOptions$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass Watermark$Type extends MessageType<Watermark> {\n\tconstructor() {\n\t\tsuper('sui.rpc.v2.Watermark', [\n\t\t\t{ no: 1, name: 'cursor', kind: 'scalar', opt: true, T: 12 /*ScalarType.BYTES*/ },\n\t\t\t{\n\t\t\t\tno: 2,\n\t\t\t\tname: 'checkpoint',\n\t\t\t\tkind: 'scalar',\n\t\t\t\topt: true,\n\t\t\t\tT: 4 /*ScalarType.UINT64*/,\n\t\t\t\tL: 0 /*LongType.BIGINT*/,\n\t\t\t},\n\t\t]);\n\t}\n}\n/**\n * @generated MessageType for protobuf message sui.rpc.v2.Watermark\n */\nexport const Watermark = new Watermark$Type();\n// @generated message type with reflection information, may provide speed optimized methods\nclass QueryEnd$Type extends MessageType<QueryEnd> {\n\tconstructor() {\n\t\tsuper('sui.rpc.v2.QueryEnd', [\n\t\t\t{\n\t\t\t\tno: 1,\n\t\t\t\tname: 'reason',\n\t\t\t\tkind: 'enum',\n\t\t\t\topt: true,\n\t\t\t\tT: () => ['sui.rpc.v2.QueryEndReason', QueryEndReason, 'QUERY_END_REASON_'],\n\t\t\t},\n\t\t]);\n\t}\n}\n/**\n * @generated MessageType for protobuf message sui.rpc.v2.QueryEnd\n */\nexport const QueryEnd = new QueryEnd$Type();\n"],"mappings":";;;;;;;;AAkIA,IAAY,gDAAL;;;;;;AAMN;;;;;;AAMA;;;;;;;;AAOD,IAAY,4DAAL;;;;;;AAMN;;;;;;;;AAQA;;;;;;;;;AASA;;;;;;;AAOA;;;;;;;;AAQA;;;;;;;AAOA;;;AAGD,IAAM,oBAAN,cAAgC,YAA0B;CACzD,cAAc;AACb,QAAM,2BAA2B;GAChC;IAAE,IAAI;IAAG,MAAM;IAAS,MAAM;IAAU,KAAK;IAAM,GAAG;IAA0B;GAChF;IAAE,IAAI;IAAG,MAAM;IAAS,MAAM;IAAU,KAAK;IAAM,GAAG;IAAyB;GAC/E;IAAE,IAAI;IAAG,MAAM;IAAU,MAAM;IAAU,KAAK;IAAM,GAAG;IAAyB;GAChF;IACC,IAAI;IACJ,MAAM;IACN,MAAM;IACN,KAAK;IACL,SAAS;KAAC;KAAuB;KAAU;KAAY;IACvD;GACD,CAAC;;;;;;AAMJ,MAAa,eAAe,IAAI,mBAAmB;AAEnD,IAAM,iBAAN,cAA6B,YAAuB;CACnD,cAAc;AACb,QAAM,wBAAwB,CAC7B;GAAE,IAAI;GAAG,MAAM;GAAU,MAAM;GAAU,KAAK;GAAM,GAAG;GAAyB,EAChF;GACC,IAAI;GACJ,MAAM;GACN,MAAM;GACN,KAAK;GACL,GAAG;GACH,GAAG;GACH,CACD,CAAC;;;;;;AAMJ,MAAa,YAAY,IAAI,gBAAgB;AAE7C,IAAM,gBAAN,cAA4B,YAAsB;CACjD,cAAc;AACb,QAAM,uBAAuB,CAC5B;GACC,IAAI;GACJ,MAAM;GACN,MAAM;GACN,KAAK;GACL,SAAS;IAAC;IAA6B;IAAgB;IAAoB;GAC3E,CACD,CAAC;;;;;;AAMJ,MAAa,WAAW,IAAI,eAAe"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { VerifySignatureRequest, VerifySignatureResponse } from "./signature_verification_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime1 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc1 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/signature_verification_service.client.d.ts
|
|
@@ -21,9 +21,9 @@ interface ISignatureVerificationServiceClient {
|
|
|
21
21
|
declare class SignatureVerificationServiceClient implements ISignatureVerificationServiceClient, ServiceInfo {
|
|
22
22
|
private readonly _transport;
|
|
23
23
|
typeName: string;
|
|
24
|
-
methods:
|
|
24
|
+
methods: _protobuf_ts_runtime_rpc1.MethodInfo<any, any>[];
|
|
25
25
|
options: {
|
|
26
|
-
[extensionName: string]:
|
|
26
|
+
[extensionName: string]: _protobuf_ts_runtime1.JsonValue;
|
|
27
27
|
};
|
|
28
28
|
constructor(_transport: RpcTransport);
|
|
29
29
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GetBalanceRequest, GetBalanceResponse, GetCoinInfoRequest, GetCoinInfoResponse, ListBalancesRequest, ListBalancesResponse, ListDynamicFieldsRequest, ListDynamicFieldsResponse, ListOwnedObjectsRequest, ListOwnedObjectsResponse } from "./state_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _protobuf_ts_runtime3 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc3 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServiceInfo, UnaryCall } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/state_service.client.d.ts
|
|
@@ -35,9 +35,9 @@ interface IStateServiceClient {
|
|
|
35
35
|
declare class StateServiceClient implements IStateServiceClient, ServiceInfo {
|
|
36
36
|
private readonly _transport;
|
|
37
37
|
typeName: string;
|
|
38
|
-
methods:
|
|
38
|
+
methods: _protobuf_ts_runtime_rpc3.MethodInfo<any, any>[];
|
|
39
39
|
options: {
|
|
40
|
-
[extensionName: string]:
|
|
40
|
+
[extensionName: string]: _protobuf_ts_runtime3.JsonValue;
|
|
41
41
|
};
|
|
42
42
|
constructor(_transport: RpcTransport);
|
|
43
43
|
/**
|
|
@@ -1,57 +1,139 @@
|
|
|
1
|
-
import { SubscribeCheckpointsRequest, SubscribeCheckpointsResponse } from "./subscription_service.mjs";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
1
|
+
import { SubscribeCheckpointsRequest, SubscribeCheckpointsResponse, SubscribeEventsRequest, SubscribeEventsResponse, SubscribeTransactionsRequest, SubscribeTransactionsResponse } from "./subscription_service.mjs";
|
|
2
|
+
import * as _protobuf_ts_runtime5 from "@protobuf-ts/runtime";
|
|
3
|
+
import * as _protobuf_ts_runtime_rpc5 from "@protobuf-ts/runtime-rpc";
|
|
4
4
|
import { RpcOptions, RpcTransport, ServerStreamingCall, ServiceInfo } from "@protobuf-ts/runtime-rpc";
|
|
5
5
|
|
|
6
6
|
//#region src/grpc/proto/sui/rpc/v2/subscription_service.client.d.ts
|
|
7
7
|
/**
|
|
8
|
+
* SubscriptionService provides filtered, real-time streams of checkpoints,
|
|
9
|
+
* transactions, and events.
|
|
10
|
+
*
|
|
11
|
+
* Each Subscribe API pairs with the LedgerService List API of the same name:
|
|
12
|
+
* requests take the same filter message, and responses carry the same item
|
|
13
|
+
* and watermark shapes with identical cursor semantics.
|
|
14
|
+
*
|
|
15
|
+
* Subscriptions do not support resumption. A new subscription always begins
|
|
16
|
+
* at the current tip of the chain as seen by the server (the latest executed
|
|
17
|
+
* checkpoint). To recover data missed between subscriptions, replay the gap
|
|
18
|
+
* with the paired List API: pass the last received `Watermark.cursor` as
|
|
19
|
+
* `options.after` on the List request (for checkpoints, pass the last
|
|
20
|
+
* received `cursor + 1` as `start_checkpoint`). The List scan reads from the
|
|
21
|
+
* indexed tip, which may trail the subscription's start position; repeat the
|
|
22
|
+
* List call as the index advances until the replay reaches the position
|
|
23
|
+
* established by the subscription's first frame.
|
|
24
|
+
*
|
|
25
|
+
* A subscription behaves like an unbounded ascending scan: every frame
|
|
26
|
+
* carries the subscriber's resume point, and progress advances as
|
|
27
|
+
* checkpoints are fully covered. Two delivery guarantees keep sparse
|
|
28
|
+
* filters live: the first frame on a filtered subscription is a
|
|
29
|
+
* progress-only frame establishing the stream's start position, and
|
|
30
|
+
* progress continues to advance with bounded staleness even when no item
|
|
31
|
+
* matches.
|
|
32
|
+
*
|
|
33
|
+
* Subscription streams have no successful end: they run until cancelled by
|
|
34
|
+
* the client or terminated by the server with a gRPC status.
|
|
35
|
+
*
|
|
8
36
|
* @generated from protobuf service sui.rpc.v2.SubscriptionService
|
|
9
37
|
*/
|
|
10
38
|
interface ISubscriptionServiceClient {
|
|
11
39
|
/**
|
|
12
40
|
* Subscribe to the stream of checkpoints.
|
|
13
41
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* clients to know exactly the last checkpoint they have processed and in the
|
|
19
|
-
* event the subscription terminates (either by the client/server or by the
|
|
20
|
-
* connection breaking), clients will be able to reinitialize a subscription
|
|
21
|
-
* and then leverage other APIs in order to request data for the checkpoints
|
|
22
|
-
* they missed.
|
|
42
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
43
|
+
* server and yields checkpoints matching the filter as they are executed.
|
|
44
|
+
* A checkpoint matches if any transaction it contains satisfies the
|
|
45
|
+
* filter.
|
|
23
46
|
*
|
|
24
47
|
* @generated from protobuf rpc: SubscribeCheckpoints(sui.rpc.v2.SubscribeCheckpointsRequest) returns (stream sui.rpc.v2.SubscribeCheckpointsResponse);
|
|
25
48
|
*/
|
|
26
49
|
subscribeCheckpoints(input: SubscribeCheckpointsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeCheckpointsRequest, SubscribeCheckpointsResponse>;
|
|
50
|
+
/**
|
|
51
|
+
* Subscribe to the stream of transactions.
|
|
52
|
+
*
|
|
53
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
54
|
+
* server and yields transactions matching the filter as they are executed.
|
|
55
|
+
*
|
|
56
|
+
* @generated from protobuf rpc: SubscribeTransactions(sui.rpc.v2.SubscribeTransactionsRequest) returns (stream sui.rpc.v2.SubscribeTransactionsResponse);
|
|
57
|
+
*/
|
|
58
|
+
subscribeTransactions(input: SubscribeTransactionsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeTransactionsRequest, SubscribeTransactionsResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Subscribe to the stream of events.
|
|
61
|
+
*
|
|
62
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
63
|
+
* server and yields events matching the filter as they are emitted.
|
|
64
|
+
*
|
|
65
|
+
* @generated from protobuf rpc: SubscribeEvents(sui.rpc.v2.SubscribeEventsRequest) returns (stream sui.rpc.v2.SubscribeEventsResponse);
|
|
66
|
+
*/
|
|
67
|
+
subscribeEvents(input: SubscribeEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeEventsRequest, SubscribeEventsResponse>;
|
|
27
68
|
}
|
|
28
69
|
/**
|
|
70
|
+
* SubscriptionService provides filtered, real-time streams of checkpoints,
|
|
71
|
+
* transactions, and events.
|
|
72
|
+
*
|
|
73
|
+
* Each Subscribe API pairs with the LedgerService List API of the same name:
|
|
74
|
+
* requests take the same filter message, and responses carry the same item
|
|
75
|
+
* and watermark shapes with identical cursor semantics.
|
|
76
|
+
*
|
|
77
|
+
* Subscriptions do not support resumption. A new subscription always begins
|
|
78
|
+
* at the current tip of the chain as seen by the server (the latest executed
|
|
79
|
+
* checkpoint). To recover data missed between subscriptions, replay the gap
|
|
80
|
+
* with the paired List API: pass the last received `Watermark.cursor` as
|
|
81
|
+
* `options.after` on the List request (for checkpoints, pass the last
|
|
82
|
+
* received `cursor + 1` as `start_checkpoint`). The List scan reads from the
|
|
83
|
+
* indexed tip, which may trail the subscription's start position; repeat the
|
|
84
|
+
* List call as the index advances until the replay reaches the position
|
|
85
|
+
* established by the subscription's first frame.
|
|
86
|
+
*
|
|
87
|
+
* A subscription behaves like an unbounded ascending scan: every frame
|
|
88
|
+
* carries the subscriber's resume point, and progress advances as
|
|
89
|
+
* checkpoints are fully covered. Two delivery guarantees keep sparse
|
|
90
|
+
* filters live: the first frame on a filtered subscription is a
|
|
91
|
+
* progress-only frame establishing the stream's start position, and
|
|
92
|
+
* progress continues to advance with bounded staleness even when no item
|
|
93
|
+
* matches.
|
|
94
|
+
*
|
|
95
|
+
* Subscription streams have no successful end: they run until cancelled by
|
|
96
|
+
* the client or terminated by the server with a gRPC status.
|
|
97
|
+
*
|
|
29
98
|
* @generated from protobuf service sui.rpc.v2.SubscriptionService
|
|
30
99
|
*/
|
|
31
100
|
declare class SubscriptionServiceClient implements ISubscriptionServiceClient, ServiceInfo {
|
|
32
101
|
private readonly _transport;
|
|
33
102
|
typeName: string;
|
|
34
|
-
methods:
|
|
103
|
+
methods: _protobuf_ts_runtime_rpc5.MethodInfo<any, any>[];
|
|
35
104
|
options: {
|
|
36
|
-
[extensionName: string]:
|
|
105
|
+
[extensionName: string]: _protobuf_ts_runtime5.JsonValue;
|
|
37
106
|
};
|
|
38
107
|
constructor(_transport: RpcTransport);
|
|
39
108
|
/**
|
|
40
109
|
* Subscribe to the stream of checkpoints.
|
|
41
110
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
* clients to know exactly the last checkpoint they have processed and in the
|
|
47
|
-
* event the subscription terminates (either by the client/server or by the
|
|
48
|
-
* connection breaking), clients will be able to reinitialize a subscription
|
|
49
|
-
* and then leverage other APIs in order to request data for the checkpoints
|
|
50
|
-
* they missed.
|
|
111
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
112
|
+
* server and yields checkpoints matching the filter as they are executed.
|
|
113
|
+
* A checkpoint matches if any transaction it contains satisfies the
|
|
114
|
+
* filter.
|
|
51
115
|
*
|
|
52
116
|
* @generated from protobuf rpc: SubscribeCheckpoints(sui.rpc.v2.SubscribeCheckpointsRequest) returns (stream sui.rpc.v2.SubscribeCheckpointsResponse);
|
|
53
117
|
*/
|
|
54
118
|
subscribeCheckpoints(input: SubscribeCheckpointsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeCheckpointsRequest, SubscribeCheckpointsResponse>;
|
|
119
|
+
/**
|
|
120
|
+
* Subscribe to the stream of transactions.
|
|
121
|
+
*
|
|
122
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
123
|
+
* server and yields transactions matching the filter as they are executed.
|
|
124
|
+
*
|
|
125
|
+
* @generated from protobuf rpc: SubscribeTransactions(sui.rpc.v2.SubscribeTransactionsRequest) returns (stream sui.rpc.v2.SubscribeTransactionsResponse);
|
|
126
|
+
*/
|
|
127
|
+
subscribeTransactions(input: SubscribeTransactionsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeTransactionsRequest, SubscribeTransactionsResponse>;
|
|
128
|
+
/**
|
|
129
|
+
* Subscribe to the stream of events.
|
|
130
|
+
*
|
|
131
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
132
|
+
* server and yields events matching the filter as they are emitted.
|
|
133
|
+
*
|
|
134
|
+
* @generated from protobuf rpc: SubscribeEvents(sui.rpc.v2.SubscribeEventsRequest) returns (stream sui.rpc.v2.SubscribeEventsResponse);
|
|
135
|
+
*/
|
|
136
|
+
subscribeEvents(input: SubscribeEventsRequest, options?: RpcOptions): ServerStreamingCall<SubscribeEventsRequest, SubscribeEventsResponse>;
|
|
55
137
|
}
|
|
56
138
|
//#endregion
|
|
57
139
|
export { SubscriptionServiceClient };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription_service.client.d.mts","names":[],"sources":["../../../../../../src/grpc/proto/sui/rpc/v2/subscription_service.client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription_service.client.d.mts","names":[],"sources":["../../../../../../src/grpc/proto/sui/rpc/v2/subscription_service.client.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAsDiB,0BAAA;EAmChB;;;;;;;;;;EAxBA,oBAAA,CACC,KAAA,EAAO,2BAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,2BAAA,EAA6B,4BAAA;EAyDd;;;;;;;;EAhDtC,qBAAA,CACC,KAAA,EAAO,4BAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,4BAAA,EAA8B,6BAAA;EA+DlD;;;;;;;;EAtDH,eAAA,CACC,KAAA,EAAO,sBAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,sBAAA,EAAwB,uBAAA;AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiCnC,yBAAA,YAAqC,0BAAA,EAA4B,WAAA;EAAA,iBAIhD,UAAA;EAH7B,QAAA;EACA,OAAA,EAFsC,yBAAA,CAE/B,UAAA;EACP,OAAA;IAAA,yBADO,qBAAA,CAAA,SAAA;EAAA;cAEsB,UAAA,EAAY,YAAA;EA0DlB;;;;;;;;;;EA/CvB,oBAAA,CACC,KAAA,EAAO,2BAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,2BAAA,EAA6B,4BAAA;;;;;;;;;EAmBpD,qBAAA,CACC,KAAA,EAAO,4BAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,4BAAA,EAA8B,6BAAA;;;;;;;;;EAmBrD,eAAA,CACC,KAAA,EAAO,sBAAA,EACP,OAAA,GAAU,UAAA,GACR,mBAAA,CAAoB,sBAAA,EAAwB,uBAAA;AAAA"}
|
|
@@ -3,6 +3,34 @@ import { stackIntercept } from "@protobuf-ts/runtime-rpc";
|
|
|
3
3
|
|
|
4
4
|
//#region src/grpc/proto/sui/rpc/v2/subscription_service.client.ts
|
|
5
5
|
/**
|
|
6
|
+
* SubscriptionService provides filtered, real-time streams of checkpoints,
|
|
7
|
+
* transactions, and events.
|
|
8
|
+
*
|
|
9
|
+
* Each Subscribe API pairs with the LedgerService List API of the same name:
|
|
10
|
+
* requests take the same filter message, and responses carry the same item
|
|
11
|
+
* and watermark shapes with identical cursor semantics.
|
|
12
|
+
*
|
|
13
|
+
* Subscriptions do not support resumption. A new subscription always begins
|
|
14
|
+
* at the current tip of the chain as seen by the server (the latest executed
|
|
15
|
+
* checkpoint). To recover data missed between subscriptions, replay the gap
|
|
16
|
+
* with the paired List API: pass the last received `Watermark.cursor` as
|
|
17
|
+
* `options.after` on the List request (for checkpoints, pass the last
|
|
18
|
+
* received `cursor + 1` as `start_checkpoint`). The List scan reads from the
|
|
19
|
+
* indexed tip, which may trail the subscription's start position; repeat the
|
|
20
|
+
* List call as the index advances until the replay reaches the position
|
|
21
|
+
* established by the subscription's first frame.
|
|
22
|
+
*
|
|
23
|
+
* A subscription behaves like an unbounded ascending scan: every frame
|
|
24
|
+
* carries the subscriber's resume point, and progress advances as
|
|
25
|
+
* checkpoints are fully covered. Two delivery guarantees keep sparse
|
|
26
|
+
* filters live: the first frame on a filtered subscription is a
|
|
27
|
+
* progress-only frame establishing the stream's start position, and
|
|
28
|
+
* progress continues to advance with bounded staleness even when no item
|
|
29
|
+
* matches.
|
|
30
|
+
*
|
|
31
|
+
* Subscription streams have no successful end: they run until cancelled by
|
|
32
|
+
* the client or terminated by the server with a gRPC status.
|
|
33
|
+
*
|
|
6
34
|
* @generated from protobuf service sui.rpc.v2.SubscriptionService
|
|
7
35
|
*/
|
|
8
36
|
var SubscriptionServiceClient = class {
|
|
@@ -15,15 +43,10 @@ var SubscriptionServiceClient = class {
|
|
|
15
43
|
/**
|
|
16
44
|
* Subscribe to the stream of checkpoints.
|
|
17
45
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* clients to know exactly the last checkpoint they have processed and in the
|
|
23
|
-
* event the subscription terminates (either by the client/server or by the
|
|
24
|
-
* connection breaking), clients will be able to reinitialize a subscription
|
|
25
|
-
* and then leverage other APIs in order to request data for the checkpoints
|
|
26
|
-
* they missed.
|
|
46
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
47
|
+
* server and yields checkpoints matching the filter as they are executed.
|
|
48
|
+
* A checkpoint matches if any transaction it contains satisfies the
|
|
49
|
+
* filter.
|
|
27
50
|
*
|
|
28
51
|
* @generated from protobuf rpc: SubscribeCheckpoints(sui.rpc.v2.SubscribeCheckpointsRequest) returns (stream sui.rpc.v2.SubscribeCheckpointsResponse);
|
|
29
52
|
*/
|
|
@@ -31,6 +54,30 @@ var SubscriptionServiceClient = class {
|
|
|
31
54
|
const method = this.methods[0], opt = this._transport.mergeOptions(options);
|
|
32
55
|
return stackIntercept("serverStreaming", this._transport, method, opt, input);
|
|
33
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* Subscribe to the stream of transactions.
|
|
59
|
+
*
|
|
60
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
61
|
+
* server and yields transactions matching the filter as they are executed.
|
|
62
|
+
*
|
|
63
|
+
* @generated from protobuf rpc: SubscribeTransactions(sui.rpc.v2.SubscribeTransactionsRequest) returns (stream sui.rpc.v2.SubscribeTransactionsResponse);
|
|
64
|
+
*/
|
|
65
|
+
subscribeTransactions(input, options) {
|
|
66
|
+
const method = this.methods[1], opt = this._transport.mergeOptions(options);
|
|
67
|
+
return stackIntercept("serverStreaming", this._transport, method, opt, input);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Subscribe to the stream of events.
|
|
71
|
+
*
|
|
72
|
+
* The stream begins at the latest executed checkpoint as seen by the
|
|
73
|
+
* server and yields events matching the filter as they are emitted.
|
|
74
|
+
*
|
|
75
|
+
* @generated from protobuf rpc: SubscribeEvents(sui.rpc.v2.SubscribeEventsRequest) returns (stream sui.rpc.v2.SubscribeEventsResponse);
|
|
76
|
+
*/
|
|
77
|
+
subscribeEvents(input, options) {
|
|
78
|
+
const method = this.methods[2], opt = this._transport.mergeOptions(options);
|
|
79
|
+
return stackIntercept("serverStreaming", this._transport, method, opt, input);
|
|
80
|
+
}
|
|
34
81
|
};
|
|
35
82
|
|
|
36
83
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription_service.client.mjs","names":[],"sources":["../../../../../../src/grpc/proto/sui/rpc/v2/subscription_service.client.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"sui/rpc/v2/subscription_service.proto\" (package \"sui.rpc.v2\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n//\nimport type { RpcTransport } from '@protobuf-ts/runtime-rpc';\nimport type { ServiceInfo } from '@protobuf-ts/runtime-rpc';\nimport { SubscriptionService } from './subscription_service.js';\nimport { stackIntercept } from '@protobuf-ts/runtime-rpc';\nimport type { SubscribeCheckpointsResponse } from './subscription_service.js';\nimport type { SubscribeCheckpointsRequest } from './subscription_service.js';\nimport type { ServerStreamingCall } from '@protobuf-ts/runtime-rpc';\nimport type { RpcOptions } from '@protobuf-ts/runtime-rpc';\n/**\n * @generated from protobuf service sui.rpc.v2.SubscriptionService\n */\nexport interface ISubscriptionServiceClient {\n\t/**\n\t * Subscribe to the stream of checkpoints.\n\t *\n\t *
|
|
1
|
+
{"version":3,"file":"subscription_service.client.mjs","names":[],"sources":["../../../../../../src/grpc/proto/sui/rpc/v2/subscription_service.client.ts"],"sourcesContent":["// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n\n// @generated by protobuf-ts 2.9.6 with parameter force_server_none,optimize_code_size,ts_nocheck\n// @generated from protobuf file \"sui/rpc/v2/subscription_service.proto\" (package \"sui.rpc.v2\", syntax proto3)\n// tslint:disable\n// @ts-nocheck\n//\n// Copyright (c) Mysten Labs, Inc.\n// SPDX-License-Identifier: Apache-2.0\n//\nimport type { RpcTransport } from '@protobuf-ts/runtime-rpc';\nimport type { ServiceInfo } from '@protobuf-ts/runtime-rpc';\nimport { SubscriptionService } from './subscription_service.js';\nimport type { SubscribeEventsResponse } from './subscription_service.js';\nimport type { SubscribeEventsRequest } from './subscription_service.js';\nimport type { SubscribeTransactionsResponse } from './subscription_service.js';\nimport type { SubscribeTransactionsRequest } from './subscription_service.js';\nimport { stackIntercept } from '@protobuf-ts/runtime-rpc';\nimport type { SubscribeCheckpointsResponse } from './subscription_service.js';\nimport type { SubscribeCheckpointsRequest } from './subscription_service.js';\nimport type { ServerStreamingCall } from '@protobuf-ts/runtime-rpc';\nimport type { RpcOptions } from '@protobuf-ts/runtime-rpc';\n/**\n * SubscriptionService provides filtered, real-time streams of checkpoints,\n * transactions, and events.\n *\n * Each Subscribe API pairs with the LedgerService List API of the same name:\n * requests take the same filter message, and responses carry the same item\n * and watermark shapes with identical cursor semantics.\n *\n * Subscriptions do not support resumption. A new subscription always begins\n * at the current tip of the chain as seen by the server (the latest executed\n * checkpoint). To recover data missed between subscriptions, replay the gap\n * with the paired List API: pass the last received `Watermark.cursor` as\n * `options.after` on the List request (for checkpoints, pass the last\n * received `cursor + 1` as `start_checkpoint`). The List scan reads from the\n * indexed tip, which may trail the subscription's start position; repeat the\n * List call as the index advances until the replay reaches the position\n * established by the subscription's first frame.\n *\n * A subscription behaves like an unbounded ascending scan: every frame\n * carries the subscriber's resume point, and progress advances as\n * checkpoints are fully covered. Two delivery guarantees keep sparse\n * filters live: the first frame on a filtered subscription is a\n * progress-only frame establishing the stream's start position, and\n * progress continues to advance with bounded staleness even when no item\n * matches.\n *\n * Subscription streams have no successful end: they run until cancelled by\n * the client or terminated by the server with a gRPC status.\n *\n * @generated from protobuf service sui.rpc.v2.SubscriptionService\n */\nexport interface ISubscriptionServiceClient {\n\t/**\n\t * Subscribe to the stream of checkpoints.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields checkpoints matching the filter as they are executed.\n\t * A checkpoint matches if any transaction it contains satisfies the\n\t * filter.\n\t *\n\t * @generated from protobuf rpc: SubscribeCheckpoints(sui.rpc.v2.SubscribeCheckpointsRequest) returns (stream sui.rpc.v2.SubscribeCheckpointsResponse);\n\t */\n\tsubscribeCheckpoints(\n\t\tinput: SubscribeCheckpointsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeCheckpointsRequest, SubscribeCheckpointsResponse>;\n\t/**\n\t * Subscribe to the stream of transactions.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields transactions matching the filter as they are executed.\n\t *\n\t * @generated from protobuf rpc: SubscribeTransactions(sui.rpc.v2.SubscribeTransactionsRequest) returns (stream sui.rpc.v2.SubscribeTransactionsResponse);\n\t */\n\tsubscribeTransactions(\n\t\tinput: SubscribeTransactionsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeTransactionsRequest, SubscribeTransactionsResponse>;\n\t/**\n\t * Subscribe to the stream of events.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields events matching the filter as they are emitted.\n\t *\n\t * @generated from protobuf rpc: SubscribeEvents(sui.rpc.v2.SubscribeEventsRequest) returns (stream sui.rpc.v2.SubscribeEventsResponse);\n\t */\n\tsubscribeEvents(\n\t\tinput: SubscribeEventsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeEventsRequest, SubscribeEventsResponse>;\n}\n/**\n * SubscriptionService provides filtered, real-time streams of checkpoints,\n * transactions, and events.\n *\n * Each Subscribe API pairs with the LedgerService List API of the same name:\n * requests take the same filter message, and responses carry the same item\n * and watermark shapes with identical cursor semantics.\n *\n * Subscriptions do not support resumption. A new subscription always begins\n * at the current tip of the chain as seen by the server (the latest executed\n * checkpoint). To recover data missed between subscriptions, replay the gap\n * with the paired List API: pass the last received `Watermark.cursor` as\n * `options.after` on the List request (for checkpoints, pass the last\n * received `cursor + 1` as `start_checkpoint`). The List scan reads from the\n * indexed tip, which may trail the subscription's start position; repeat the\n * List call as the index advances until the replay reaches the position\n * established by the subscription's first frame.\n *\n * A subscription behaves like an unbounded ascending scan: every frame\n * carries the subscriber's resume point, and progress advances as\n * checkpoints are fully covered. Two delivery guarantees keep sparse\n * filters live: the first frame on a filtered subscription is a\n * progress-only frame establishing the stream's start position, and\n * progress continues to advance with bounded staleness even when no item\n * matches.\n *\n * Subscription streams have no successful end: they run until cancelled by\n * the client or terminated by the server with a gRPC status.\n *\n * @generated from protobuf service sui.rpc.v2.SubscriptionService\n */\nexport class SubscriptionServiceClient implements ISubscriptionServiceClient, ServiceInfo {\n\ttypeName = SubscriptionService.typeName;\n\tmethods = SubscriptionService.methods;\n\toptions = SubscriptionService.options;\n\tconstructor(private readonly _transport: RpcTransport) {}\n\t/**\n\t * Subscribe to the stream of checkpoints.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields checkpoints matching the filter as they are executed.\n\t * A checkpoint matches if any transaction it contains satisfies the\n\t * filter.\n\t *\n\t * @generated from protobuf rpc: SubscribeCheckpoints(sui.rpc.v2.SubscribeCheckpointsRequest) returns (stream sui.rpc.v2.SubscribeCheckpointsResponse);\n\t */\n\tsubscribeCheckpoints(\n\t\tinput: SubscribeCheckpointsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeCheckpointsRequest, SubscribeCheckpointsResponse> {\n\t\tconst method = this.methods[0],\n\t\t\topt = this._transport.mergeOptions(options);\n\t\treturn stackIntercept<SubscribeCheckpointsRequest, SubscribeCheckpointsResponse>(\n\t\t\t'serverStreaming',\n\t\t\tthis._transport,\n\t\t\tmethod,\n\t\t\topt,\n\t\t\tinput,\n\t\t);\n\t}\n\t/**\n\t * Subscribe to the stream of transactions.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields transactions matching the filter as they are executed.\n\t *\n\t * @generated from protobuf rpc: SubscribeTransactions(sui.rpc.v2.SubscribeTransactionsRequest) returns (stream sui.rpc.v2.SubscribeTransactionsResponse);\n\t */\n\tsubscribeTransactions(\n\t\tinput: SubscribeTransactionsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeTransactionsRequest, SubscribeTransactionsResponse> {\n\t\tconst method = this.methods[1],\n\t\t\topt = this._transport.mergeOptions(options);\n\t\treturn stackIntercept<SubscribeTransactionsRequest, SubscribeTransactionsResponse>(\n\t\t\t'serverStreaming',\n\t\t\tthis._transport,\n\t\t\tmethod,\n\t\t\topt,\n\t\t\tinput,\n\t\t);\n\t}\n\t/**\n\t * Subscribe to the stream of events.\n\t *\n\t * The stream begins at the latest executed checkpoint as seen by the\n\t * server and yields events matching the filter as they are emitted.\n\t *\n\t * @generated from protobuf rpc: SubscribeEvents(sui.rpc.v2.SubscribeEventsRequest) returns (stream sui.rpc.v2.SubscribeEventsResponse);\n\t */\n\tsubscribeEvents(\n\t\tinput: SubscribeEventsRequest,\n\t\toptions?: RpcOptions,\n\t): ServerStreamingCall<SubscribeEventsRequest, SubscribeEventsResponse> {\n\t\tconst method = this.methods[2],\n\t\t\topt = this._transport.mergeOptions(options);\n\t\treturn stackIntercept<SubscribeEventsRequest, SubscribeEventsResponse>(\n\t\t\t'serverStreaming',\n\t\t\tthis._transport,\n\t\t\tmethod,\n\t\t\topt,\n\t\t\tinput,\n\t\t);\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6HA,IAAa,4BAAb,MAA0F;CAIzF,YAAY,AAAiB,YAA0B;EAA1B;kBAHlB,oBAAoB;iBACrB,oBAAoB;iBACpB,oBAAoB;;;;;;;;;;;;CAY9B,qBACC,OACA,SACiF;EACjF,MAAM,SAAS,KAAK,QAAQ,IAC3B,MAAM,KAAK,WAAW,aAAa,QAAQ;AAC5C,SAAO,eACN,mBACA,KAAK,YACL,QACA,KACA,MACA;;;;;;;;;;CAUF,sBACC,OACA,SACmF;EACnF,MAAM,SAAS,KAAK,QAAQ,IAC3B,MAAM,KAAK,WAAW,aAAa,QAAQ;AAC5C,SAAO,eACN,mBACA,KAAK,YACL,QACA,KACA,MACA;;;;;;;;;;CAUF,gBACC,OACA,SACuE;EACvE,MAAM,SAAS,KAAK,QAAQ,IAC3B,MAAM,KAAK,WAAW,aAAa,QAAQ;AAC5C,SAAO,eACN,mBACA,KAAK,YACL,QACA,KACA,MACA"}
|