pysui.sui.sui_pgql package

Submodules

pysui.sui.sui_pgql.pgql_clients module

Sui GraphQL clients.

class pysui.sui.sui_pgql.pgql_clients.PGQL_QueryNode

Bases: ABC

Base query class.

property schema_constraint: str | None

Retreive schema constraint

abstract as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], PGQL_Type | Any] | None

Return the serialization function in derived class or None.

Returns:

A function taking a dictionary as input and returning a PGQL_Type or Any, or None

Return type:

Union[Callable[[dict], Union[pgql_type.PGQL_Type, Any]], None]

class pysui.sui.sui_pgql.pgql_clients.PGQL_NoOp

Bases: PGQL_QueryNode

Noop query class.

as_document_node() DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

class pysui.sui.sui_pgql.pgql_clients.PGQL_Fragment

Bases: ABC

Base Fragment class.

class pysui.sui.sui_pgql.pgql_clients.BaseSuiGQLClient(*, sui_config: SuiConfig, gql_client: Client, version: str, schema: DSLSchema, rpc_config: SuiConfigGQL, write_schema: bool | None = False)

Bases: object

Base GraphQL client.

__init__(*, sui_config: SuiConfig, gql_client: Client, version: str, schema: DSLSchema, rpc_config: SuiConfigGQL, write_schema: bool | None = False)

.

property config: SuiConfig

Fetch the graphql client.

property current_gas_price: int

Fetch the current epoch gas price.

property rpc_config: SuiConfigGQL

Fetch the graphql configuration.

property protocol: TransactionConstraints

Fetch the protocol constraint block.

property url: str

Fetch the active GraphQL URL.

property client: Client

Fetch the graphql client.

property chain_id: str

Fetch the chain identifier.

property chain_environment: str

Fetch which environment (testnet, devenet) operating with.

property schema_version: str

Return Sui GraphQL schema version.

property base_schema_version: str

Returns the header version (schema version without patch)

property schema: DSLSchema

schema Return the DSLSchema for configuration

Returns:

DSLSchema for Sui Schema version associated with connection.

Return type:

DSLSchema

class pysui.sui.sui_pgql.pgql_clients.SuiGQLClient(*, config: SuiConfig, schema_version: str | None = None, write_schema: bool | None = False)

Bases: BaseSuiGQLClient

Synchronous pysui GraphQL client.

__init__(*, config: SuiConfig, schema_version: str | None = None, write_schema: bool | None = False)

Sui GraphQL Client initializer.

execute_query_string(*, string: str, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for string processing

execute_document_node(*, with_node: DocumentNode, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for DocumentNode processing

execute_query_node(*, with_node: PGQL_QueryNode, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for PGQL_QueryNode processing

execute_query(*, with_string: str | None = None, with_document_node: DocumentNode | None = None, with_query_node: PGQL_QueryNode | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

Executes a GraphQL query and returns raw result.

with_string and with_document_node and with_query_node are mutually exclusive. with_string takes precedence, then with_document_node then with_query_node. If none is specific an error is returned.

Parameters:
  • with_string (Optional[str], optional) – A python string query, defaults to None

  • with_document_node (Optional[DocumentNode], optional) – A gql DocumentNode query, defaults to None

  • with_query_node (Optional[PGQL_QueryNode], optional) – A pysui GraphQL QueryNode, defaults to None

  • encode_fn (Optional[Callable[[dict], Any]], optional) – Encoding function taking dict as arg and returning Any, defaults to None This can be used on any ‘with_’ option. If used in addition to with_query_node it will override the builder property of same name if defined

Returns:

SuiRpcResult cointaining status and raw result (dict) or that defined by serialization function

Return type:

SuiRpcResult

Deprecated since version 0.56.0: Use explicit execute for type (str,DocumentNode,PGQL_QueryNode. This will be deleted in version 0.60.0)

class pysui.sui.sui_pgql.pgql_clients.AsyncSuiGQLClient(*, schema_version: str | None = None, write_schema: bool | None = False, config: SuiConfig)

Bases: BaseSuiGQLClient

Asynchronous pysui GraphQL client.

__init__(*, schema_version: str | None = None, write_schema: bool | None = False, config: SuiConfig)

Async Sui GraphQL Client initializer.

async execute_query_string(*, string: str, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for string processing

async execute_document_node(*, with_node: DocumentNode, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for DocumentNode processing

async execute_query_node(*, with_node: PGQL_QueryNode, schema_constraint: str | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

.

Added in version 0.56.0: Unique function for PGQL_QueryNode processing

async execute_query(*, with_string: str | None = None, with_document_node: DocumentNode | None = None, with_query_node: PGQL_QueryNode | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult

Executes a GraphQL query and returns raw result.

with_string and with_document_node and with_query_node are mutually exclusive. with_string takes precedence, then with_document_node then with_query_node. If none is specific an error is returned.

Parameters:
  • with_string (Optional[str], optional) – A python string query, defaults to None

  • with_document_node (Optional[DocumentNode], optional) – A gql DocumentNode query, defaults to None

  • with_query_node (Optional[PGQL_QueryNode], optional) – A pysui GraphQL QueryNode, defaults to None

  • encode_fn (Optional[Callable[[dict], Any]], optional) – Encode function taking dict as arg and returning Any, defaults to None This can be used on any ‘with_’ option. If used in addition to with_query_node it will override the builder property of same name if defined

Returns:

Raw result (dict) or type returned defined by serialization function

Return type:

Any

Deprecated since version 0.56.0: Use explicit execute for type (str,DocumentNode,PGQL_QueryNode. This will be deleted in version 0.60.0)

pysui.sui.sui_pgql.pgql_configs module

Sui GraphQL configuration and constraings.

class pysui.sui.sui_pgql.pgql_configs.ServiceConfigGQL(enabledFeatures: list[str], maxQueryDepth: int, maxQueryNodes: int, maxOutputNodes: int, defaultPageSize: int, maxDbQueryCost: int, maxPageSize: int, requestTimeoutMs: int, maxQueryPayloadSize: int)

Bases: object

Sui GraphQL service controls.

enabledFeatures: list[str]
maxQueryDepth: int
maxQueryNodes: int
maxOutputNodes: int
defaultPageSize: int
maxDbQueryCost: int
maxPageSize: int
requestTimeoutMs: int
maxQueryPayloadSize: int
__init__(enabledFeatures: list[str], maxQueryDepth: int, maxQueryNodes: int, maxOutputNodes: int, defaultPageSize: int, maxDbQueryCost: int, maxPageSize: int, requestTimeoutMs: int, maxQueryPayloadSize: int) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_configs.CheckpointNodeGQL(sequenceNumber: int, timestamp: str, epoch: Any, reference_gas_price: str | None = None)

Bases: object

sequenceNumber: int
timestamp: str
epoch: Any
reference_gas_price: str | None = None
__init__(sequenceNumber: int, timestamp: str, epoch: Any, reference_gas_price: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_configs.CheckpointConnectionGQL(nodes: list[pysui.sui.sui_pgql.pgql_configs.CheckpointNodeGQL])

Bases: object

nodes: list[CheckpointNodeGQL]
__init__(nodes: list[CheckpointNodeGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_configs.SuiConfigGQL(chainIdentifier: str, serviceConfig: pysui.sui.sui_pgql.pgql_configs.ServiceConfigGQL, protocolConfig: pysui.sui.sui_pgql.pgql_types.ProtocolConfigGQL, checkpoints: pysui.sui.sui_pgql.pgql_configs.CheckpointConnectionGQL, gqlEnvironment: str | None = None)

Bases: object

chainIdentifier: str
serviceConfig: ServiceConfigGQL
protocolConfig: ProtocolConfigGQL
checkpoints: CheckpointConnectionGQL
gqlEnvironment: str | None = None
classmethod from_query(in_data: dict) SuiConfigGQL

.

__init__(chainIdentifier: str, serviceConfig: ServiceConfigGQL, protocolConfig: ProtocolConfigGQL, checkpoints: CheckpointConnectionGQL, gqlEnvironment: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
pysui.sui.sui_pgql.pgql_configs.pgql_config() tuple[str, Callable]

.

pysui.sui.sui_pgql.pgql_fragments module

QueryNode generators.

class pysui.sui.sui_pgql.pgql_fragments.GasCost

Bases: PGQL_Fragment

GasCost reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.PageCursor

Bases: PGQL_Fragment

PageCursor reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.StandardCoin

Bases: PGQL_Fragment

StandardCoin reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.BaseObject

Bases: PGQL_Fragment

BaseObject reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.StandardObject

Bases: PGQL_Fragment

StandardObject reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.StandardEvent

Bases: PGQL_Fragment

StandardEvent reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.StandardTxEffects

Bases: PGQL_Fragment

StandardTxEffects reusable fragment.

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.StandardTransaction

Bases: PGQL_Fragment

StandardTransaction reusable fragment.

fragment(schema: DSLSchema) DSLFragment
class pysui.sui.sui_pgql.pgql_fragments.StandardCheckpoint

Bases: PGQL_Fragment

StandardChecpoint reusable fragment.

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.StandardProtocolConfig

Bases: PGQL_Fragment

StandardChecpoint reusable fragment.

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.MoveStructure

Bases: PGQL_Fragment

MoveStructure reusable fragment

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.MoveFunction

Bases: PGQL_Fragment

MoveFunction reusable fragment

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.MoveModule

Bases: PGQL_Fragment

MoveModule reusable fragment.

Contains structs and functions

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.Validator

Bases: PGQL_Fragment

Validator reusable fragment.

fragment(schema: DSLSchema) DSLFragment

.

class pysui.sui.sui_pgql.pgql_fragments.ValidatorSet

Bases: PGQL_Fragment

ValidatorSet reusable fragment.

fragment(schema: DSLSchema) DSLFragment

.

pysui.sui.sui_pgql.pgql_query module

QueryNode generators.

class pysui.sui.sui_pgql.pgql_query.GetCoinMetaData(*, coin_type: str | None = '0x2::sui::SUI')

Bases: PGQL_QueryNode

GetCoinMetaData returns meta data for a specific coin_type.

__init__(*, coin_type: str | None = '0x2::sui::SUI') None

QueryNode initializer.

Parameters:

coin_type (str, optional) – The specific coin type string, defaults to “0x2::sui::SUI”

as_document_node(schema: DSLSchema) DocumentNode

Build the DocumentNode.

static encode_fn() Callable[[dict], SuiCoinMetadataGQL]

Return the serialization to SuiCoinMetadataGQL function.

class pysui.sui.sui_pgql.pgql_query.GetAllCoinBalances(*, owner: str, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetAllCoins Returns the total coin balances, for all coin types, for owner.

This is different from legacy Builder as only a list of coin type summaries are returned. You take the coin_type from any list member and call…

__init__(*, owner: str, next_page: PagingCursor | None = None)

QueryNode initializer.

Parameters:
  • owner (str) – the owner’s Sui address

  • next_page (pgql_type.PagingCursor) – pgql_type.PagingCursor to advance query, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], BalancesGQL]

Return the serializer to BalancesGQL function.

class pysui.sui.sui_pgql.pgql_query.GetCoins(*, owner: str, coin_type: str | None = '0x2::sui::SUI', next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetCoins Returns all Coin objects of a specific type for owner.

__init__(*, owner: str, coin_type: str | None = '0x2::sui::SUI', next_page: PagingCursor | None = None)

QueryNode initializer.

Parameters:
  • owner (str) – Owner’s Sui address

  • coin_type (str, optional) – The coin type to use in filtering, defaults to “0x2::sui::SUI”

  • next_page (pgql_type.PagingCursor) – pgql_type.PagingCursor to advance query, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], SuiCoinObjectsGQL]

Return the serializer to SuiCoinObjectsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetLatestSuiSystemState

Bases: PGQL_QueryNode

GetLatestSuiSystemState return the latest known SUI system state.

__init__() None

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], SystemStateSummaryGQL]

Return the serializer to SystemStateSummaryGQL function.

class pysui.sui.sui_pgql.pgql_query.GetObject(*, object_id: str)

Bases: PGQL_QueryNode

Returns a specific object’s data.

__init__(*, object_id: str)

QueryNode initializer.

Parameters:

object_id (str) – The object id hex string with 0x prefix

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode

static encode_fn() Callable[[dict], ObjectReadGQL]

Return the serializer to ObjectReadGQL function.

class pysui.sui.sui_pgql.pgql_query.GetObjectsOwnedByAddress(*, owner: str, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

Returns data for all objects by owner.

__init__(*, owner: str, next_page: PagingCursor | None = None)

QueryNode initializer.

Parameters:
  • owner (str) – Owner’s Sui address

  • next_page (pgql_type.PagingCursor) – pgql_type.PagingCursor to advance query, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], ObjectReadsGQL]

Return the serializer to ObjectReadsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetMultipleGasObjects(*, coin_object_ids: list[str])

Bases: PGQL_QueryNode

Return basic Sui gas represnetation for each coin_id string.

__init__(*, coin_object_ids: list[str])

.

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], SuiCoinFromObjectsGQL]

Return the serializer to SuiCoinFromObjectsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetMultipleObjects(*, object_ids: list[str], next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

Returns object data for list of object ids.

__init__(*, object_ids: list[str], next_page: PagingCursor | None = None)

QueryNode initializer.

Parameters:
  • object_ids (list[str]) – List of Sui object_ids hex string prefixed with 0x

  • next_page (pgql_type.PagingCursor) – pgql_type.PagingCursor to advance query, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], ObjectReadsGQL]

Return the serializer to ObjectReadsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetPastObject(*, object_id: str, version: int)

Bases: PGQL_QueryNode

Returns a specific objects version data.

__init__(*, object_id: str, version: int)

QueryNode initializer

Parameters:
  • object_id (str) – The Sui object_id hex string with 0x prefix

  • version (int) – The version of the object to fetch.

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], ObjectReadGQL]

Return the serializer to ObjectReadGQL function.

class pysui.sui.sui_pgql.pgql_query.GetMultiplePastObjects(*, for_versions: list[dict])

Bases: PGQL_QueryNode

GetMultiplePastObjects When executed, return the object information for a specified version.

Note there is no software-level guarantee/SLA that objects with past versions can be retrieved by this API, even if the object and version exists/existed. The result may vary across nodes depending on their pruning policies.

__init__(*, for_versions: list[dict])

__init__ Initialize QueryNode to fetch object information give a list of object keys.

Where each dict (key) is of construct: {

objectId:str, version:int

}

Parameters:

history (list[dict]) – The list of ObjectKsy dictionaries

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], ObjectReadsGQL]

Return the serializer to ObjectReadsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetDynamicFields(*, object_id: str, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetDynamicFields when executed, returns the list of dynamic field objects owned by an object.

__init__(*, object_id: str, next_page: PagingCursor | None = None) None

QueryNode initializer.

Parameters:
  • object_id (str) – The object id that holds dynamic fields

  • next_page (Optional[pgql_type.PagingCursor], optional) – A paging directive, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Return a query for dynamic fields.

static encode_fn() Callable[[dict], DynamicFieldsGQL]

Return the serializer to DynamicFieldsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetEvents(*, event_filter: dict, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetEvents When executed, return list of events for a specified transaction block.

__init__(*, event_filter: dict, next_page: PagingCursor | None = None) None

QueryNode initializer

Parameters:
  • event_filter (str) – Filter key/values aligned to Sui GraphQL schema’s EventFilter

  • next_page (pgql_type.PagingCursor) – pgql_type.PagingCursor to advance query, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Build DocumentNode.

static encode_fn() Callable[[dict], EventsGQL]

Return the serializer to EventsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetTx(*, digest: str)

Bases: PGQL_QueryNode

GetTx When executed, return the transaction response object.

__init__(*, digest: str) None

Initialize QueryNode.

Parameters:

digest (str) – The transaction digest to fetch

as_document_node(schema: DSLSchema) DocumentNode

Builds the GQL DocumentNode

Returns:

The transaction query DocumentNode for specific digest

Return type:

DocumentNode

static encode_fn() Callable[[dict], TransactionResultGQL] | None

Return the serializer to TransactionResultGQL function.

class pysui.sui.sui_pgql.pgql_query.GetMultipleTx(*, next_page: PagingCursor | None = None, **qfilter)

Bases: PGQL_QueryNode

GetTxs returns multiple transaction summaries and is controlled by filters and paging.

__init__(*, next_page: PagingCursor | None = None, **qfilter) None

QueryNode initializer.

Parameters:
  • next_page (Optional[pgql_type.PagingCursor], optional) – _description_, defaults to None

  • qfilter – 0 or more TransactionBlockFilter key/value to apply to criteria

Rtype qfilter:

dict

as_document_node(schema: DSLSchema) DocumentNode

Builds the GQL DocumentNode

Returns:

The transactions query DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], TransactionSummariesGQL] | None

Return the serializer to TransactionSummariesGQL function.

class pysui.sui.sui_pgql.pgql_query.GetDelegatedStakes(owner: str, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetDelegatedStakes return all [StakedSui] coins for owner.

__init__(owner: str, next_page: PagingCursor | None = None)

QueryNode initializer.

Parameters:
  • owner (str) – Owner’s Sui address

  • next_page (Optional[pgql_type.PagingCursor], optional) – _description_, defaults to None

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], SuiStakedCoinsGQL] | None

Return the serializer to SuiStakedCoinsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetLatestCheckpointSequence

Bases: PGQL_QueryNode

GetLatestCheckpointSequence return the sequence number of the latest checkpoint that has been executed.

__init__()

__init__ QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], CheckpointGQL] | None

Return the serializer to CheckpointGQL function.

class pysui.sui.sui_pgql.pgql_query.GetCheckpointByDigest(*, digest: str)

Bases: PGQL_QueryNode

GetCheckpointByDigest return a checkpoint for cp_id.

__init__(*, digest: str)

__init__ QueryNode initializer.

Parameters:

digest (str) – Checkpoint digest id

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], CheckpointGQL] | None

Return the serializer to CheckpointGQL function.

class pysui.sui.sui_pgql.pgql_query.GetCheckpointBySequence(*, sequence_number: int)

Bases: PGQL_QueryNode

GetCheckpoint return a checkpoint for cp_id.

__init__(*, sequence_number: int)

__init__ QueryNode initializer.

Parameters:

sequence_number – Checkpoint sequence number

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], CheckpointGQL] | None

Return the serializer to CheckpointGQL function.

class pysui.sui.sui_pgql.pgql_query.GetCheckpoints(*, next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

GetCheckpoints return paginated list of checkpoints.

__init__(*, next_page: PagingCursor | None = None)

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], CheckpointsGQL] | None

Return the serializer to CheckpointsGQL function.

class pysui.sui.sui_pgql.pgql_query.GetProtocolConfig(*, version: int)

Bases: PGQL_QueryNode

Return the protocol config table for the given version number.

__init__(*, version: int)

QueryNode initializer

Parameters:

version (int) – The protocol version to retreive

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], ProtocolConfigGQL] | None

Return the serialization function for ProtocolConfig.

class pysui.sui.sui_pgql.pgql_query.GetReferenceGasPrice

Bases: PGQL_QueryNode

GetReferenceGasPrice return the reference gas price for the network.

__init__()

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

static encode_fn() Callable[[dict], ReferenceGasPriceGQL] | None

Return the serialization function for ReferenceGasPrice.

class pysui.sui.sui_pgql.pgql_query.GetNameServiceAddress(*, name: str)

Bases: PGQL_QueryNode

Return the resolved name service address for name.

__init__(*, name: str)

__init__ QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

Returns a gql DocumentNode ready to execute.

This must be implemented in subclasses.

Parameters:

schema (DSLSchema) – The current Sui GraphQL schema

Returns:

A query processed into a gql DocumentNode

Return type:

DocumentNode

class pysui.sui.sui_pgql.pgql_query.GetNameServiceNames(*, owner: str)

Bases: PGQL_QueryNode

Return the resolved names given address, if multiple names are resolved, the first one is the primary name.

__init__(*, owner: str)

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

.

class pysui.sui.sui_pgql.pgql_query.GetValidatorsApy(next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

Return the validator APY.

__init__(next_page: PagingCursor | None = None)

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], ValidatorApysGQL] | None

Return the serialization function for ValidatorSetGQL.

class pysui.sui.sui_pgql.pgql_query.GetCurrentValidators(next_page: PagingCursor | None = None)

Bases: PGQL_QueryNode

Return the set of validators from the current Epoch.

__init__(next_page: PagingCursor | None = None)

QueryNode initializer.

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], ValidatorSetsGQL] | None

Return the serialization function for ValidatorSetsGQL.

class pysui.sui.sui_pgql.pgql_query.GetStructure(*, package: str, module_name: str, structure_name: str)

Bases: PGQL_QueryNode

GetStructure When executed, returns a module’s structure representation.

__init__(*, package: str, module_name: str, structure_name: str) None

QueryNode initializer.

Parameters:
  • package (str) – object_id of package to query

  • module_name (str) – Name of module from package containing the structure_name to fetch

  • structure_name (str) – Name of structure to fetch

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MoveStructureGQL] | None

Return the serialization function for ReferenceGasPrice.

class pysui.sui.sui_pgql.pgql_query.GetStructures(*, package: str, module_name: str)

Bases: PGQL_QueryNode

GetStructures When executed, returns all of a module’s structures.

__init__(*, package: str, module_name: str) None

QueryNode initializer.

Parameters:
  • package (str) – object_id of package to query

  • module_name (str) – Name of module from package containing structures to fetch

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MoveStructuresGQL] | None

Return the serialization function for ReferenceGasPrice.

class pysui.sui.sui_pgql.pgql_query.GetFunction(*, package: str, module_name: str, function_name: str)

Bases: PGQL_QueryNode

GetFunction When executed, returns a module’s function information.

__init__(*, package: str, module_name: str, function_name: str) None

QueryNode initializer.

Parameters:
  • package (str) – object_id of package to query

  • module_name (str) – Name of module from package containing the function to fetch

  • function_name – Name of function in the module to fetch

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MoveFunctionGQL] | None

Return the serialization function for ReferenceGasPrice.

class pysui.sui.sui_pgql.pgql_query.GetFunctions(*, package: str, module_name: str)

Bases: PGQL_QueryNode

GetFunctions When executed, returns all module’s functions information.

__init__(*, package: str, module_name: str) None

QueryNode initializer.

Parameters:
  • package (str) – object_id of package to query

  • module_name (str) – Name of module from package containing the function to fetch

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MoveFunctionsGQL] | None

Return the serialization function for ReferenceGasPrice.

class pysui.sui.sui_pgql.pgql_query.GetModule(*, package: str, module_name: str)

Bases: PGQL_QueryNode

GetModule When executed, returns the structural representation of a module.

Includes general Module informationn as well as structure and function definitions.

__init__(*, package: str, module_name: str) None

__init__ Initialize GetModule object.

Parameters:
  • package (ObjectID) – ObjectID of package to query

  • module_name (SuiString) – Name of module from package to fetch

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MoveModuleGQL] | None

Return the serialization MoveModule.

class pysui.sui.sui_pgql.pgql_query.GetPackage(*, package: str)

Bases: PGQL_QueryNode

GetPackage When executed, return structured representations of the package.

__init__(*, package: str) None

__init__ Initialize GetPackage object.

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], MovePackageGQL] | None

Return the serialization MovePackage.

class pysui.sui.sui_pgql.pgql_query.DryRunTransactionKind(*, tx_bytestr: str, tx_meta: dict | None = None, skip_checks: bool | None = True)

Bases: PGQL_QueryNode

.

__init__(*, tx_bytestr: str, tx_meta: dict | None = None, skip_checks: bool | None = True) None

__init__ Initialize DryRunTransactionKind object.

for the tx_meta argument, it expects a dictionary with one or more keys set. {

sender: The Sui address string for the sender (defaults to 0x0), gasPrice: The gas price integer (defaults to reference gas price) gasObjects: list[dict] A list of gas object references, defaults to mock Coin object. Reference dict:

{

address: The object id string of the gas object version: The version integer of the gas object digest: The digest of the gas object

}

gasBudget: The budget to use. Defaults to max gas budget gasSponsor: The Sui address string of the sponsor, defaults to the sender

}

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], DryRunResultGQL] | None

Return the serialization MovePackage.

class pysui.sui.sui_pgql.pgql_query.DryRunTransaction(*, tx_bytestr)

Bases: PGQL_QueryNode

.

__init__(*, tx_bytestr) None

__init__ Initialize DryRunTransaction object.

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], DryRunResultGQL] | None

Return the serialization MovePackage.

class pysui.sui.sui_pgql.pgql_query.ExecuteTransaction(*, tx_bytestr: str, sig_array: list[str])

Bases: PGQL_QueryNode

.

__init__(*, tx_bytestr: str, sig_array: list[str]) None

__init__ Initialize ExecuteTransaction object.

as_document_node(schema: DSLSchema) DocumentNode

.

static encode_fn() Callable[[dict], ExecutionResultGQL] | None

Return the serialization Execution result function.

class pysui.sui.sui_pgql.pgql_query.GetAllCoins(*, owner: Any, cursor: Any | None = None, limit: Any | None = None)

Bases: object

GetAllCoins Returns all Coin objects owned by an address.

__init__(*, owner: Any, cursor: Any | None = None, limit: Any | None = None)

QueryNode initializer.

class pysui.sui.sui_pgql.pgql_query.GetCoinTypeBalance(*, owner: Any, coin_type: Any | None = None)

Bases: object

GetCoinTypeBalance Return the total coin balance for a coin type.

__init__(*, owner: Any, coin_type: Any | None = None)

.

class pysui.sui.sui_pgql.pgql_query.GetTotalSupply(*, coin_type: Any | None = None)

Bases: object

Return the total supply for a given coin type (eg. 0x2::sui::SUI).

__init__(*, coin_type: Any | None = None)

.

class pysui.sui.sui_pgql.pgql_query.GetFunctionArgs(*, package: str, module: str, function: str)

Bases: object

GetFunction When executed, returns the argument types of a Move function.

__init__(*, package: str, module: str, function: str) None

__init__ Initialize GetModule object.

Parameters:
  • package (ObjectID) – ObjectID of package to query

  • module (SuiString) – Name of module from package containing function_name to fetch

  • function (SuiString) – Name of module’s function to fetch arguments for

class pysui.sui.sui_pgql.pgql_query.GetTotalTxCount

Bases: object

GetTotalTxCount When executed, return the total number of transactions known to the server.

__init__() None

Initialize builder.

class pysui.sui.sui_pgql.pgql_query.QueryEvents

Bases: object

QueryEvents returns a list of events for a specified query criteria.

__init__() None

Initialize builder.

class pysui.sui.sui_pgql.pgql_query.QueryTransactions

Bases: object

QueryTransactions returns a list of transactions for a specified query criteria..

__init__() None

Initialize builder.

class pysui.sui.sui_pgql.pgql_query.GetChainID

Bases: object

Return the chain’s identifier.

__init__() None

QueryNode initializer..

class pysui.sui.sui_pgql.pgql_query.GetStakesByIds

Bases: object

GetStakesById return all [DelegatedStake] coins identified. If a Stake was withdrawn its status will be Unstaked.

__init__() None

QueryNode initializer..

class pysui.sui.sui_pgql.pgql_query.GetRpcAPI

Bases: object

GetRpcAPI When executed, returns full list of SUI node RPC API supported.

__init__() None

Initialize builder.

class pysui.sui.sui_pgql.pgql_query.GetLoadedChildObjects(*, digest: str)

Bases: object

Returns the child object versions loaded by the object runtime particularly dynamic fields.

__init__(*, digest: str)

QueryNode initializer.

class pysui.sui.sui_pgql.pgql_query.GetCommittee(*, digest: str)

Bases: object

GetCommittee When executed, returns information on committee (collection of nodes).

__init__(*, digest: str)

QueryNode initializer.

pysui.sui.sui_pgql.pgql_sync_txn module

Pysui Transaction builder that leverages Sui GraphQL.

class pysui.sui.sui_pgql.pgql_sync_txn.SuiTransaction(*args, **kwargs)

Bases: _SuiTransactionBase

.

__init__(**kwargs) None

__init__ Initialize the synchronous SuiTransaction.

Parameters:
  • client (SuiGQLClient) – The synchronous SuiGQLClient

  • initial_sender (Union[str, SigningMultiSig], optional) – The address of the sender of the transaction, defaults to None

  • compress_inputs (bool,optional) – Reuse identical inputs, defaults to False

  • merge_gas_budget (bool, optional) – If True will take available gas not in use for paying for transaction, defaults to False

  • deserialize_from (Union[str, bytes], optional) – Will rehydrate SuiTransaction state from serialized base64 str or bytes, defaults to None

transaction_data(*, gas_budget: str | None = None, use_gas_objects: list[str | SuiCoinObjectGQL] | None = None) TransactionData

transaction_data Construct a BCS TransactionData object.

If gas_budget not provided, pysui will call DryRunTransactionBlock to calculate.

If use_gas_objects not used, pysui will determine which gas objects to use to pay for the transaction.

Parameters:
  • gas_budget (Optional[str], optional) – Specify the amount of gas for the transaction budget, defaults to None

  • use_gas_objects (Optional[list[Union[str, pgql_type.SuiCoinObjectGQL]]], optional) – Specify gas object(s) (by ID or SuiCoinObjectGQL), defaults to None

Returns:

The TransactionData BCS structure

Return type:

bcs.TransactionData

build(*, gas_budget: str | None = None, use_gas_objects: list[str | SuiCoinObjectGQL] | None = None) str

build After creating the BCS TransactionKind, serialize to base64 string and return.

Parameters:
  • gas_budget (Optional[str], optional) – Specify the amount of gas for the transaction budget, defaults to None

  • use_gas_objects (Optional[list[Union[str, pgql_type.SuiCoinObjectGQL]]], optional) – Specify gas object(s) (by ID or SuiCoinObjectGQL), defaults to None

Returns:

Base64 encoded transaction bytes

Return type:

str

build_and_sign(*, gas_budget: str | None = None, use_gas_objects: list[str | SuiCoinObjectGQL] | None = None) tuple[str, list[str]]

build After creating the BCS TransactionKind, serialize to base64 string, create signatures and return.

Parameters:
  • gas_budget (Optional[str], optional) – Specify the amount of gas for the transaction budget, defaults to None

  • use_gas_objects (Optional[list[Union[str, pgql_type.SuiCoinObjectGQL]]], optional) – Specify gas object(s) (by ID or SuiCoinObjectGQL), defaults to None

Returns:

Tuple of tx_bytes (base64) and list of signatures

Return type:

tuple[str, list[str]]

split_coin(*, coin: str | ObjectReadGQL | Argument, amounts: list[int | Argument]) Argument | list[Argument]

split_coin Creates a new coin(s) with the defined amount(s), split from the provided coin.

Note: Returns the result that it can be used in subsequent commands. If only one amount is provided, a standard Result can be used as a singular argument to another command. But if more than 1 amount. For example you can index to get a singular value or use the whole list.

# Transfer all coins to one recipient
txer = SuiTransaction(client)
scres = txer.split_coin(coin=primary_coin, amounts=[1000000000, 1000000000])
txer.transfer_objects(transfers=scres, recipient=client.config.active_address)

# OR only transfer less than all
txer.transfer_objects(transfers=[scres[0]],recipient=client.config.active_address)
Parameters:
  • coin (Union[str, pgql_type.ObjectReadGQL, bcs.Argument]) – The coin address (object id) to split from.

  • amounts (list[Union[int, bcs.Argument]]) – The amount or list of amounts to split the coin out to

Returns:

A result or list of results types to use in subsequent commands

Return type:

Union[list[bcs.Argument],bcs.Argument]

merge_coins(*, merge_to: str | ObjectReadGQL | Argument, merge_from: list[str | ObjectReadGQL | Argument]) Argument

merge_coins Merges one or more coins to a primary coin.

Parameters:
  • merge_to (Union[str, pgql_type.ObjectReadGQL, bcs.Argument]) – The coin to merge other coins to

  • merge_from (list[Union[str, pgql_type.ObjectReadGQL, bcs.Argument]]) – One or more coins to merge to primary ‘merge_to’ coin

Returns:

The command result. Can not be used as input in subsequent commands.

Return type:

bcs.Argument

split_coin_equal(*, coin: str | ObjectReadGQL | Argument, split_count: int, coin_type: str | None = '0x2::sui::SUI') Argument

split_coin_equal Splits a Sui coin into equal parts and transfers to transaction signer.

Parameters:
  • coin (Union[str, bcs.Argument]) – The coin to split

  • split_count (int) – The number of parts to split coin into

  • coin_type (Optional[str], optional) – The coin type, defaults to a Sui coin type

Returns:

The command result. Because all splits are automagically transferred to signer, the result is not usable as input to subseqent commands.

Return type:

bcs.Argument

split_coin_and_return(*, coin: str | ObjectReadGQL | Argument, split_count: int, coin_type: str | None = '0x2::sui::SUI') Argument

split_coin_and_return Splits a Sui coin into equal parts and returns array of split_count-1 for user to transfer.

Parameters:
Returns:

The command result which is a vector of coins split out and may be used in subsequent commands.

Return type:

bcs.Argument

transfer_objects(*, transfers: list[str | ObjectReadGQL | Argument], recipient: str) Argument

transfer_objects Transfers one or more objects to a recipient.

Parameters:
  • transfers (list[Union[str, pgql_type.ObjectReadGQL, bcs.Argument]]) – A list or SuiArray of objects to transfer

  • recipient (str) – The recipient address that will receive the objects being transfered

Returns:

The command result. Can NOT be used as input in subsequent commands.

Return type:

bcs.Argument

transfer_sui(*, recipient: str, from_coin: str | ObjectReadGQL | Argument, amount: int | None = None) Argument

transfer_sui Transfers a Sui coin object to a recipient.

Parameters:
  • recipient (str) – The recipient address that will receive the Sui coin being transfered

  • from_coin (Union[str, bcs.Argument]) – The Sui coin to transfer

  • amount (Optional[int], optional) – Optional amount to transfer. Entire coin if not specified, defaults to None

Raises:
  • ValueError – If unable to fetch the from_coin

  • ValueError – If from_coin is invalid

Returns:

The command result. Can NOT be used as input in subsequent commands.

Return type:

bcs.Argument

public_transfer_object(*, object_to_send: str | ObjectReadGQL | Argument, recipient: str, object_type: str) Argument

public_transfer_object Public transfer of any object with KEY and STORE Attributes.

Parameters:
  • object_to_send (Union[str, bcs.Argument]) – Object being transferred

  • recipient (str) – Address for recipient of object_to_send

  • object_type (str) – Type arguments

Returns:

Result of command which is non-reusable

Return type:

bcs.Argument

make_move_vector(*, items: list[str, ObjectReadGQL, ObjectArg], item_type: str | None = None) Argument

Create a call to convert a list of objects to a Sui ‘vector’ of item_type.

move_call(*, target: str, arguments: list[Any], type_arguments: list | None = None) Argument | list[Argument]

move_call Creates a command to invoke a move contract call. May or may not return results.

Parameters:
  • target (str) – String triple in form “package_object_id::module_name::function_name”

  • arguments (list[Any]) – Arguments that are passed to the move function

  • type_arguments (Optional[list], optional) – Optional list of type arguments for move function generics, defaults to None

Returns:

The result which may or may not be used in subequent commands depending on the move method being called.

Return type:

Union[bcs.Argument, list[bcs.Argument]]

stake_coin(*, coins: list[str | ObjectReadGQL], validator_address: str, amount: int | None = None) Argument

stake_coin Stakes one or more coins to a specific validator.

Parameters:
  • coins (list[str, pgql_type.ObjectReadGQL]) – One or more coins to stake.

  • validator_address (str) – The validator to stake coins to

  • amount (Optional[int], optional) – Amount from coins to stake. If not stated, all coin will be staked, defaults to None

Returns:

The command result.

Return type:

bcs.Argument

unstake_coin(*, staked_coin: str | SuiStakedCoinGQL) Argument

unstake_coin Unstakes a Staked Sui Coin.

Parameters:

staked_coin (Union[str, pgql_type.SuiStakedCoinGQL]) – The coin being unstaked

Returns:

The Result argument

Return type:

bcs.Argument

publish(*, project_path: str, args_list: list[str] | None = None) Argument

publish Creates a publish command.

Parameters:
  • project_path (str) – path to project folder

  • args_list (Optional[list[str]], optional) – Additional sui move build arguments, defaults to None

Returns:

A command result (UpgradeCap) that should used in a subsequent transfer commands

Return type:

bcs.Argument

publish_upgrade(*, project_path: str, upgrade_cap: str | ObjectReadGQL, args_list: list[str] | None = None) Argument

publish_upgrade Authorize, publish and commit upgrade of package.

Parameters:
  • project_path (str) – Path to move project

  • upgrade_cap (Union[str, pgql_type.ObjectReadGQL]) – Id or ObjectRead of UpgradeCap

  • args_list (Optional[list[str]], optional) – Arguments for compilation of project, defaults to None

Raises:
  • ValueError – If fetching UpgradeCap has error

  • ValueError – If can’t verify UpgradeCap

Returns:

Non reusable result

Return type:

bcs.Argument

custom_upgrade(*, project_path: str, package_id: str, upgrade_cap: str, authorize_upgrade_fn: Callable[[SuiTransaction, Any, Digest], Argument], commit_upgrade_fn: Callable[[SuiTransaction, Any, Argument], Argument], args_list: list[str] | None = None) Argument

custom_upgrade Support for custom authorization and commitments.

Parameters:
  • project_path (str) – path to project folder

  • package_id (str) – The current package id that is being upgraded

  • upgrade_cap (str) – The upgrade capability object

  • authorize_upgrade_fn (Callable[[&quot;SuiTransaction&quot;, Any, bcs.Digest], bcs.Argument]) – Function to be called that generates custom authorization ‘move_call’

  • commit_upgrade_fn (Callable[[&quot;SuiTransaction&quot;, Any, bcs.Argument], bcs.Argument]) – Function to be called that generates custom commitment ‘move_call’

  • args_list (Optional[list[str]], optional) – Additional sui move build arguments, defaults to None

Returns:

The result argument

Return type:

bcs.Argument

pysui.sui.sui_pgql.pgql_txb_gas module

pysui.sui.sui_pgql.pgql_txb_gas.get_gas_data(*, signing: SignerBlock, client: BaseSuiGQLClient, budget: int | None = None, use_coins: list[str | SuiCoinObjectGQL] | None = None, objects_in_use: set[str], active_gas_price: int, tx_kind: TransactionKind) GasData

get_gas_data Builds the GasData BCS structure for the transaction data.

Parameters:
  • signing (SignerBlock) – The GraphQL SigningBlock

  • client (BaseSuiGQLClient) – The GraphQL Client

  • objects_in_use (set[str]) – Objects already identified as ‘in-use’ in the builder

  • active_gas_price (int) – Current Gas Price

  • tx_kind (bcs.TransactionKind) – The TransactionKind BCS

  • budget (Optional[int], optional) – Option budget to set for transaction, defaults to None

  • use_coins (Optional[list[Union[str, pgql_type.SuiCoinObjectGQL]]], optional) – Gas coins to use for paying transactions, defaults to None

Raises:
  • ValueError – If use_coins are not either strings or SuiCoinObjectGQL objects

  • ValueError – If not gas coins provided and none found

Returns:

_description_

Return type:

bcs.GasData

pysui.sui.sui_pgql.pgql_txb_signing module

Pysui Signing Block builder that works with GraphQL connection.

class pysui.sui.sui_pgql.pgql_txb_signing.SigningMultiSig(msig: BaseMultiSig, pub_keys: list[SuiPublicKey])

Bases: object

Wraps the mutli-sig along with pubkeys to use in SuiTransaction.

__init__(msig: BaseMultiSig, pub_keys: list[SuiPublicKey])

.

property signing_address: str

.

class pysui.sui.sui_pgql.pgql_txb_signing.SignerBlock(*, sender: str | SigningMultiSig | None = None, sponsor: str | SigningMultiSig | None = None)

Bases: object

.

__init__(*, sender: str | SigningMultiSig | None = None, sponsor: str | SigningMultiSig | None = None)

__init__ Create a signer block.

Parameters:
property sender_str: str

Return the current sender used in signing.

property sender: str | SigningMultiSig

Return the current sender used in signing.

property sponsor_str: str | None

Return the current sender used in signing.

property sponsor: None | str | SigningMultiSig

Get who, if any, may be acting as payer of transaction.

property payer_address: str

Fetch payer address.

get_signatures(*, config: SuiConfig, tx_bytes: str) list[str]

Get all the signatures needed for the transaction.

pysui.sui.sui_pgql.pgql_txn_argb module

Pysui Transaction argument builder that works with GraphQL connection.

pysui.sui.sui_pgql.pgql_txn_argb.build_args(client: SuiGQLClient, in_args: list, meta_args: MoveArgSummary) list

build_args Validates and prepares arguments for transaction execution

Parameters:
  • client (SuiGQLClient) – The Sui GraphQL client

  • in_args (list) – The list of pre-processed arguments

  • meta_args (pgql_type.MoveArgSummary) – The meta move function argument type list

Raises:

ValueError – If the provided arg count and expected don’t match

Returns:

The list of post processed arguments

Return type:

list

pysui.sui.sui_pgql.pgql_types module

Pysui data classes for GraphQL results.

class pysui.sui.sui_pgql.pgql_types.PGQL_Type

Bases: ABC

Base GraphQL to pysui data representation class.

abstract from_query() PGQL_Type

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

class pysui.sui.sui_pgql.pgql_types.PagingCursor(hasNextPage: bool = False, endCursor: str | None = <factory>)

Bases: object

Static cursor controls used for paging results.

hasNextPage: bool = False
endCursor: str | None
__init__(hasNextPage: bool = False, endCursor: str | None = <factory>) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.NoopGQL(next_cursor: PagingCursor, data: list)

Bases: PGQL_Type

Returned when no data received from GraphQL.

next_cursor: PagingCursor
data: list
classmethod from_query() NoopGQL

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

__init__(next_cursor: PagingCursor, data: list) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ErrorGQL(next_cursor: PagingCursor, data: list, errors: Any)

Bases: PGQL_Type

.

next_cursor: PagingCursor
data: list
errors: Any
classmethod from_query(errors: Any) ErrorGQL

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

__init__(next_cursor: PagingCursor, data: list, errors: Any) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ObjectReadDeletedGQL(version: int, object_id: str, object_kind: str)

Bases: object

Return when object has been wrapped or deleted.

version: int
object_id: str
object_kind: str
__init__(version: int, object_id: str, object_kind: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiObjectOwnedShared(obj_owner_kind: str, initial_version: int)

Bases: object

Collection of coin data objects.

obj_owner_kind: str
initial_version: int
__init__(obj_owner_kind: str, initial_version: int) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiObjectOwnedAddress(obj_owner_kind: str, address_id: str)

Bases: object

Collection of coin data objects.

obj_owner_kind: str
address_id: str
__init__(obj_owner_kind: str, address_id: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiObjectOwnedParent(obj_owner_kind: str, parent_id: str)

Bases: object

Collection of coin data objects.

obj_owner_kind: str
parent_id: str
__init__(obj_owner_kind: str, parent_id: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiObjectOwnedImmutable(obj_owner_kind: str)

Bases: object

Collection of coin data objects.

obj_owner_kind: str
__init__(obj_owner_kind: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiCoinObjectGQL(coin_type: str, version: int, object_digest: str, balance: str, previous_transaction: str, has_public_transfer: bool, coin_object_id: str, object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable)

Bases: PGQL_Type

Coin object representation class.

coin_type: str
version: int
object_digest: str
balance: str
previous_transaction: str
has_public_transfer: bool
coin_object_id: str
object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable
property object_id: str

Get as object_id.

classmethod from_query(in_data: dict) SuiCoinObjectGQL

From raw GraphQL result data.

__init__(coin_type: str, version: int, object_digest: str, balance: str, previous_transaction: str, has_public_transfer: bool, coin_object_id: str, object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiCoinFromObjectsGQL(data: list[SuiCoinObjectGQL | ObjectReadDeletedGQL])

Bases: PGQL_Type

Collection of sui coin from objects.

data: list[SuiCoinObjectGQL | ObjectReadDeletedGQL]
classmethod from_query(in_data: dict) SuiCoinFromObjectsGQL

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

__init__(data: list[SuiCoinObjectGQL | ObjectReadDeletedGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiCoinObjectsGQL(data: list[SuiCoinObjectGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of coin data objects.

data: list[SuiCoinObjectGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) SuiCoinObjectsGQL

Serializes query result to list of Sui gas coin objects.

The in_data is a dictionary with 2 keys: ‘cursor’ and ‘coin_objects’

__init__(data: list[SuiCoinObjectGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiStakedCoinGQL(poolId: str, version: int, has_public_transfer: bool, principal: str, estimated_reward: str, activated: dict, requested: dict, status: str, object_id: str, object_digest: str, object_owner: SuiObjectOwnedAddress)

Bases: object

Staked coin object.

poolId: str
version: int
has_public_transfer: bool
principal: str
estimated_reward: str
activated: dict
requested: dict
status: str
object_id: str
object_digest: str
object_owner: SuiObjectOwnedAddress
classmethod from_query(in_data: dict) SuiStakedCoinGQL

Serializes query result to list of SuiStaked gas coin objects.

__init__(poolId: str, version: int, has_public_transfer: bool, principal: str, estimated_reward: str, activated: dict, requested: dict, status: str, object_id: str, object_digest: str, object_owner: SuiObjectOwnedAddress) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiStakedCoinsGQL(owner: str, staked_coins: list[SuiStakedCoinGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of staked coin objects.

owner: str
staked_coins: list[SuiStakedCoinGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) SuiStakedCoinsGQL

Serializes query result to list of Sui gas coin objects.

The in_data is a dictionary with 2 keys: ‘cursor’ and ‘coin_objects’

__init__(owner: str, staked_coins: list[SuiStakedCoinGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ObjectReadGQL(version: int, object_id: str, object_digest: str, previous_transaction_digest: str, object_kind: str, storage_rebate: str, bcs: str, object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable, has_public_transfer: bool | None = False, object_type: str | None = None, content: dict | None = None, owner_id: str | None = None)

Bases: PGQL_Type

Raw object representation class.

version: int
object_id: str
object_digest: str
previous_transaction_digest: str
object_kind: str
storage_rebate: str
bcs: str
object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable
has_public_transfer: bool | None = False
object_type: str | None = None
content: dict | None = None
owner_id: str | None = None
classmethod from_query(in_data: dict) ObjectReadGQL

Serializes query result to list of Sui objects.

The in_data is a dictionary with nested dictionaries

__init__(version: int, object_id: str, object_digest: str, previous_transaction_digest: str, object_kind: str, storage_rebate: str, bcs: str, object_owner: SuiObjectOwnedAddress | SuiObjectOwnedParent | SuiObjectOwnedShared | SuiObjectOwnedImmutable, has_public_transfer: bool | None = False, object_type: str | None = None, content: dict | None = None, owner_id: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ObjectReadsGQL(data: list[ObjectReadGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of object data objects.

data: list[ObjectReadGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) ObjectReadsGQL

Serializes query result to list of Sui objects.

The in_data is a dictionary with 2 keys: ‘cursor’ and ‘objects_data’

__init__(data: list[ObjectReadGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.EventGQL(package_id: str, module_name: str, event_type: str, timestamp: str, json: str, sender: str | None)

Bases: PGQL_Type

Collection of event summaries.

package_id: str
module_name: str
event_type: str
timestamp: str
json: str
sender: str | None
classmethod from_query(in_data: dict) EventGQL

Serializes query result to list of Sui objects.

__init__(package_id: str, module_name: str, event_type: str, timestamp: str, json: str, sender: str | None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.EventsGQL(data: list[EventGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of event summaries.

data: list[EventGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) EventsGQL

Serializes query result to list of Sui objects. The in_data is a dictionary with 2 keys: ‘cursor’ and ‘events’

__init__(data: list[EventGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.TxBlockListGQL(data: list[str], next_cursor: PagingCursor)

Bases: PGQL_Type

Checkpoint data representation.

data: list[str]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) TxBlockListGQL

Serializes query result of tx blocks in checkpoint.

__init__(data: list[str], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.CheckpointGQL(digest: str, sequence_number: int, timestamp: str, networkTotalTransactions: int, transaction_blocks: TxBlockListGQL, previous_checkpoint_digest: str | None)

Bases: PGQL_Type

Checkpoint data representation.

digest: str
sequence_number: int
timestamp: str
networkTotalTransactions: int
transaction_blocks: TxBlockListGQL
previous_checkpoint_digest: str | None
classmethod from_query(in_data: dict) CheckpointGQL

Serializes query result of tx blocks in checkpoint.

classmethod from_last_checkpoint(in_data: dict) CheckpointGQL

Serializes query result of tx blocks in checkpoint.

__init__(digest: str, sequence_number: int, timestamp: str, networkTotalTransactions: int, transaction_blocks: TxBlockListGQL, previous_checkpoint_digest: str | None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.CheckpointsGQL(data: list[CheckpointGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of Checkpoint summaries.

data: list[CheckpointGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) CheckpointsGQL

.

__init__(data: list[CheckpointGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.BalanceGQL(coin_type: str, coin_object_count: int, total_balance: str, owner: str | None = '')

Bases: PGQL_Type

Balance representation class.

coin_type: str
coin_object_count: int
total_balance: str
owner: str | None = ''
classmethod from_query(in_data: dict) BalanceGQL

Serializes query result of balance.

The in_data is a dictionary with nested dictionaries

__init__(coin_type: str, coin_object_count: int, total_balance: str, owner: str | None = '') None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.BalancesGQL(owner_address: str, data: list[BalanceGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Collection of balance objects.

owner_address: str
data: list[BalanceGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) BalancesGQL

Serializes query result to list of Sui objects.

The in_data is a dictionary with 2 keys: ‘cursor’ and ‘objects_data’

__init__(owner_address: str, data: list[BalanceGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SuiCoinMetadataGQL(decimals: int | None = None, name: str | None = None, symbol: str | None = None, description: str | None = None, supply: str | None = None, address: str | None = None, icon_url: str | None = None)

Bases: PGQL_Type

Coin metadata result representation class.

decimals: int | None = None
name: str | None = None
symbol: str | None = None
description: str | None = None
supply: str | None = None
address: str | None = None
icon_url: str | None = None
classmethod from_query(in_data: dict) SuiCoinMetadataGQL

Serializes query result to Sui coin metadata object.

__init__(decimals: int | None = None, name: str | None = None, symbol: str | None = None, description: str | None = None, supply: str | None = None, address: str | None = None, icon_url: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.TransactionResultGQL(expiration: dict | None, gas_input: dict, effects: dict, digest: str | None = '', sender: dict | None = <factory>)

Bases: PGQL_Type

Transaction result representation class.

expiration: dict | None
gas_input: dict
effects: dict
digest: str | None = ''
sender: dict | None
classmethod from_query(in_data: dict) TransactionResultGQL

.

__init__(expiration: dict | None, gas_input: dict, effects: dict, digest: str | None = '', sender: dict | None = <factory>) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.DryRunResultGQL(transaction_block: TransactionResultGQL, results: list[dict] | None, error: str | None = None)

Bases: PGQL_Type

DryRun result representation class.

transaction_block: TransactionResultGQL
results: list[dict] | None
error: str | None = None
classmethod from_query(in_data: dict) DryRunResultGQL

.

__init__(transaction_block: TransactionResultGQL, results: list[dict] | None, error: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ExecutionResultGQL(status: str, lamport_version: int, digest: str, errors: list[str] | None = None)

Bases: PGQL_Type

Execution result representation class.

status: str
lamport_version: int
digest: str
errors: list[str] | None = None
classmethod from_query(in_data: dict) ExecutionResultGQL

.

__init__(status: str, lamport_version: int, digest: str, errors: list[str] | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.TransactionSummaryGQL(digest: str, status: str, timestamp: str, errors: Optional[Any] = <factory>)

Bases: PGQL_Type

digest: str
status: str
timestamp: str
errors: Any | None
classmethod from_query(in_data: dict) TransactionSummaryGQL

.

__init__(digest: str, status: str, timestamp: str, errors: ~typing.Any | None = <factory>) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.TransactionSummariesGQL(data: list[TransactionSummaryGQL], next_cursor: PagingCursor)

Bases: PGQL_Type

Transaction list of digest representation class.

data: list[TransactionSummaryGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) TransactionSummariesGQL

.

__init__(data: list[TransactionSummaryGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorGQL(validator_name: str, validator_address: str, description: str, project_url: str, staking_pool_sui_balance: str, pending_stake: str, pending_pool_token_withdraw: str, pending_total_sui_withdraw: str, voting_power: int, commission_rate: str, next_epoch_stake: str, gas_price: str, next_epoch_gas_price: str, next_epoch_commission_rate: int, at_risk: int | None)

Bases: PGQL_Type

Validator representation class.

validator_name: str
validator_address: str
description: str
project_url: str
staking_pool_sui_balance: str
pending_stake: str
pending_pool_token_withdraw: str
pending_total_sui_withdraw: str
voting_power: int
next_epoch_stake: str
gas_price: str
next_epoch_gas_price: str
commission_rate: str
next_epoch_commission_rate: int
at_risk: int | None
classmethod from_query(in_data: dict) ValidatorGQL

.

__init__(validator_name: str, validator_address: str, description: str, project_url: str, staking_pool_sui_balance: str, pending_stake: str, pending_pool_token_withdraw: str, pending_total_sui_withdraw: str, voting_power: int, commission_rate: str, next_epoch_stake: str, gas_price: str, next_epoch_gas_price: str, next_epoch_commission_rate: int, at_risk: int | None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorSetGQL(total_stake: int, validators: list[ValidatorGQL], pending_removals: list[int] | None, pending_active_validators_size: int | None, inactive_pools_size: int | None, validator_candidates_size: int | None)

Bases: PGQL_Type

ValidatorSet representation class.

total_stake: int
validators: list[ValidatorGQL]
pending_removals: list[int] | None
pending_active_validators_size: int | None
inactive_pools_size: int | None
validator_candidates_size: int | None
classmethod from_query(in_data: dict) ValidatorSetGQL

.

__init__(total_stake: int, validators: list[ValidatorGQL], pending_removals: list[int] | None, pending_active_validators_size: int | None, inactive_pools_size: int | None, validator_candidates_size: int | None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ReferenceGasPriceGQL(reference_gas_price: str)

Bases: PGQL_Type

ReferenceGasPriceGQL representation class.

reference_gas_price: str
classmethod from_query(in_data: dict) ReferenceGasPriceGQL

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

__init__(reference_gas_price: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.SystemStateSummaryGQL(system_state_version: str, total_transactions: int, reference_gas_price: ReferenceGasPriceGQL, system_parameters: dict, validator_set: ValidatorSetGQL, storage_fund: dict, safe_mode: dict)

Bases: PGQL_Type

SuiSystemStateSummary representation class.

system_state_version: str
total_transactions: int
reference_gas_price: ReferenceGasPriceGQL
system_parameters: dict
validator_set: ValidatorSetGQL
storage_fund: dict
safe_mode: dict
classmethod from_query(in_data: dict) SystemStateSummaryGQL

Converts raw GraphQL result to dataclass type.

Returns:

Object instance of implementing class

Return type:

PGQL_Type

__init__(system_state_version: str, total_transactions: int, reference_gas_price: ReferenceGasPriceGQL, system_parameters: dict, validator_set: ValidatorSetGQL, storage_fund: dict, safe_mode: dict) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.TransactionConstraints(protocol_version: int | None = 0, max_arguments: int | None = 0, max_input_objects: int | None = 0, max_num_transferred_move_object_ids: int | None = 0, max_programmable_tx_commands: int | None = 0, max_pure_argument_size: int | None = 0, max_tx_size_bytes: int | None = 0, max_type_argument_depth: int | None = 0, max_type_arguments: int | None = 0, max_tx_gas: int | None = 0, receive_objects: bool = False)

Bases: object

Subset of Protocol Constraints.

protocol_version: int | None = 0
max_arguments: int | None = 0
max_input_objects: int | None = 0
max_num_transferred_move_object_ids: int | None = 0
max_programmable_tx_commands: int | None = 0
max_pure_argument_size: int | None = 0
max_tx_size_bytes: int | None = 0
max_type_argument_depth: int | None = 0
max_type_arguments: int | None = 0
max_tx_gas: int | None = 0
receive_objects: bool = False
__init__(protocol_version: int | None = 0, max_arguments: int | None = 0, max_input_objects: int | None = 0, max_num_transferred_move_object_ids: int | None = 0, max_programmable_tx_commands: int | None = 0, max_pure_argument_size: int | None = 0, max_tx_size_bytes: int | None = 0, max_type_argument_depth: int | None = 0, max_type_arguments: int | None = 0, max_tx_gas: int | None = 0, receive_objects: bool = False) None
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.KeyValue(key: str, value: bool | str | None)

Bases: object

Generic map element.

key: str
value: bool | str | None
__init__(key: str, value: bool | str | None) None
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ProtocolConfigGQL(protocolVersion: int, configs: list[~pysui.sui.sui_pgql.pgql_types.KeyValue], featureFlags: list[~pysui.sui.sui_pgql.pgql_types.KeyValue], transaction_constraints: ~pysui.sui.sui_pgql.pgql_types.TransactionConstraints | None = <factory>)

Bases: object

Sui ProtocolConfig representation.

protocolVersion: int
configs: list[KeyValue]
featureFlags: list[KeyValue]
transaction_constraints: TransactionConstraints | None
classmethod from_query(in_data: dict) ProtocolConfigGQL
__init__(protocolVersion: int, configs: list[~pysui.sui.sui_pgql.pgql_types.KeyValue], featureFlags: list[~pysui.sui.sui_pgql.pgql_types.KeyValue], transaction_constraints: ~pysui.sui.sui_pgql.pgql_types.TransactionConstraints | None = <factory>) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveStructureGQL(struct_name: str, abilities: list[str], fields: list[dict])

Bases: object

Sui MoveStucture representation.

struct_name: str
abilities: list[str]
fields: list[dict]
classmethod from_query(in_data: dict) MoveStructureGQL
__init__(struct_name: str, abilities: list[str], fields: list[dict]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveStructuresGQL(structures: list[MoveStructureGQL])

Bases: object

Sui collection of MoveStuctures.

structures: list[MoveStructureGQL]
classmethod from_query(in_data: dict) MoveStructuresGQL
__init__(structures: list[MoveStructureGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.RefType(value)

Bases: IntEnum

.

NO_REF = 0
REF = 1
MUT_REF = 2
classmethod from_ref(rstr: str) RefType

.

class pysui.sui.sui_pgql.pgql_types.MoveTypeArg(ref: RefType, scalar_type: str)

Bases: object

.

ref: RefType
scalar_type: str
classmethod from_str(in_ref: str, in_type: str) MoveTypeArg

“.

__init__(ref: RefType, scalar_type: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveScalarArg(ref: RefType, scalar_type: str)

Bases: object

.

ref: RefType
scalar_type: str
classmethod from_str(in_ref: str, in_type: str) MoveScalarArg

“.

__init__(ref: RefType, scalar_type: str) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveObjectRefArg(ref_type: RefType, type_package: str, type_module: str, type_struct: str, type_params: list, is_optional: bool, is_receiving: bool, has_type: bool)

Bases: object

.

ref_type: RefType
type_package: str
type_module: str
type_struct: str
type_params: list
is_optional: bool
is_receiving: bool
has_type: bool
classmethod from_body(in_ref: str, in_type: dict) MoveObjectRefArg

“.

__init__(ref_type: RefType, type_package: str, type_module: str, type_struct: str, type_params: list, is_optional: bool, is_receiving: bool, has_type: bool) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveVectorArg(ref: RefType, vec_arg: MoveScalarArg | MoveObjectRefArg)

Bases: object

.

ref: RefType
vec_arg: MoveScalarArg | MoveObjectRefArg
classmethod from_body(in_ref: str, in_type: dict) MoveVectorArg

“.

__init__(ref: RefType, vec_arg: MoveScalarArg | MoveObjectRefArg) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveListArg(ref: RefType, list_arg: MoveScalarArg | MoveObjectRefArg)

Bases: object

.

ref: RefType
list_arg: MoveScalarArg | MoveObjectRefArg
__init__(ref: RefType, list_arg: MoveScalarArg | MoveObjectRefArg) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveWitnessArg(ref: RefType)

Bases: object

.

ref: RefType
classmethod from_body(in_ref: str) MoveWitnessArg

.

__init__(ref: RefType) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveArgSummary(type_parameters: list, arg_list: list[MoveScalarArg | MoveObjectRefArg | MoveTypeArg | MoveVectorArg | MoveWitnessArg], returns: int | None = None)

Bases: object

.

type_parameters: list
arg_list: list[MoveScalarArg | MoveObjectRefArg | MoveTypeArg | MoveVectorArg | MoveWitnessArg]
returns: int | None = None
__init__(type_parameters: list, arg_list: list[MoveScalarArg | MoveObjectRefArg | MoveTypeArg | MoveVectorArg | MoveWitnessArg], returns: int | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveFunctionGQL(function_name: str, is_entry: bool, visibility: str, type_parameters: list, parameters: list[dict], returns: list | None = <factory>)

Bases: object

Sui MoveFunction representation.

function_name: str
is_entry: bool
visibility: str
type_parameters: list
parameters: list[dict]
returns: list | None
classmethod from_query(in_data: dict) MoveFunctionGQL
arg_summary() MoveArgSummary

Summarize the function’s arguments.

__init__(function_name: str, is_entry: bool, visibility: str, type_parameters: list, parameters: list[dict], returns: list | None = <factory>) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveFunctionsGQL(functions: list[MoveFunctionGQL])

Bases: object

Sui MoveFunction representation.

functions: list[MoveFunctionGQL]
classmethod from_query(in_data: dict) MoveFunctionsGQL

.

__init__(functions: list[MoveFunctionGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MoveModuleGQL(module_name: str, module_structures: MoveStructuresGQL, module_functions: MoveFunctionsGQL)

Bases: object

Sui MoveModule representation.

module_name: str
module_structures: MoveStructuresGQL
module_functions: MoveFunctionsGQL
classmethod from_query(in_data: dict) MoveModuleGQL
__init__(module_name: str, module_structures: MoveStructuresGQL, module_functions: MoveFunctionsGQL) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.MovePackageGQL(package_id: str, package_version: int, modules: list[MoveModuleGQL])

Bases: object

Sui MovePackage representation.

package_id: str
package_version: int
modules: list[MoveModuleGQL]
classmethod from_query(in_data: dict) MovePackageGQL
__init__(package_id: str, package_version: int, modules: list[MoveModuleGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorFullGQL(validator_name: str, validator_address: str, description: str, imageUrl: str, projectUrl: str, stakingPoolSuiBalance: str, stakingPoolActivationEpoch: int, exchangeRatesSize: int, rewardsPool: str, poolTokenBalance: str, pendingStake: str, pendingTotalSuiWithdraw: str, pendingPoolTokenWithdraw: str, votingPower: int, gasPrice: str, commissionRate: int, nextEpochStake: str, nextEpochGasPrice: str, nextEpochCommissionRate: 1200, apy: int, atRisk: int | None = None, operating_cap_address: str | None = None, exchange_rates_address: str | None = None, staking_pool_address: str | None = None)

Bases: object

Sui ValidatorSet representation.

validator_name: str
validator_address: str
description: str
imageUrl: str
projectUrl: str
stakingPoolSuiBalance: str
stakingPoolActivationEpoch: int
exchangeRatesSize: int
rewardsPool: str
poolTokenBalance: str
pendingStake: str
pendingTotalSuiWithdraw: str
pendingPoolTokenWithdraw: str
votingPower: int
gasPrice: str
commissionRate: int
nextEpochStake: str
nextEpochGasPrice: str
nextEpochCommissionRate: 1200
apy: int
atRisk: int | None = None
operating_cap_address: str | None = None
exchange_rates_address: str | None = None
staking_pool_address: str | None = None
classmethod from_query(in_data: dict) ValidatorFullGQL
__init__(validator_name: str, validator_address: str, description: str, imageUrl: str, projectUrl: str, stakingPoolSuiBalance: str, stakingPoolActivationEpoch: int, exchangeRatesSize: int, rewardsPool: str, poolTokenBalance: str, pendingStake: str, pendingTotalSuiWithdraw: str, pendingPoolTokenWithdraw: str, votingPower: int, gasPrice: str, commissionRate: int, nextEpochStake: str, nextEpochGasPrice: str, nextEpochCommissionRate: 1200, apy: int, atRisk: int | None = None, operating_cap_address: str | None = None, exchange_rates_address: str | None = None, staking_pool_address: str | None = None) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorSetsGQL(totalStake: str, pendingRemovals: list, pendingActiveValidatorsId: str, pendingActiveValidatorsSize: int, stakingPoolMappingsId: str, inactivePoolsId: str, validatorCandidatesId: str, validatorCandidatesSize: int, validators: list[ValidatorFullGQL], next_cursor: PagingCursor)

Bases: object

Sui ValidatorSet representation.

totalStake: str
pendingRemovals: list
pendingActiveValidatorsId: str
pendingActiveValidatorsSize: int
stakingPoolMappingsId: str
inactivePoolsId: str
validatorCandidatesId: str
validatorCandidatesSize: int
validators: list[ValidatorFullGQL]
next_cursor: PagingCursor
classmethod from_query(in_data: dict) ValidatorSetsGQL
__init__(totalStake: str, pendingRemovals: list, pendingActiveValidatorsId: str, pendingActiveValidatorsSize: int, stakingPoolMappingsId: str, inactivePoolsId: str, validatorCandidatesId: str, validatorCandidatesSize: int, validators: list[ValidatorFullGQL], next_cursor: PagingCursor) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorApyGQL(name: str, apy: int)

Bases: object

Sui ValidatorApy representation.

name: str
apy: int
__init__(name: str, apy: int) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.ValidatorApysGQL(next_cursor: PagingCursor, validators_apy: list[ValidatorApyGQL])

Bases: object

Sui ValidatorApy representation.

next_cursor: PagingCursor
validators_apy: list[ValidatorApyGQL]
classmethod from_query(in_data: dict) ValidatorApysGQL
__init__(next_cursor: PagingCursor, validators_apy: list[ValidatorApyGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.DynamicFieldGQL(name: dict, field_kind: str, field_data: dict)

Bases: object

Sui Object’s Dynamic Field representation.

name: dict
field_kind: str
field_data: dict
__init__(name: dict, field_kind: str, field_data: dict) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str
class pysui.sui.sui_pgql.pgql_types.DynamicFieldsGQL(parent_object_id: str, version: int, next_cursor: PagingCursor, dynamic_fields: list[DynamicFieldGQL])

Bases: object

Sui Object’s Dynamic Fields representation.

parent_object_id: str
version: int
next_cursor: PagingCursor
dynamic_fields: list[DynamicFieldGQL]
__init__(parent_object_id: str, version: int, next_cursor: PagingCursor, dynamic_fields: list[DynamicFieldGQL]) None
dataclass_json_config = {'letter_case': <function camelcase>}
classmethod from_dict(kvs: dict | list | str | int | float | bool | None, *, infer_missing=False) A
classmethod from_json(s: str | bytes | bytearray, *, parse_float=None, parse_int=None, parse_constant=None, infer_missing=False, **kw) A
classmethod from_query(in_data: dict) DynamicFieldsGQL
classmethod schema(*, infer_missing: bool = False, only=None, exclude=(), many: bool = False, context=None, load_only=(), dump_only=(), partial: bool = False, unknown=None) SchemaF[A]
to_dict(encode_json=False) Dict[str, dict | list | str | int | float | bool | None]
to_json(*, skipkeys: bool = False, ensure_ascii: bool = True, check_circular: bool = True, allow_nan: bool = True, indent: str | int | None = None, separators: Tuple[str, str] | None = None, default: Callable | None = None, sort_keys: bool = False, **kw) str

pysui.sui.sui_pgql.pgql_validators module

Temporary validations.

class pysui.sui.sui_pgql.pgql_validators.TypeValidator

Bases: object

TypeValidator contains validation classmethods.

classmethod check_owner(owner: str, config: SuiConfig) str | ValueError

check_owner Validates owner is well formed Sui Address.

Owner may be an alias or a string with 0x prefix and up to 64 hex characters

Parameters:
  • owner (str) – Input data string to validate

  • config (SuiConfig) – The active SuiConfiguraiton for alias checking

Raises:
  • ValueError – If not alias and string length not valid for address

  • ValueError – Malformed Sui address string

Returns:

Validated owner address string

Return type:

Union[str, ValueError]

classmethod check_object_id(object_id: str) str | ValueError

check_object_id Validates object id is well formed Sui object id string.

Parameters:

object_id (str) – Input data string to validate

Raises:
  • ValueError – Invalid object id string length

  • ValueError – If string does not have 0x or 0X prefix

  • ValueError – Malformed Sui address string

Returns:

Validated object id string

Return type:

Union[str, ValueError]

classmethod check_object_ids(object_ids: list[str]) list[str] | ValueError

check_object_ids Validate a list of object_ids

Parameters:

object_ids (list[str]) – List of object id strings

Returns:

List of validated object id strings

Return type:

Union[list[str], ValueError]

classmethod check_target_triplet(target: str) tuple[str, str, str] | ValueError

.

Module contents

Pysui Sui GraphQL RPC Package.