Skip to content

Commit

Permalink
GraphQL: Add signatures to query transaction results
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankC01 committed Aug 7, 2024
1 parent 7a3287c commit 06b1a45
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 2 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,24 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.67.0] - Unpublished

### Added

- signatures on transactions to:
- QueryNodes: GetMultipleTx and GetFilteredTx
- Fragments: StandardTransaction
- Result Types: TransactionResultGQL and TransactionSummaryGQL

### Fixed

### Changed

- Bump version 0.67.0

### Removed


## [0.66.0] - 2024-08-04

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Python Client SDK for Sui blockchain

## pysui SDK current (github)

**Release-0.66.0**
**Release-0.67.0**

- Supports _SUI 1.29.x RPC API_
- Backwards compatable to _Sui 1.21.x RPC API_
Expand Down
1 change: 1 addition & 0 deletions pysui/sui/sui_pgql/pgql_fragments.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ def fragment(self, schema: DSLSchema) -> DSLFragment:
.on(schema.TransactionBlock)
.select(
schema.TransactionBlock.digest,
schema.TransactionBlock.signatures,
schema.TransactionBlock.kind.select(
DSLMetaField("__typename").alias("tx_kind")
),
Expand Down
2 changes: 2 additions & 0 deletions pysui/sui/sui_pgql/pgql_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,7 @@ def as_document_node(self, schema: DSLSchema) -> DocumentNode:
cursor=schema.TransactionBlockConnection.pageInfo.select(pg_cursor),
tx_blocks=schema.TransactionBlockConnection.nodes.select(
schema.TransactionBlock.digest,
schema.TransactionBlock.signatures,
schema.TransactionBlock.effects.select(
schema.TransactionBlockEffects.status,
schema.TransactionBlockEffects.timestamp,
Expand Down Expand Up @@ -733,6 +734,7 @@ def as_document_node(self, schema: DSLSchema) -> DocumentNode:
cursor=schema.TransactionBlockConnection.pageInfo.select(pg_cursor),
tx_blocks=schema.TransactionBlockConnection.nodes.select(
schema.TransactionBlock.digest,
schema.TransactionBlock.signatures,
schema.TransactionBlock.kind.select(tx_kind=DSLMetaField("__typename")),
schema.TransactionBlock.effects.select(
schema.TransactionBlockEffects.status,
Expand Down
2 changes: 2 additions & 0 deletions pysui/sui/sui_pgql/pgql_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -569,6 +569,7 @@ class TransactionResultGQL(PGQL_Type):
gas_input: dict
effects: dict
transaction_kind: str
signatures: list[str]
digest: Optional[str] = ""
sender: Optional[dict] = dataclasses.field(default_factory=dict)

Expand Down Expand Up @@ -632,6 +633,7 @@ def from_query(clz, in_data: dict) -> "ExecutionResultGQL":
@dataclasses.dataclass
class TransactionSummaryGQL(PGQL_Type):
digest: str
signatures: list[str]
status: str
timestamp: str
tx_kind: str
Expand Down
2 changes: 1 addition & 1 deletion pysui/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@
# -*- coding: utf-8 -*-

# Read in command line and posting to PyPi
__version__ = "0.66.0"
__version__ = "0.67.0"
"""Pysui Version."""

0 comments on commit 06b1a45

Please sign in to comment.