@clonegod/ttd-sui-common 1.0.6 → 1.0.8
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/checkpoint_185049558.json +13761 -0
- package/dist/checkpoint_185049559.json +7487 -0
- package/dist/checkpoint_185071431_decoded.json +4996 -0
- package/dist/checkpoint_185071441_decoded.json +26073 -0
- package/dist/checkpoint_185071445_decoded.json +6731 -0
- package/dist/checkpoint_185071447_decoded.json +5477 -0
- package/dist/checkpoint_185071453_decoded.json +3382 -0
- package/dist/checkpoint_185071454_decoded.json +11236 -0
- package/dist/checkpoint_185071458_decoded.json +1546 -0
- package/dist/checkpoint_185071465_decoded.json +15284 -0
- package/dist/checkpoint_185071468_decoded.json +1616 -0
- package/dist/constants/index.d.ts +5 -0
- package/dist/constants/index.js +20 -0
- package/dist/grpc/grpc-connection.js +7 -1
- package/dist/grpc/protos/google/protobuf/any.proto +162 -0
- package/dist/grpc/protos/google/protobuf/duration.proto +115 -0
- package/dist/grpc/protos/google/protobuf/empty.proto +51 -0
- package/dist/grpc/protos/google/protobuf/field_mask.proto +245 -0
- package/dist/grpc/protos/google/protobuf/struct.proto +95 -0
- package/dist/grpc/protos/google/protobuf/timestamp.proto +144 -0
- package/dist/grpc/protos/google/rpc/error_details.proto +363 -0
- package/dist/grpc/protos/google/rpc/status.proto +49 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/README.md +123 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/argument.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/balance_change.proto +18 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/bcs.proto +17 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint.proto +32 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_contents.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/checkpoint_summary.proto +102 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/effects.proto +154 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/epoch.proto +34 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/error_reason.proto +12 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/event.proto +44 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/executed_transaction.proto +51 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/execution_status.proto +374 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/gas_cost_summary.proto +19 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/input.proto +55 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/ledger_service.proto +165 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/live_data_service.proto +298 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/move_package.proto +238 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/move_package_service.proto +91 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/object.proto +62 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/object_reference.proto +16 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/owner.proto +25 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/protocol_config.proto +12 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature.proto +232 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature_scheme.proto +22 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/signature_verification_service.proto +49 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/subscription_service.proto +41 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/system_state.proto +340 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/transaction.proto +494 -0
- package/dist/grpc/protos/sui/rpc/v2beta2/transaction_execution_service.proto +53 -0
- package/dist/grpc/subscription-service.js +11 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/test/test_checkpoint.d.ts +1 -0
- package/dist/test/test_checkpoint.js +70 -0
- package/dist/test/test_checkpoint_with_schema.d.ts +1 -0
- package/dist/test/test_checkpoint_with_schema.js +250 -0
- package/dist/test/test_dynamic_bcs.d.ts +1 -0
- package/dist/test/test_dynamic_bcs.js +82 -0
- package/dist/test/test_github_extractor.d.ts +1 -0
- package/dist/test/test_github_extractor.js +69 -0
- package/dist/test/test_grpc.js +0 -11
- package/dist/test/test_hybrid_bcs.d.ts +1 -0
- package/dist/test/test_hybrid_bcs.js +98 -0
- package/dist/test/test_schema_database.d.ts +1 -0
- package/dist/test/test_schema_database.js +91 -0
- package/dist/test/test_simple_schema.d.ts +1 -0
- package/dist/test/test_simple_schema.js +78 -0
- package/dist/utils/dex_event_parser.d.ts +34 -0
- package/dist/utils/dex_event_parser.js +132 -0
- package/dist/utils/dex_schema_database.d.ts +206 -0
- package/dist/utils/dex_schema_database.js +169 -0
- package/dist/utils/dynamic_bcs_parser.d.ts +21 -0
- package/dist/utils/dynamic_bcs_parser.js +166 -0
- package/dist/utils/github_schema_extractor.d.ts +20 -0
- package/dist/utils/github_schema_extractor.js +153 -0
- package/dist/utils/hybrid_bcs_parser.d.ts +22 -0
- package/dist/utils/hybrid_bcs_parser.js +194 -0
- package/dist/utils/simple_schema_parser.d.ts +76 -0
- package/dist/utils/simple_schema_parser.js +193 -0
- package/package.json +4 -3
- package/dist/parsed_swap_transactions_2025-08-30T12-11-48-744Z.json +0 -19215
- package/dist/parsed_swap_transactions_2025-08-30T12-51-39-586Z.json +0 -19309
- package/dist/parsed_swap_transactions_2025-08-30T13-58-34-579Z.json +0 -19005
- package/dist/swap_transactions_2025-08-30T12-05-49-140Z.json +0 -1384
- package/dist/swap_transactions_2025-08-30T12-05-51-529Z.json +0 -2907
- package/dist/swap_transactions_2025-08-30T12-05-54-042Z.json +0 -13392
- package/dist/swap_transactions_2025-08-30T12-05-56-880Z.json +0 -16210
- package/dist/swap_transactions_2025-08-30T12-05-59-588Z.json +0 -17993
- package/dist/swap_transactions_2025-08-30T12-05-59-597Z.json +0 -17993
- package/dist/transaction_28FaeTYoctpP1VdWCuyPxNEBeaMm3ebj27kdF5umi9YL.json +0 -4754
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
## Overview
|
|
2
|
+
This package defines a number of APIs for interacting with services in the Sui
|
|
3
|
+
ecosystem. Some of the below API semantics and guidelines are inspired by
|
|
4
|
+
[Google's AIPs](https://google.aip.dev/) and apply to all services in this
|
|
5
|
+
package. For information on the individual services themselves, see their
|
|
6
|
+
definitions:
|
|
7
|
+
|
|
8
|
+
- [`LedgerService`](./ledger_service.proto)
|
|
9
|
+
- [`LiveDataService`](./live_data_service.proto)
|
|
10
|
+
- [`MovePackageService`](./move_package_service.proto.proto)
|
|
11
|
+
- [`SignatureVerificationService`](./signature_verification_service.proto)
|
|
12
|
+
- [`SubscriptionService`](./subscription_service.proto.proto)
|
|
13
|
+
- [`TransactionExecutionService`](./transaction_execution_service.proto.proto)
|
|
14
|
+
|
|
15
|
+
## Encoding
|
|
16
|
+
In order to improve usability of these APIs a number of identifiers are
|
|
17
|
+
encoding in messages in this package using their human-readable string
|
|
18
|
+
representations instead of a more compact bytes representation.
|
|
19
|
+
|
|
20
|
+
- `Address` and `ObjectId`: Represented as 64 hexadecimal characters with a
|
|
21
|
+
leading `0x`.
|
|
22
|
+
- `Digest`s: Represented as
|
|
23
|
+
[Base58](https://learnmeabitcoin.com/technical/keys/base58/).
|
|
24
|
+
- `TypeTag` and `StructTag`: Represented in their canonical string format (for
|
|
25
|
+
example,
|
|
26
|
+
`0x0000000000000000000000000000000000000000000000000000000000000002::coin::Coin<0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI>`)
|
|
27
|
+
|
|
28
|
+
## Field Masks and Partial Responses
|
|
29
|
+
Some APIs may return resources that are either larger or expensive to compute
|
|
30
|
+
and the API may want to give the user control over which fields it returns.
|
|
31
|
+
|
|
32
|
+
In such circumstances Field Masks
|
|
33
|
+
[(google.protobuf.FieldMask)](../../../google/protobuf/field_mask.proto) can be
|
|
34
|
+
used for granting the user fine-grained control over what fields are returned.
|
|
35
|
+
|
|
36
|
+
For APIs where Field Masks are supported:
|
|
37
|
+
|
|
38
|
+
- The field masks must be a google.protobuf.FieldMask and should be named
|
|
39
|
+
`read_mask`.
|
|
40
|
+
- The field mask parameter must be optional:
|
|
41
|
+
- An explicit value of `"*"` should be supported, and must return all
|
|
42
|
+
fields.
|
|
43
|
+
- If the field mask parameter is omitted, it must default to `"*"`, unless
|
|
44
|
+
otherwise documented.
|
|
45
|
+
- An API may allow read masks with non-terminal repeated fields (counter to the
|
|
46
|
+
documentation on Field Masks).
|
|
47
|
+
|
|
48
|
+
## Pagination
|
|
49
|
+
Some APIs often need to provide collections of data. However, collections can
|
|
50
|
+
often be arbitrarily sized, and also often grow over time, increasing lookup
|
|
51
|
+
time as well as the size of the responses being sent over the wire. Therefore,
|
|
52
|
+
it is important that such APIs listing over a collection be paginated.
|
|
53
|
+
|
|
54
|
+
APIs returning collections of data must provide pagination at the outset, as it
|
|
55
|
+
is a backwards-incompatible change to add pagination to an existing method.
|
|
56
|
+
|
|
57
|
+
- Request messages for collections should define an `uint32 page_size` field,
|
|
58
|
+
allowing users to specify the maximum number of results to return.
|
|
59
|
+
- The `page_size` field must not be required.
|
|
60
|
+
- If the user does not specify `page_size` (or specifies `0`), the API
|
|
61
|
+
chooses an appropriate default, which the API should document. The API
|
|
62
|
+
must not return an error.
|
|
63
|
+
- If the user specifies `page_size` greater than the maximum permitted by
|
|
64
|
+
the API, the API should coerce down to the maximum permitted page size.
|
|
65
|
+
- The API may return fewer results than the number requested (including
|
|
66
|
+
zero results), even if not at the end of the collection.
|
|
67
|
+
- Request messages for collections should define a `bytes page_token` field,
|
|
68
|
+
allowing users to advance to the next page in the collection.
|
|
69
|
+
- The `page_token` field must not be required.
|
|
70
|
+
- If the user changes the `page_size` in a request for subsequent pages,
|
|
71
|
+
the service must honor the new page size.
|
|
72
|
+
- The user is expected to keep all other arguments to the RPC the same; if
|
|
73
|
+
any arguments are different, the API should send an `INVALID_ARGUMENT`
|
|
74
|
+
error.
|
|
75
|
+
- Response messages for collections should define a `bytes next_page_token`
|
|
76
|
+
field, providing the user with a page token that may be used to retrieve the
|
|
77
|
+
next page.
|
|
78
|
+
- The field containing pagination results should be the first field in the
|
|
79
|
+
message and have a field number of `1`. It should be a repeated field
|
|
80
|
+
containing a list of resources constituting a single page of results.
|
|
81
|
+
- If the end of the collection has been reached, the `next_page_token`
|
|
82
|
+
field must be empty. This is the only way to communicate
|
|
83
|
+
"end-of-collection" to users.
|
|
84
|
+
- If the end of the collection has not been reached (or if the API can not
|
|
85
|
+
determine in time), the API must provide a `next_page_token`.
|
|
86
|
+
|
|
87
|
+
## Field Presence
|
|
88
|
+
The proto files used in this package for message and service definitions are
|
|
89
|
+
all defined using protobuf version 3 (`proto3`). In `proto3`, fields that are
|
|
90
|
+
primitives (that is, they are not a `message`) and are not present on the wire
|
|
91
|
+
are zero-initialized. To gain the ability to detect [field
|
|
92
|
+
presence](https://github.com/protocolbuffers/protobuf/blob/main/docs/field_presence.md),
|
|
93
|
+
these definitions follow the convention of having all fields marked `optional`,
|
|
94
|
+
and wrapping `repeated` fields in a message as needed.
|
|
95
|
+
|
|
96
|
+
## Errors
|
|
97
|
+
The services defined in this package support the [richer error
|
|
98
|
+
model](https://grpc.io/docs/guides/error/#richer-error-model) following [AIP
|
|
99
|
+
193](https://google.aip.dev/193). In particular, when an RPC returns a response
|
|
100
|
+
with a non-OK status code, richer error information can generally be found by
|
|
101
|
+
looking at the `grpc-status-details-bin` header which contains a
|
|
102
|
+
[google.rpc.Status](https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto)
|
|
103
|
+
message encoded in Base64.
|
|
104
|
+
|
|
105
|
+
## HTTP Headers
|
|
106
|
+
Implementations of the services defined in this package should set the
|
|
107
|
+
following HTTP headers in responses where possible:
|
|
108
|
+
|
|
109
|
+
- `x-sui-chain-id`: Chain Id of the current chain
|
|
110
|
+
- `x-sui-chain`: Human-readable name of the current chain
|
|
111
|
+
- `x-sui-checkpoint-height`: Current checkpoint height
|
|
112
|
+
- `x-sui-lowest-available-checkpoint`: Lowest available checkpoint for which
|
|
113
|
+
transaction and checkpoint data can be requested. Specifically this is the
|
|
114
|
+
lowest checkpoint for which the following data can be requested: checkpoints,
|
|
115
|
+
transactions, effects and events.
|
|
116
|
+
- `x-sui-lowest-available-checkpoint-objects`: Lowest available checkpoint for
|
|
117
|
+
which object data can be requested. Specifically this is the lowest
|
|
118
|
+
checkpoint for which input/output object data will be available.
|
|
119
|
+
- `x-sui-epoch`: Current epoch of the chain.
|
|
120
|
+
- `x-sui-timestamp-ms`: Current timestamp of the chain, represented as number
|
|
121
|
+
of milliseconds from the Unix epoch.
|
|
122
|
+
- `x-sui-timestamp`: Current timestamp of the chain, encoded in the
|
|
123
|
+
[RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
// An argument to a programmable transaction command.
|
|
9
|
+
message Argument {
|
|
10
|
+
enum ArgumentKind {
|
|
11
|
+
ARGUMENT_KIND_UNKNOWN = 0;
|
|
12
|
+
|
|
13
|
+
// The gas coin.
|
|
14
|
+
GAS = 1;
|
|
15
|
+
|
|
16
|
+
// One of the input objects or primitive values (from
|
|
17
|
+
// `ProgrammableTransaction` inputs).
|
|
18
|
+
INPUT = 2;
|
|
19
|
+
|
|
20
|
+
// The result of another command (from `ProgrammableTransaction` commands).
|
|
21
|
+
RESULT = 3;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
optional ArgumentKind kind = 1;
|
|
25
|
+
|
|
26
|
+
// Index of an input when `kind` is `INPUT`.
|
|
27
|
+
optional uint32 input = 2;
|
|
28
|
+
|
|
29
|
+
// Index of a result when `kind` is `RESULT`.
|
|
30
|
+
optional uint32 result = 3;
|
|
31
|
+
|
|
32
|
+
// Used to access a nested result when `kind` is `RESULT`.
|
|
33
|
+
optional uint32 subresult = 4;
|
|
34
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
// The delta, or change, in balance for an address for a particular `Coin` type.
|
|
9
|
+
message BalanceChange {
|
|
10
|
+
// The account address that is affected by this balance change event.
|
|
11
|
+
optional string address = 1;
|
|
12
|
+
|
|
13
|
+
// The `Coin` type of this balance change event.
|
|
14
|
+
optional string coin_type = 2;
|
|
15
|
+
|
|
16
|
+
// The amount or change in balance.
|
|
17
|
+
optional string amount = 3;
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
// `Bcs` contains an arbitrary type that is serialized using the
|
|
9
|
+
// [BCS](https://mystenlabs.github.io/sui-rust-sdk/sui_sdk_types/index.html#bcs)
|
|
10
|
+
// format as well as a name that identifies the type of the serialized value.
|
|
11
|
+
message Bcs {
|
|
12
|
+
// Name that identifies the type of the serialized value.
|
|
13
|
+
optional string name = 1;
|
|
14
|
+
|
|
15
|
+
// Bytes of a BCS serialized value.
|
|
16
|
+
optional bytes value = 2;
|
|
17
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "sui/rpc/v2beta2/checkpoint_contents.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/checkpoint_summary.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/executed_transaction.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/signature.proto";
|
|
12
|
+
|
|
13
|
+
message Checkpoint {
|
|
14
|
+
// The height of this checkpoint.
|
|
15
|
+
optional uint64 sequence_number = 1;
|
|
16
|
+
|
|
17
|
+
// The digest of this Checkpoint's CheckpointSummary.
|
|
18
|
+
optional string digest = 2;
|
|
19
|
+
|
|
20
|
+
// The `CheckpointSummary` for this checkpoint.
|
|
21
|
+
optional CheckpointSummary summary = 3;
|
|
22
|
+
|
|
23
|
+
// An aggregated quorum signature from the validator committee that
|
|
24
|
+
// certified this checkpoint.
|
|
25
|
+
optional ValidatorAggregatedSignature signature = 4;
|
|
26
|
+
|
|
27
|
+
// The `CheckpointContents` for this checkpoint.
|
|
28
|
+
optional CheckpointContents contents = 5;
|
|
29
|
+
|
|
30
|
+
// List of transactions included in this checkpoint.
|
|
31
|
+
repeated ExecutedTransaction transactions = 6;
|
|
32
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/signature.proto";
|
|
10
|
+
|
|
11
|
+
// The committed to contents of a checkpoint.
|
|
12
|
+
message CheckpointContents {
|
|
13
|
+
// This CheckpointContents serialized as BCS.
|
|
14
|
+
optional Bcs bcs = 1;
|
|
15
|
+
|
|
16
|
+
// The digest of this CheckpointContents.
|
|
17
|
+
optional string digest = 2;
|
|
18
|
+
|
|
19
|
+
// Version of this CheckpointContents
|
|
20
|
+
optional int32 version = 3;
|
|
21
|
+
|
|
22
|
+
// Set of transactions committed to in this checkpoint.
|
|
23
|
+
repeated CheckpointedTransactionInfo transactions = 4;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Transaction information committed to in a checkpoint.
|
|
27
|
+
message CheckpointedTransactionInfo {
|
|
28
|
+
// Digest of the transaction.
|
|
29
|
+
optional string transaction = 1;
|
|
30
|
+
// Digest of the effects.
|
|
31
|
+
optional string effects = 2;
|
|
32
|
+
// Set of user signatures that authorized the transaction.
|
|
33
|
+
repeated UserSignature signatures = 3;
|
|
34
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/gas_cost_summary.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/signature.proto";
|
|
12
|
+
|
|
13
|
+
// A header for a checkpoint on the Sui blockchain.
|
|
14
|
+
//
|
|
15
|
+
// On the Sui network, checkpoints define the history of the blockchain. They are quite similar to
|
|
16
|
+
// the concept of blocks used by other blockchains like Bitcoin or Ethereum. The Sui blockchain,
|
|
17
|
+
// however, forms checkpoints after transaction execution has already happened to provide a
|
|
18
|
+
// certified history of the chain, instead of being formed before execution.
|
|
19
|
+
//
|
|
20
|
+
// Checkpoints commit to a variety of state, including but not limited to:
|
|
21
|
+
// - The hash of the previous checkpoint.
|
|
22
|
+
// - The set of transaction digests, their corresponding effects digests, as well as the set of
|
|
23
|
+
// user signatures that authorized its execution.
|
|
24
|
+
// - The objects produced by a transaction.
|
|
25
|
+
// - The set of live objects that make up the current state of the chain.
|
|
26
|
+
// - On epoch transitions, the next validator committee.
|
|
27
|
+
//
|
|
28
|
+
// `CheckpointSummary`s themselves don't directly include all of the previous information but they
|
|
29
|
+
// are the top-level type by which all the information is committed to transitively via cryptographic
|
|
30
|
+
// hashes included in the summary. `CheckpointSummary`s are signed and certified by a quorum of
|
|
31
|
+
// the validator committee in a given epoch to allow verification of the chain's state.
|
|
32
|
+
message CheckpointSummary {
|
|
33
|
+
// This CheckpointSummary serialized as BCS.
|
|
34
|
+
optional Bcs bcs = 1;
|
|
35
|
+
|
|
36
|
+
// The digest of this CheckpointSummary.
|
|
37
|
+
optional string digest = 2;
|
|
38
|
+
|
|
39
|
+
// Epoch that this checkpoint belongs to.
|
|
40
|
+
optional uint64 epoch = 3;
|
|
41
|
+
|
|
42
|
+
// The height of this checkpoint.
|
|
43
|
+
optional uint64 sequence_number = 4;
|
|
44
|
+
|
|
45
|
+
// Total number of transactions committed since genesis, including those in this
|
|
46
|
+
// checkpoint.
|
|
47
|
+
optional uint64 total_network_transactions = 5;
|
|
48
|
+
|
|
49
|
+
// The hash of the `CheckpointContents` for this checkpoint.
|
|
50
|
+
optional string content_digest = 6;
|
|
51
|
+
|
|
52
|
+
// The hash of the previous `CheckpointSummary`.
|
|
53
|
+
//
|
|
54
|
+
// This will be `None` only for the first, or genesis, checkpoint.
|
|
55
|
+
optional string previous_digest = 7;
|
|
56
|
+
|
|
57
|
+
// The running total gas costs of all transactions included in the current epoch so far
|
|
58
|
+
// until this checkpoint.
|
|
59
|
+
optional GasCostSummary epoch_rolling_gas_cost_summary = 8;
|
|
60
|
+
|
|
61
|
+
// Timestamp of the checkpoint - number of milliseconds from the Unix epoch
|
|
62
|
+
// Checkpoint timestamps are monotonic, but not strongly monotonic - subsequent
|
|
63
|
+
// checkpoints can have the same timestamp if they originate from the same underlining consensus commit.
|
|
64
|
+
optional google.protobuf.Timestamp timestamp = 9;
|
|
65
|
+
|
|
66
|
+
// Commitments to checkpoint-specific state.
|
|
67
|
+
repeated CheckpointCommitment commitments = 10;
|
|
68
|
+
|
|
69
|
+
// Extra data only present in the final checkpoint of an epoch.
|
|
70
|
+
optional EndOfEpochData end_of_epoch_data = 11;
|
|
71
|
+
|
|
72
|
+
// `CheckpointSummary` is not an evolvable structure - it must be readable by any version of
|
|
73
|
+
// the code. Therefore, to allow extensions to be added to `CheckpointSummary`,
|
|
74
|
+
// opaque data can be added to checkpoints, which can be deserialized based on the current
|
|
75
|
+
// protocol version.
|
|
76
|
+
optional bytes version_specific_data = 12;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
// Data, which when included in a `CheckpointSummary`, signals the end of an `Epoch`.
|
|
80
|
+
message EndOfEpochData {
|
|
81
|
+
// The set of validators that will be in the `ValidatorCommittee` for the next epoch.
|
|
82
|
+
repeated ValidatorCommitteeMember next_epoch_committee = 1;
|
|
83
|
+
// The protocol version that is in effect during the next epoch.
|
|
84
|
+
optional uint64 next_epoch_protocol_version = 2;
|
|
85
|
+
// Commitments to epoch specific state (live object set)
|
|
86
|
+
repeated CheckpointCommitment epoch_commitments = 3;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// A commitment made by a checkpoint.
|
|
90
|
+
message CheckpointCommitment {
|
|
91
|
+
enum CheckpointCommitmentKind {
|
|
92
|
+
CHECKPOINT_COMMITMENT_KIND_UNKNOWN = 0;
|
|
93
|
+
|
|
94
|
+
// An elliptic curve multiset hash attesting to the set of objects that
|
|
95
|
+
// comprise the live state of the Sui blockchain.
|
|
96
|
+
ECMH_LIVE_OBJECT_SET = 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
optional CheckpointCommitmentKind kind = 1;
|
|
100
|
+
|
|
101
|
+
optional string digest = 2;
|
|
102
|
+
}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/execution_status.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/gas_cost_summary.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/owner.proto";
|
|
12
|
+
|
|
13
|
+
// The effects of executing a transaction.
|
|
14
|
+
message TransactionEffects {
|
|
15
|
+
// This TransactionEffects serialized as BCS.
|
|
16
|
+
optional Bcs bcs = 1;
|
|
17
|
+
|
|
18
|
+
// The digest of this TransactionEffects.
|
|
19
|
+
optional string digest = 2;
|
|
20
|
+
|
|
21
|
+
// Version of this TransactionEffects.
|
|
22
|
+
optional int32 version = 3;
|
|
23
|
+
|
|
24
|
+
// The status of the execution.
|
|
25
|
+
optional ExecutionStatus status = 4;
|
|
26
|
+
|
|
27
|
+
// The epoch when this transaction was executed.
|
|
28
|
+
optional uint64 epoch = 5;
|
|
29
|
+
|
|
30
|
+
// The gas used by this transaction.
|
|
31
|
+
optional GasCostSummary gas_used = 6;
|
|
32
|
+
|
|
33
|
+
// The transaction digest.
|
|
34
|
+
optional string transaction_digest = 7;
|
|
35
|
+
|
|
36
|
+
// Information about the gas object. Also present in the `changed_objects` vector.
|
|
37
|
+
//
|
|
38
|
+
// System transaction that don't require gas will leave this as `None`.
|
|
39
|
+
optional ChangedObject gas_object = 8;
|
|
40
|
+
|
|
41
|
+
// The digest of the events emitted during execution,
|
|
42
|
+
// can be `None` if the transaction does not emit any event.
|
|
43
|
+
optional string events_digest = 9;
|
|
44
|
+
|
|
45
|
+
// The set of transaction digests this transaction depends on.
|
|
46
|
+
repeated string dependencies = 10;
|
|
47
|
+
|
|
48
|
+
// The version number of all the written objects (excluding packages) by this transaction.
|
|
49
|
+
optional uint64 lamport_version = 11;
|
|
50
|
+
|
|
51
|
+
// Objects whose state are changed by this transaction.
|
|
52
|
+
repeated ChangedObject changed_objects = 12;
|
|
53
|
+
|
|
54
|
+
// Consensus objects that are not mutated in this transaction. Unlike owned objects,
|
|
55
|
+
// read-only consensus objects' version are not committed in the transaction,
|
|
56
|
+
// and in order for a node to catch up and execute it without consensus sequencing,
|
|
57
|
+
// the version needs to be committed in the effects.
|
|
58
|
+
repeated UnchangedConsensusObject unchanged_consensus_objects = 13;
|
|
59
|
+
|
|
60
|
+
// Auxiliary data that are not protocol-critical, generated as part of the effects but are stored separately.
|
|
61
|
+
// Storing it separately allows us to avoid bloating the effects with data that are not critical.
|
|
62
|
+
// It also provides more flexibility on the format and type of the data.
|
|
63
|
+
optional string auxiliary_data_digest = 14;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// Input/output state of an object that was changed during execution.
|
|
67
|
+
message ChangedObject {
|
|
68
|
+
// ID of the object.
|
|
69
|
+
optional string object_id = 1;
|
|
70
|
+
|
|
71
|
+
enum InputObjectState {
|
|
72
|
+
INPUT_OBJECT_STATE_UNKNOWN = 0;
|
|
73
|
+
INPUT_OBJECT_STATE_DOES_NOT_EXIST = 1;
|
|
74
|
+
INPUT_OBJECT_STATE_EXISTS = 2;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
optional InputObjectState input_state = 2;
|
|
78
|
+
|
|
79
|
+
// Version of the object before this transaction executed.
|
|
80
|
+
optional uint64 input_version = 3;
|
|
81
|
+
// Digest of the object before this transaction executed.
|
|
82
|
+
optional string input_digest = 4;
|
|
83
|
+
// Owner of the object before this transaction executed.
|
|
84
|
+
optional Owner input_owner = 5;
|
|
85
|
+
|
|
86
|
+
enum OutputObjectState {
|
|
87
|
+
OUTPUT_OBJECT_STATE_UNKNOWN = 0;
|
|
88
|
+
OUTPUT_OBJECT_STATE_DOES_NOT_EXIST = 1;
|
|
89
|
+
OUTPUT_OBJECT_STATE_OBJECT_WRITE = 2;
|
|
90
|
+
OUTPUT_OBJECT_STATE_PACKAGE_WRITE = 3;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
optional OutputObjectState output_state = 6;
|
|
94
|
+
// Version of the object after this transaction executed.
|
|
95
|
+
optional uint64 output_version = 7;
|
|
96
|
+
// Digest of the object after this transaction executed.
|
|
97
|
+
optional string output_digest = 8;
|
|
98
|
+
// Owner of the object after this transaction executed.
|
|
99
|
+
optional Owner output_owner = 9;
|
|
100
|
+
|
|
101
|
+
enum IdOperation {
|
|
102
|
+
ID_OPERATION_UNKNOWN = 0;
|
|
103
|
+
NONE = 1;
|
|
104
|
+
CREATED = 2;
|
|
105
|
+
DELETED = 3;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// What happened to an `ObjectId` during execution.
|
|
109
|
+
optional IdOperation id_operation = 10;
|
|
110
|
+
|
|
111
|
+
// Type information is not provided by the effects structure but is instead
|
|
112
|
+
// provided by an indexing layer
|
|
113
|
+
optional string object_type = 11;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// A consensus object that wasn't changed during execution.
|
|
117
|
+
message UnchangedConsensusObject {
|
|
118
|
+
enum UnchangedConsensusObjectKind {
|
|
119
|
+
UNCHANGED_CONSENSUS_OBJECT_KIND_UNKNOWN = 0;
|
|
120
|
+
|
|
121
|
+
// Read-only consensus object from the input.
|
|
122
|
+
READ_ONLY_ROOT = 1;
|
|
123
|
+
|
|
124
|
+
// Objects with ended consensus streams that appear mutably/owned in the input.
|
|
125
|
+
MUTATE_CONSENSUS_STREAM_ENDED = 2;
|
|
126
|
+
|
|
127
|
+
// Objects with ended consensus streams objects that appear as read-only in the input.
|
|
128
|
+
READ_CONSENSUS_STREAM_ENDED = 3;
|
|
129
|
+
|
|
130
|
+
// Consensus objects that were congested and resulted in this transaction being
|
|
131
|
+
// canceled.
|
|
132
|
+
CANCELED = 4;
|
|
133
|
+
|
|
134
|
+
// Read of a per-epoch config object that should remain the same during an
|
|
135
|
+
// epoch. This optionally will indicate the sequence number of the config
|
|
136
|
+
// object at the start of the epoch.
|
|
137
|
+
PER_EPOCH_CONFIG = 5;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
optional UnchangedConsensusObjectKind kind = 1;
|
|
141
|
+
|
|
142
|
+
// ObjectId of the consensus object.
|
|
143
|
+
optional string object_id = 2;
|
|
144
|
+
|
|
145
|
+
// Version of the consensus object.
|
|
146
|
+
optional uint64 version = 3;
|
|
147
|
+
|
|
148
|
+
// Digest of the consensus object.
|
|
149
|
+
optional string digest = 4;
|
|
150
|
+
|
|
151
|
+
// Type information is not provided by the effects structure but is instead
|
|
152
|
+
// provided by an indexing layer
|
|
153
|
+
optional string object_type = 5;
|
|
154
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/protocol_config.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/signature.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/system_state.proto";
|
|
12
|
+
|
|
13
|
+
message Epoch {
|
|
14
|
+
optional uint64 epoch = 1;
|
|
15
|
+
|
|
16
|
+
// The committee governing this epoch.
|
|
17
|
+
optional ValidatorCommittee committee = 2;
|
|
18
|
+
|
|
19
|
+
// Snapshot of Sui's SystemState (`0x3::sui_system::SystemState`) at the
|
|
20
|
+
// beginning of the epoch, for past epochs, or the current state for the
|
|
21
|
+
// current epoch.
|
|
22
|
+
optional SystemState system_state = 3;
|
|
23
|
+
|
|
24
|
+
optional uint64 first_checkpoint = 4;
|
|
25
|
+
optional uint64 last_checkpoint = 5;
|
|
26
|
+
|
|
27
|
+
optional google.protobuf.Timestamp start = 6;
|
|
28
|
+
optional google.protobuf.Timestamp end = 7;
|
|
29
|
+
|
|
30
|
+
// Reference gas price denominated in MIST
|
|
31
|
+
optional uint64 reference_gas_price = 8;
|
|
32
|
+
|
|
33
|
+
optional ProtocolConfig protocol_config = 9;
|
|
34
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/struct.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/bcs.proto";
|
|
10
|
+
|
|
11
|
+
// Events emitted during the successful execution of a transaction.
|
|
12
|
+
message TransactionEvents {
|
|
13
|
+
// This TransactionEvents serialized as BCS.
|
|
14
|
+
optional Bcs bcs = 1;
|
|
15
|
+
|
|
16
|
+
// The digest of this TransactionEvents.
|
|
17
|
+
optional string digest = 2;
|
|
18
|
+
|
|
19
|
+
// Set of events emitted by a transaction.
|
|
20
|
+
repeated Event events = 3;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// An event.
|
|
24
|
+
message Event {
|
|
25
|
+
// Package ID of the top-level function invoked by a `MoveCall` command that triggered this
|
|
26
|
+
// event to be emitted.
|
|
27
|
+
optional string package_id = 1;
|
|
28
|
+
|
|
29
|
+
// Module name of the top-level function invoked by a `MoveCall` command that triggered this
|
|
30
|
+
// event to be emitted.
|
|
31
|
+
optional string module = 2;
|
|
32
|
+
|
|
33
|
+
// Address of the account that sent the transaction where this event was emitted.
|
|
34
|
+
optional string sender = 3;
|
|
35
|
+
|
|
36
|
+
// The type of the event emitted.
|
|
37
|
+
optional string event_type = 4;
|
|
38
|
+
|
|
39
|
+
// BCS serialized bytes of the event.
|
|
40
|
+
optional Bcs contents = 5;
|
|
41
|
+
|
|
42
|
+
// JSON rendering of the event.
|
|
43
|
+
optional google.protobuf.Value json = 6;
|
|
44
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// Copyright (c) Mysten Labs, Inc.
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
syntax = "proto3";
|
|
5
|
+
|
|
6
|
+
package sui.rpc.v2beta2;
|
|
7
|
+
|
|
8
|
+
import "google/protobuf/timestamp.proto";
|
|
9
|
+
import "sui/rpc/v2beta2/balance_change.proto";
|
|
10
|
+
import "sui/rpc/v2beta2/effects.proto";
|
|
11
|
+
import "sui/rpc/v2beta2/event.proto";
|
|
12
|
+
import "sui/rpc/v2beta2/object.proto";
|
|
13
|
+
import "sui/rpc/v2beta2/signature.proto";
|
|
14
|
+
import "sui/rpc/v2beta2/transaction.proto";
|
|
15
|
+
|
|
16
|
+
message ExecutedTransaction {
|
|
17
|
+
// The digest of this Transaction.
|
|
18
|
+
optional string digest = 1;
|
|
19
|
+
|
|
20
|
+
// The transaction itself.
|
|
21
|
+
optional Transaction transaction = 2;
|
|
22
|
+
|
|
23
|
+
// List of user signatures that are used to authorize the
|
|
24
|
+
// execution of this transaction.
|
|
25
|
+
repeated UserSignature signatures = 3;
|
|
26
|
+
|
|
27
|
+
// The `TransactionEffects` for this transaction.
|
|
28
|
+
optional TransactionEffects effects = 4;
|
|
29
|
+
|
|
30
|
+
// The `TransactionEvents` for this transaction.
|
|
31
|
+
//
|
|
32
|
+
// This field might be empty, even if it was explicitly requested, if the
|
|
33
|
+
// transaction didn't produce any events.
|
|
34
|
+
// `sui.types.TransactionEffects.events_digest` is populated if the
|
|
35
|
+
// transaction produced any events.
|
|
36
|
+
optional TransactionEvents events = 5;
|
|
37
|
+
|
|
38
|
+
// The sequence number for the checkpoint that includes this transaction.
|
|
39
|
+
optional uint64 checkpoint = 6;
|
|
40
|
+
|
|
41
|
+
// The Unix timestamp of the checkpoint that includes this transaction.
|
|
42
|
+
optional google.protobuf.Timestamp timestamp = 7;
|
|
43
|
+
|
|
44
|
+
repeated BalanceChange balance_changes = 8;
|
|
45
|
+
|
|
46
|
+
// Set of input objects used during the execution of this transaction.
|
|
47
|
+
repeated Object input_objects = 10;
|
|
48
|
+
|
|
49
|
+
// Set of output objects produced from the execution of this transaction.
|
|
50
|
+
repeated Object output_objects = 11;
|
|
51
|
+
}
|