|
1 | 1 | package types
|
2 | 2 |
|
3 | 3 | import (
|
| 4 | + "encoding/json" |
| 5 | + |
4 | 6 | "github.com/coming-chat/go-sui/v2/lib"
|
5 | 7 | "github.com/coming-chat/go-sui/v2/sui_types"
|
6 | 8 | )
|
@@ -115,18 +117,24 @@ const (
|
115 | 117 |
|
116 | 118 | type SuiTransactionBlockKind = lib.TagJson[TransactionBlockKind]
|
117 | 119 |
|
| 120 | +// https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/transaction.rs#L279 |
118 | 121 | type TransactionBlockKind struct {
|
119 | 122 | /// A system transaction that will update epoch information on-chain.
|
120 | 123 | ChangeEpoch *SuiChangeEpoch `json:"ChangeEpoch,omitempty"`
|
121 | 124 | /// A system transaction used for initializing the initial state of the chain.
|
122 | 125 | Genesis *SuiGenesisTransaction `json:"Genesis,omitempty"`
|
123 | 126 | /// A system transaction marking the start of a series of transactions scheduled as part of a
|
124 |
| - /// checkpoint |
125 |
| - ConsensusCommitPrologue *SuiConsensusCommitPrologue `json:"ConsensusCommitPrologue,omitempty"` |
| 127 | + /// checkpoint (v1 - v3) |
| 128 | + ConsensusCommitPrologue *SuiConsensusCommitPrologue `json:"ConsensusCommitPrologue,omitempty"` |
| 129 | + ConsensusCommitPrologueV2 json.RawMessage `json:"ConsensusCommitPrologueV2,omitempty"` |
| 130 | + ConsensusCommitPrologueV3 *SuiConsensusCommitPrologueV3 `json:"ConsensusCommitPrologueV3,omitempty"` |
126 | 131 | /// A series of transactions where the results of one transaction can be used in future
|
127 | 132 | /// transactions
|
128 | 133 | ProgrammableTransaction *SuiProgrammableTransactionBlock `json:"ProgrammableTransaction,omitempty"`
|
129 | 134 | // .. more transaction types go here
|
| 135 | + AuthenticatorStateUpdate json.RawMessage `json:"AuthenticatorStateUpdate,omitempty"` |
| 136 | + EndOfEpochTransaction json.RawMessage `json:"EndOfEpochTransaction,omitempty"` |
| 137 | + RandomnessStateUpdate json.RawMessage `json:"RandomnessStateUpdate,omitempty"` |
130 | 138 | }
|
131 | 139 |
|
132 | 140 | func (t TransactionBlockKind) Tag() string {
|
@@ -155,6 +163,14 @@ type SuiConsensusCommitPrologue struct {
|
155 | 163 | CommitTimestampMs uint64 `json:"commit_timestamp_ms"`
|
156 | 164 | }
|
157 | 165 |
|
| 166 | +type SuiConsensusCommitPrologueV3 struct { |
| 167 | + Epoch *SafeSuiBigInt[uint64] `json:"epoch"` |
| 168 | + Round *SafeSuiBigInt[uint64] `json:"round"` |
| 169 | + CommitTimestampMs *SafeSuiBigInt[uint64] `json:"commit_timestamp_ms"` |
| 170 | + SubDagIndex *SafeSuiBigInt[uint64] `json:"sub_dag_index"` |
| 171 | + ConsensusCommitDigest sui_types.ObjectDigest `json:"consensus_commit_digest"` |
| 172 | +} |
| 173 | + |
158 | 174 | type SuiProgrammableTransactionBlock struct {
|
159 | 175 | Inputs []interface{} `json:"inputs"`
|
160 | 176 | /// The transactions to be executed sequentially. A failure in any transaction will
|
|
0 commit comments