Skip to content

Commit

Permalink
feat(sdk): Pair sdk with latest inflation changes (#1733)
Browse files Browse the repository at this point in the history
* feat(sdk): Pair sdk with latest inflation changes

* Update checkpint.ts

---------

Co-authored-by: Begoña Álvarez de la Cruz <balvarez@boxfish.studio>
  • Loading branch information
marc2332 and begonaalvarezd authored Aug 12, 2024
1 parent 77de6db commit cf22566
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/iota-open-rpc/spec/openrpc.json
Original file line number Diff line number Diff line change
Expand Up @@ -6273,6 +6273,7 @@
"type": "object",
"required": [
"epochCommitments",
"epochSupplyChange",
"nextEpochCommittee",
"nextEpochProtocolVersion"
],
Expand All @@ -6284,6 +6285,11 @@
"$ref": "#/components/schemas/CheckpointCommitment"
}
},
"epochSupplyChange": {
"description": "The number of tokens that were minted (if positive) or burnt (if negative) in this epoch.",
"type": "integer",
"format": "int64"
},
"nextEpochCommittee": {
"description": "next_epoch_committee is `Some` if and only if the current checkpoint is the last checkpoint of an epoch. Therefore next_epoch_committee can be used to pick the last checkpoint of an epoch, which is often useful to get epoch level summary stats like total gas cost of an epoch, or the total number of transactions from genesis to the end of an epoch. The committee is stored as a vector of validator pub key and stake pairs. The vector should be sorted based on the Committee data structure.",
"type": "array",
Expand Down
1 change: 1 addition & 0 deletions sdk/graphql-transport/src/mappers/checkpint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export function mapGraphQLCheckpointToRpcCheckpoint(
nextEpochProtocolVersion: String(
endOfEpochTx.kind.transactions.nodes[0].epoch?.protocolConfigs.protocolVersion,
),
epochSupplyChange: 0, // TODO: https://github.com/iotaledger/iota/issues/1738
};
}

Expand Down
2 changes: 2 additions & 0 deletions sdk/typescript/src/client/types/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ export interface ECMHLiveObjectSetDigest {
export interface EndOfEpochData {
/** Commitments to epoch specific state (e.g. live object set) */
epochCommitments: CheckpointCommitment[];
/** The number of tokens that were minted (if positive) or burnt (if negative) in this epoch. */
epochSupplyChange: number;
/**
* next_epoch_committee is `Some` if and only if the current checkpoint is the last checkpoint of an
* epoch. Therefore next_epoch_committee can be used to pick the last checkpoint of an epoch, which is
Expand Down

0 comments on commit cf22566

Please sign in to comment.