pysui.sui.sui_pgql package
Subpackages
- pysui.sui.sui_pgql.config package
- Submodules
- pysui.sui.sui_pgql.config.confgroup module
ProfileAliasProfileKeyProfileProfileGroupProfileGroup.group_nameProfileGroup.using_profileProfileGroup.using_addressProfileGroup.alias_listProfileGroup.key_listProfileGroup.address_listProfileGroup.profilesProfileGroup.active_addressProfileGroup.active_aliasProfileGroup.address_for_alias()ProfileGroup.alias_for_address()ProfileGroup.alias_name_for_address()ProfileGroup.replace_alias_name()ProfileGroup.active_profileProfileGroup.address_keypair()ProfileGroup.__init__()ProfileGroup.new_keypair_parts()ProfileGroup.add_keypair_and_parts()ProfileGroup.add_profile()
- pysui.sui.sui_pgql.config.conflegacy module
- pysui.sui.sui_pgql.config.confmodel module
PysuiConfigModelPysuiConfigModel.sui_binaryPysuiConfigModel.group_activePysuiConfigModel.groupsPysuiConfigModel.has_group()PysuiConfigModel.remove_group()PysuiConfigModel.get_group()PysuiConfigModel.active_groupPysuiConfigModel.active_addressPysuiConfigModel.initialize_json_rpc()PysuiConfigModel.initialize_gql_rpc()PysuiConfigModel.__init__()PysuiConfigModel.add_group()
- pysui.sui.sui_pgql.config.pysui_config module
PysuiConfigurationPysuiConfiguration.SUI_JSON_RPC_GROUPPysuiConfiguration.SUI_GQL_RPC_GROUPPysuiConfiguration.__init__()PysuiConfiguration.to_json()PysuiConfiguration.refresh_legacy()PysuiConfiguration.modelPysuiConfiguration.active_groupPysuiConfiguration.active_addressPysuiConfiguration.active_address_aliasPysuiConfiguration.active_envPysuiConfiguration.urlPysuiConfiguration.faucet_urlPysuiConfiguration.faucet_status_urlPysuiConfiguration.config_pathPysuiConfiguration.address_for_alias()PysuiConfiguration.alias_for_address()PysuiConfiguration.rename_alias()PysuiConfiguration.make_active()PysuiConfiguration.new_keypair()
- Module contents
Submodules
pysui.sui.sui_pgql.pgql_clients module
Sui GraphQL clients.
- class pysui.sui.sui_pgql.pgql_clients.PGQL_QueryNode
Bases:
ABCBase 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
- class pysui.sui.sui_pgql.pgql_clients.PGQL_NoOp
Bases:
PGQL_QueryNodeNoop 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:
ABCBase Fragment class.
- class pysui.sui.sui_pgql.pgql_clients.BaseSuiGQLClient(*, pysui_config: PysuiConfiguration, schema: Schema, write_schema: bool | None = False, default_header: dict | None = None)
Bases:
objectBase GraphQL client.
Changed in version 0.64.0: BREAKING previous properteries now take schema version option
- __init__(*, pysui_config: PysuiConfiguration, schema: Schema, write_schema: bool | None = False, default_header: dict | None = None)
.
Changed in version 0.65.0: BREAKING Uses PysuiConfiguration instead of SuiConfig
- property config: PysuiConfiguration
Fetch the Pysui configuration.
Changed in version 0.65.0: BREAKING Uses PysuiConfiguration instead of SuiConfig
- current_gas_price(for_version: str | None = None) int
Fetch the current epoch gas price.
- rpc_config(for_version: str | None = None) SuiConfigGQL
Fetch the graphql configuration.
- protocol(for_version: str | None = None) TransactionConstraints
Fetch the protocol constraint block.
- url(for_version: str | None = None) str
Fetch the active GraphQL URL.
- client(for_version: str | None = None) Client
Fetch the graphql client.
- async async_client(for_version: str | None = None) ReconnectingAsyncClientSession
Fetch the graphql async client.
- chain_id(for_version: str | None = None) str
Fetch the chain identifier.
- property chain_environment: str
Fetch which environment (testnet, devenet) operating with.
- schema_version(for_version: str | None = None) str
Returns Sui GraphQL schema long version.
- property base_schema_version: str
Returns the default schema version (schema version without patch)
- schema(for_version: str | None = None) DSLSchema
Return the specific DSLSchema for configuration
- query_node_to_string(*, query_node: PGQL_QueryNode, schema_constraint: str | None = None) str
.
Added in version 0.60.0: Support query inspection
- class pysui.sui.sui_pgql.pgql_clients.SuiGQLClient(*, pysui_config: PysuiConfiguration, schema_version: str | None = None, write_schema: bool | None = False, default_header: dict | None = None)
Bases:
BaseSuiGQLClientSynchronous pysui GraphQL client.
- __init__(*, pysui_config: PysuiConfiguration, schema_version: str | None = None, write_schema: bool | None = False, default_header: dict | None = None)
Sui GraphQL Client initializer.
Changed in version 0.65.0: BREAKING Uses PysuiConfiguration instead of SuiConfig
- execute_query_string(*, string: str, schema_constraint: str | None = None, with_headers: dict | 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, with_headers: dict | 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, with_headers: dict | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult
.
Added in version 0.56.0: Unique function for PGQL_QueryNode processing
- class pysui.sui.sui_pgql.pgql_clients.AsyncSuiGQLClient(*, pysui_config: PysuiConfiguration, schema_version: str | None = None, write_schema: bool | None = False, default_header: dict | None = None)
Bases:
BaseSuiGQLClientAsynchronous pysui GraphQL client.
- __init__(*, pysui_config: PysuiConfiguration, schema_version: str | None = None, write_schema: bool | None = False, default_header: dict | None = None)
Async Sui GraphQL Client initializer.
Changed in version 0.65.0: BREAKING Uses PysuiConfiguration instead of SuiConfig
- property session: Any
- async close() None
Close the connection.
- async execute_query_string(*, string: str, schema_constraint: str | None = None, with_headers: dict | 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, with_headers: dict | 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, with_headers: dict | None = None, encode_fn: Callable[[dict], Any] | None = None) SuiRpcResult
.
Added in version 0.56.0: Unique function for PGQL_QueryNode processing
pysui.sui.sui_pgql.pgql_configs module
Sui GraphQL configuration and constraings.
- class pysui.sui.sui_pgql.pgql_configs.ServiceConfigGQL(maxTypeArgumentDepth: int, maxTypeNodes: int, maxMoveValueDepth: int, enabledFeatures: list[str], maxQueryDepth: int, maxQueryNodes: int, maxOutputNodes: int, defaultPageSize: int, maxDbQueryCost: int, maxPageSize: int, requestTimeoutMs: int, maxQueryPayloadSize: int, availableVersions: list[str] | None = <factory>, mutationTimeoutMs: int | None = None)
Bases:
objectSui GraphQL service controls.
- maxTypeArgumentDepth: int
- maxTypeNodes: int
- maxMoveValueDepth: int
- enabledFeatures: list[str]
- maxQueryDepth: int
- maxQueryNodes: int
- maxOutputNodes: int
- defaultPageSize: int
- maxDbQueryCost: int
- maxPageSize: int
- requestTimeoutMs: int
- maxQueryPayloadSize: int
- availableVersions: list[str] | None
- mutationTimeoutMs: int | None = None
- __init__(maxTypeArgumentDepth: int, maxTypeNodes: int, maxMoveValueDepth: int, enabledFeatures: list[str], maxQueryDepth: int, maxQueryNodes: int, maxOutputNodes: int, defaultPageSize: int, maxDbQueryCost: int, maxPageSize: int, requestTimeoutMs: int, maxQueryPayloadSize: int, availableVersions: list[str] | None = <factory>, mutationTimeoutMs: 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_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(env: str, sversion: str | None = None) tuple[str, Callable]
.
pysui.sui.sui_pgql.pgql_fragments module
QueryNode generators.
- class pysui.sui.sui_pgql.pgql_fragments.GasCost
Bases:
PGQL_FragmentGasCost reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.PageCursor
Bases:
PGQL_FragmentPageCursor reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.StandardCoin
Bases:
PGQL_FragmentStandardCoin reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.BaseObject
Bases:
PGQL_FragmentBaseObject reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.StandardObject
Bases:
PGQL_FragmentStandardObject reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.StandardEvent
Bases:
PGQL_FragmentStandardEvent reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.StandardTxEffects
Bases:
PGQL_FragmentStandardTxEffects reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.StandardTransaction
Bases:
PGQL_FragmentStandardTransaction reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
- class pysui.sui.sui_pgql.pgql_fragments.ProgrammableTxKind
Bases:
PGQL_FragmentDetails of the ProgrammableTransaction type commands.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.ConsensusCommitPrologueKind
Bases:
PGQL_FragmentDetails of consensus commit transaction.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.AuthenticatorStateUpdateTransactionKind
Bases:
PGQL_FragmentDetails of AuthenticatorStateUpdateTransaction.
Not used by any pysui QueryNode but available to those creating them.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.RandomnessStateUpdateTransactionKind
Bases:
PGQL_FragmentDetails of RandomnessStateUpdateTransaction.
Not used by any pysui QueryNode but available to those creating them.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.StandardTransactionKind
Bases:
PGQL_FragmentDetails a transactions kind. Supports ProgrammableTransaction type only.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.StandardCheckpoint
Bases:
PGQL_FragmentStandardChecpoint reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.StandardProtocolConfig
Bases:
PGQL_FragmentStandardChecpoint reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.MoveStructure
Bases:
PGQL_FragmentMoveStructure reusable fragment
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.MoveFunction
Bases:
PGQL_FragmentMoveFunction reusable fragment
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.MoveModule
Bases:
PGQL_FragmentMoveModule reusable fragment.
Contains structs and functions
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.Validator
Bases:
PGQL_FragmentValidator reusable fragment.
- fragment(schema: DSLSchema) DSLFragment
.
- class pysui.sui.sui_pgql.pgql_fragments.ValidatorSet
Bases:
PGQL_FragmentValidatorSet 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_QueryNodeGetCoinMetaData 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_QueryNodeGetAllCoins 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_QueryNodeGetCoins 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_QueryNodeGetLatestSuiSystemState 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_QueryNodeReturns 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_QueryNodeReturns 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_QueryNodeReturn basic Sui gas represnetation for each coin_id string.
- __init__(*, coin_object_ids: list[str])
QueryNode initializer.
- Parameters:
coin_object_ids (list[str]) – list of object ids to fetch
- 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_QueryNodeReturns 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_QueryNodeReturns 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_QueryNodeGetMultiplePastObjects 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])
QueryNode initializer to fetch past object information for a list of object keys.
Where each dict (key) is of construct: {
objectId:str, # Object id version:int # Previous version id to fetch
}
- 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_QueryNodeGetDynamicFields 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 to featch dynamic fields.
- 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_QueryNodeGetEvents When executed, return list of events for a specified transaction block.
- __init__(*, event_filter: dict, next_page: PagingCursor | None = None) None
QueryNode initializer to query chain events emitted by modules.
- 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.
- class pysui.sui.sui_pgql.pgql_query.GetTx(*, digest: str)
Bases:
PGQL_QueryNodeGetTx When executed, return the transaction response object.
- __init__(*, digest: str) None
QueryNode initializer to fetch a transaction by digest id.
- 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_QueryNodeGetTxs returns multiple transaction summaries and is controlled by filters and paging.
- __init__(*, next_page: PagingCursor | None = None, **qfilter) None
QueryNode initializer to fetch multiple transactions by filter parameters.
- Parameters:
next_page (Optional[pgql_type.PagingCursor], optional) – Pagination curosr, 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.GetFilteredTx(*, tx_filter: dict, next_page: PagingCursor | None = None)
Bases:
PGQL_QueryNodeGetTxs returns all transactions with TransactionBlockFilter set and is controlled by paging.
- __init__(*, tx_filter: dict, next_page: PagingCursor | None = None) None
QueryNode initializer.
- Parameters:
tx_filter (dict) – TransactionBlockFilter dict
next_page (Optional[pgql_type.PagingCursor], optional) – _description_, defaults to None
- 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.GetTxKind(digest: str)
Bases:
PGQL_QueryNodeGets details of Transaction kind.
- __init__(digest: str)
QueryNode initializer.
- 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], TransactionKindGQL] | None
Return the serializer to TransactionKindGQL function.
- class pysui.sui.sui_pgql.pgql_query.GetDelegatedStakes(owner: str, next_page: PagingCursor | None = None)
Bases:
PGQL_QueryNodeGetDelegatedStakes 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_QueryNodeGetLatestCheckpointSequence 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_QueryNodeGetCheckpointByDigest 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_QueryNodeGetCheckpoint 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_QueryNodeGetCheckpoints 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_QueryNodeReturn 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_QueryNodeGetReferenceGasPrice 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_QueryNodeReturn 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_QueryNodeReturn 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_QueryNodeReturn 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_QueryNodeReturn 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_QueryNodeGetStructure 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, next_page: PagingCursor | None = None)
Bases:
PGQL_QueryNodeGetStructures When executed, returns all of a module’s structures.
- __init__(*, package: str, module_name: str, next_page: PagingCursor | None = None) 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_QueryNodeGetFunction 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, next_page: PagingCursor | None = None)
Bases:
PGQL_QueryNodeGetFunctions When executed, returns all module’s functions information.
- __init__(*, package: str, module_name: str, next_page: PagingCursor | None = None) 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_QueryNodeGetModule 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.
- 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, next_page: PagingCursor | None = None)
Bases:
PGQL_QueryNodeGetPackage When executed, return structured representations of the package.
- __init__(*, package: str, next_page: PagingCursor | None = None) 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.
pysui.sui.sui_pgql.pgql_schema module
Schema management module.
- class pysui.sui.sui_pgql.pgql_schema.Schema(active_schemas: list, default: str)
Bases:
object- RPC_CFG = 'rpc_config'
- DSCHEMA = 'schema'
- GCLIENT = 'client'
- ASYNCSESS = 'async_client'
- GURL = 'url'
- BUILD = 'build_version'
- SCHEMA_HEADER_SCHEMA_KEY: str = 'x-sui-rpc-version'
- __init__(active_schemas: list, default: str)
__init__ Initialize schema
- Parameters:
active_schemas (list) – Collection of active schemas
default (str) – The schema to default to
- Raises:
ValueError – If the default is not in the active schemas
ValueError – No default provided
- property default_version: str
Fetch default version of schema.
- property last_version: str
Fetch the last version used.
- property schema_set: dict[str, dict[str, Any]]
Fetch the entire schema set
pysui.sui.sui_pgql.pgql_sync_txn module
Pysui Transaction builder that leverages Sui GraphQL.
- class pysui.sui.sui_pgql.pgql_sync_txn.SuiTransaction(**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
- target_function_summary(target: str) tuple[Address, str, str, int, MoveArgSummary]
Returns the argument summary of a target sui move function.
- transaction_data(*, gas_budget: str | None = None, use_gas_objects: list[str | SuiCoinObjectGQL] | None = None, txn_expires_after: int | 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
txn_expires_after (Optional[int],optional) – Specify the transaction expiration epoch ID, defaults to None
- Returns:
The TransactionData BCS structure
- Return type:
- build(*, gas_budget: str | None = None, use_gas_objects: list[str | SuiCoinObjectGQL] | None = None, txn_expires_after: int | None = None) str
build After creating the BCS TransactionData, 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
txn_expires_after (Optional[int],optional) – Specify the transaction expiration epoch ID, 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, txn_expires_after: int | None = None) dict
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
txn_expires_after (Optional[int],optional) – Specify the transaction expiration epoch ID, defaults to None
- Returns:
Dict of {
”tx_bytestr”: base64 encoded transaction bytes, “sig_array”: array of base64 encoded signature bytes
}
- Return type:
dict[str, str]
Changed in version 0.64.0: Return dict instead of tuple
- 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:
- 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:
- 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:
- 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:
- 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:
- 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 | Argument], 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, bcs.Argument]) – 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:
- 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:
- 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:
- 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:
- 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[["SuiTransaction", Any, bcs.Digest], bcs.Argument]) – Function to be called that generates custom authorization ‘move_call’
commit_upgrade_fn (Callable[["SuiTransaction", 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:
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:
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:
objectWraps 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:
sender (Optional[Union[str, SigningMultiSig]], optional) – The primary sender/signer, defaults to None
sponsor (Optional[Union[str, SigningMultiSig]], optional) – An optional sponsor for transaction, defaults to None
- 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: PysuiConfiguration, 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.pass_through(arg: Any) Any
Emulate ‘identity’.
- 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_txn_base module
Sui high level Transaction Builder supports generation of TransactionKind and TransactionData.
pysui.sui.sui_pgql.pgql_types module
Pysui data classes for GraphQL results.
- class pysui.sui.sui_pgql.pgql_types.PGQL_Type
Bases:
ABCBase GraphQL to pysui data representation class.
- class pysui.sui.sui_pgql.pgql_types.PagingCursor(hasNextPage: bool = False, endCursor: str | None = <factory>)
Bases:
objectStatic 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_TypeReturned 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:
- __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:
- __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:
objectReturn 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
Bases:
objectCollection of coin data objects.
- class pysui.sui.sui_pgql.pgql_types.SuiObjectOwnedAddress(obj_owner_kind: str, address_id: str)
Bases:
objectCollection 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:
objectCollection 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:
objectCollection 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_TypeCoin 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_TypeCollection 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:
- __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_TypeCollection 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:
objectStaked 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_TypeCollection 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_TypeRaw 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_TypeCollection 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_TypeCollection of event summaries.
- package_id: str
- module_name: str
- event_type: str
- timestamp: str
- json: str
- sender: str | None
- __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_TypeCollection of event summaries.
- 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_TypeCheckpoint 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_TypeCheckpoint 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_TypeCollection 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_TypeBalance 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_TypeCollection 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_TypeCoin 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, transaction_kind: str, digest: str | None = '', sender: dict | None = <factory>)
Bases:
PGQL_TypeTransaction result representation class.
- expiration: dict | None
- gas_input: dict
- effects: dict
- transaction_kind: str
- digest: str | None = ''
- sender: dict | None
- classmethod from_query(in_data: dict) TransactionResultGQL
.
- __init__(expiration: dict | None, gas_input: dict, effects: dict, transaction_kind: str, 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_TypeDryRun 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_TypeExecution 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, tx_kind: str, errors: Optional[Any] = <factory>)
Bases:
PGQL_Type- digest: str
- status: str
- timestamp: str
- tx_kind: str
- errors: Any | None
- classmethod from_query(in_data: dict) TransactionSummaryGQL
.
- __init__(digest: str, status: str, timestamp: str, tx_kind: 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_TypeTransaction 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.OwnedOrImmutableInputGQL(address: str, version: int, digest: str, input_typename: str)
Bases:
objectProgrammableTransactionBlock input class.
- address: str
- version: int
- digest: str
- input_typename: str
- __init__(address: str, version: int, digest: str, input_typename: 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
Bases:
objectProgrammableTransactionBlock input class.
- class pysui.sui.sui_pgql.pgql_types.PureInputGQL(base64_bytes: str, input_typename: str)
Bases:
objectProgrammableTransactionBlock input class.
- base64_bytes: str
- input_typename: str
- __init__(base64_bytes: str, input_typename: 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.ArgInputRefGQL(input_index: int)
Bases:
objectProgrammableTransactionBlock argument reference class.
- input_index: int
- __init__(input_index: 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.ArgResultRefGQL(cmd: int, result_index: int | None)
Bases:
objectProgrammableTransactionBlock argument reference class.
- cmd: int
- result_index: int | None
- __init__(cmd: int, result_index: 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.ArgGasCoinRefGQL(gas_ref: Any)
Bases:
objectProgrammableTransactionBlock argument reference class.
- gas_ref: Any
- __init__(gas_ref: 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.TransactionMoveCallGQL(package: str, module: str, function_name: str, arguments: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: str, typeArguments: list[dict] | None)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- package: str
- module: str
- function_name: str
- arguments: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL]
- tx_typename: str
- typeArguments: list[dict] | None
- __init__(package: str, module: str, function_name: str, arguments: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: str, typeArguments: list[dict] | 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.TransactioTransferObjectslGQL(inputs: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], address: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- inputs: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL]
- address: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL
- tx_typename: str
- __init__(inputs: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], address: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, tx_typename: 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.TransactionSplitCoinsGQL(coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, amounts: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL
- amounts: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL]
- tx_typename: str
- __init__(coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, amounts: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: 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.TransactionMergeCoinsGQL(coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, coins: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL
- coins: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL]
- tx_typename: str
- __init__(coin: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, coins: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: 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.TransactionPublishGQL(modules: list[str], dependencies: list[str], tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- modules: list[str]
- dependencies: list[str]
- tx_typename: str
- __init__(modules: list[str], dependencies: list[str], tx_typename: 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.TransactionUpgradeGQL(modules: list[str], dependencies: list[str], current_package: str, upgrade_ticket: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- modules: list[str]
- dependencies: list[str]
- current_package: str
- upgrade_ticket: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL
- tx_typename: str
- __init__(modules: list[str], dependencies: list[str], current_package: str, upgrade_ticket: ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL, tx_typename: 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.TransactionMakeMoveVecGQL(vector_type: dict, elements: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: str)
Bases:
objectProgrammableTransactionBlock transaction representation class.
- vector_type: dict
- elements: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL]
- tx_typename: str
- __init__(vector_type: dict, elements: list[ArgInputRefGQL | ArgResultRefGQL | ArgGasCoinRefGQL], tx_typename: 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.ProgrammableTransactionBlockGQL(inputs: list[OwnedOrImmutableInputGQL | SharedObjectInputGQL | PureInputGQL], transactions: list[TransactionMoveCallGQL | TransactioTransferObjectslGQL | TransactionSplitCoinsGQL | TransactionMergeCoinsGQL | TransactionPublishGQL | TransactionUpgradeGQL | TransactionMakeMoveVecGQL])
Bases:
objectProgrammableTransactionBlock kind representation class.
- inputs: list[OwnedOrImmutableInputGQL | SharedObjectInputGQL | PureInputGQL]
- transactions: list[TransactionMoveCallGQL | TransactioTransferObjectslGQL | TransactionSplitCoinsGQL | TransactionMergeCoinsGQL | TransactionPublishGQL | TransactionUpgradeGQL | TransactionMakeMoveVecGQL]
- __init__(inputs: list[OwnedOrImmutableInputGQL | SharedObjectInputGQL | PureInputGQL], transactions: list[TransactionMoveCallGQL | TransactioTransferObjectslGQL | TransactionSplitCoinsGQL | TransactionMergeCoinsGQL | TransactionPublishGQL | TransactionUpgradeGQL | TransactionMakeMoveVecGQL]) 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.ConsensusCommitPrologueTransactionGQL(epoch: dict, consensus_round: int, commit_timestamp: str, consensus_commit_digest: str | None)
Bases:
objectConsensusCommitPrologueTransaction kind representation class.
- epoch: dict
- consensus_round: int
- commit_timestamp: str
- consensus_commit_digest: str | None
- __init__(epoch: dict, consensus_round: int, commit_timestamp: str, consensus_commit_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.GenesisTransactionGQL(objects: dict)
Bases:
objectGenesisTransaction kind representation class.
- objects: dict
- __init__(objects: 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.AuthenticatorStateUpdateTransactionGQL(epoch: dict, consensus_round: int, authenticator_obj_initial_shared_version: int, new_active_jwks: dict)
Bases:
objectAuthenticatorStateUpdateTransaction kind representation class.
- epoch: dict
- consensus_round: int
- new_active_jwks: dict
- __init__(epoch: dict, consensus_round: int, authenticator_obj_initial_shared_version: int, new_active_jwks: 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.RandomnessStateUpdateTransactionGQL(epoch: dict, randomness_round: int, random_bytes: str, new_active_jwks: dict, randomness_obj_initial_shared_version: int)
Bases:
objectAuthenticatorStateUpdateTransaction kind representation class.
- epoch: dict
- randomness_round: int
- random_bytes: str
- new_active_jwks: dict
- __init__(epoch: dict, randomness_round: int, random_bytes: str, new_active_jwks: dict, randomness_obj_initial_shared_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.TransactionKindGQL(digest: str, timestamp: str, transaction_kind: str, kind: ProgrammableTransactionBlockGQL | GenesisTransactionGQL | ConsensusCommitPrologueTransactionGQL)
Bases:
PGQL_TypeTransaction kind representation class.
- digest: str
- timestamp: str
- transaction_kind: str
- kind: ProgrammableTransactionBlockGQL | GenesisTransactionGQL | ConsensusCommitPrologueTransactionGQL
- classmethod from_query(in_data: dict) TransactionKindGQL
.
- __init__(digest: str, timestamp: str, transaction_kind: str, kind: ProgrammableTransactionBlockGQL | GenesisTransactionGQL | ConsensusCommitPrologueTransactionGQL) 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_TypeValidator 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_TypeValidatorSet 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_TypeReferenceGasPriceGQL 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:
- __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_TypeSuiSystemStateSummary 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:
- __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:
objectSubset 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:
objectGeneric 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:
objectSui ProtocolConfig representation.
- protocolVersion: int
- 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:
objectSui 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], next_cursor: PagingCursor | None)
Bases:
objectSui collection of MoveStuctures.
- structures: list[MoveStructureGQL]
- next_cursor: PagingCursor | None
- classmethod from_query(in_data: dict) MoveStructuresGQL
- __init__(structures: list[MoveStructureGQL], next_cursor: PagingCursor | 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.RefType(value)
Bases:
IntEnum.
- NO_REF = 0
- REF = 1
- MUT_REF = 2
- class pysui.sui.sui_pgql.pgql_types.MoveTypeArg(ref: RefType, scalar_type: str)
Bases:
object.
- scalar_type: str
- classmethod from_str(in_ref: str, in_type: str) MoveTypeArg
“.
- 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.
- scalar_type: str
- classmethod from_str(in_ref: str, in_type: str) MoveScalarArg
“.
- 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.
- 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.
- 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.
- 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.
- classmethod from_body(in_ref: str) MoveWitnessArg
.
- 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:
objectSui 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], next_cursor: PagingCursor | None)
Bases:
objectSui MoveFunction representation.
- functions: list[MoveFunctionGQL]
- next_cursor: PagingCursor | None
- classmethod from_query(in_data: dict) MoveFunctionsGQL
.
- __init__(functions: list[MoveFunctionGQL], next_cursor: PagingCursor | 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.MoveModuleGQL(module_name: str, module_structures: MoveStructuresGQL | list, module_functions: MoveFunctionsGQL | list)
Bases:
objectSui MoveModule representation.
- module_name: str
- module_structures: MoveStructuresGQL | list
- module_functions: MoveFunctionsGQL | list
- classmethod from_query(in_data: dict) MoveModuleGQL
- __init__(module_name: str, module_structures: MoveStructuresGQL | list, module_functions: MoveFunctionsGQL | 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.MovePackageGQL(package_id: str, package_version: int, modules: list[MoveModuleGQL], next_cursor: PagingCursor)
Bases:
objectSui MovePackage representation.
- package_id: str
- package_version: int
- modules: list[MoveModuleGQL]
- next_cursor: PagingCursor
- classmethod from_query(in_data: dict) MovePackageGQL
- __init__(package_id: str, package_version: int, modules: list[MoveModuleGQL], 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.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:
objectSui 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:
objectSui 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:
objectSui 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(validators_apy: list[ValidatorApyGQL], next_cursor: PagingCursor)
Bases:
objectSui ValidatorApy representation.
- validators_apy: list[ValidatorApyGQL]
- next_cursor: PagingCursor
- classmethod from_query(in_data: dict) ValidatorApysGQL
- __init__(validators_apy: list[ValidatorApyGQL], 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.DynamicFieldGQL(name: dict, field_kind: str, field_data: dict)
Bases:
objectSui 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:
objectSui 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:
objectTypeValidator contains validation classmethods.
- classmethod check_owner(owner: str, config: PysuiConfiguration) 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 (PysuiConfiguration) – The active PysuiConfiguraiton 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
.
pysui.sui.sui_pgql.pgql_wallet2txn_deser module
Pysui DeSertializtion from Sui Wallet JSON standard to pysui GraphQL SuiTransaction.
- pysui.sui.sui_pgql.pgql_wallet2txn_deser.deserialize_to_transaction(*, wallet_json: str, **kwargs) tuple[int, SuiTransaction, SuiGasData | None]
Deserializes a Sui Transaction to a pysui SuiTransaction (GraphQL).
Notes:
If there are UnresolvedPure this will fail.
$Intents are ignored.
If the ‘sender’ or ‘gas owner’ are not resolvable this will fail.
- Parameters:
wallet_json (str) – _description_
**kwargs (dict) – The keywords passed to instantiating SuiTranaaction
- Returns:
A tuple of expiration epoch (if any), the SuiTransaction and optional Sponsor dataclass
- Return type:
tuple[int, SuiTransaction, Union[deser.SuiGasData, None]]
pysui.sui.sui_pgql.pgql_wallet_deser module
Pysui DeSertializtion from Sui Wallet JSON standard to dataclasses.
- class pysui.sui.sui_pgql.pgql_wallet_deser.SuiObjectCallArg(ref_type: str, object_id: str, digest: str | None = None, version: str | None = None, initial_shared_version: int | None = None, mutable: bool | None = None)
Bases:
objectObject Argument.
- ref_type: str
- object_id: str
- digest: str | None = None
- version: str | None = None
- mutable: bool | None = None
- __init__(ref_type: str, object_id: str, digest: str | None = None, version: str | None = None, initial_shared_version: int | None = None, mutable: bool | 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_wallet_deser.SuiUnresolvedObjectCallArg(object_id: str)
Bases:
objectUnresolved Object Argument.
- object_id: str
- __init__(object_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_wallet_deser.SuiPureCallArg(pure_bytes: str)
Bases:
objectPure Argument.
- pure_bytes: str
- __init__(pure_bytes: 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_wallet_deser.SuiUnresolvedPureCallArg(value: Any)
Bases:
objectUnresolved Pure Argument.
- value: Any
- __init__(value: 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_wallet_deser.SuiGasCoinArg(used: bool | None = True)
Bases:
objectGasCoin as argument.
- used: bool | None = True
- __init__(used: bool | None = True) 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_wallet_deser.SuiCallArgIndex(index: int)
Bases:
objectInput index as argument.
- index: int
- __init__(index: 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_wallet_deser.SuiCmdResultIndex(result: int)
Bases:
objectCommand index as argument.
- result: int
- __init__(result: 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_wallet_deser.SuiCmdNestedResultIndex(nested_result: list[list])
Bases:
objectGasCoin as argument.
- nested_result: list[list]
- __init__(nested_result: list[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_wallet_deser.SuiGasData(budget: str | int | None, owner: str | None, payment: list[dict] | None, price: str | int | None)
Bases:
objectGasData repr.
- budget: str | int | None
- owner: str | None
- payment: list[dict] | None
- price: str | int | None
- __init__(budget: str | int | None, owner: str | None, payment: list[dict] | None, price: str | 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_wallet_deser.SuiMoveCall(package: str, module: str, function: str, arguments: list, type_arguments: list[str], command: str | None = 'MoveCall')
Bases:
objectMoveCall repr.
- package: str
- module: str
- function: str
- arguments: list
- type_arguments: list[str]
- command: str | None = 'MoveCall'
- __init__(package: str, module: str, function: str, arguments: list, type_arguments: list[str], command: str | None = 'MoveCall') 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_wallet_deser.SuiSplitCoins(amounts: list, coin: dict, command: str | None = 'SplitCoins')
Bases:
objectSplitCoins repr.
- amounts: list
- coin: dict
- command: str | None = 'SplitCoins'
- __init__(amounts: list, coin: dict, command: str | None = 'SplitCoins') 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_wallet_deser.SuiTransferObjects(objects: list, address: dict, command: str | None = 'TransferObjects')
Bases:
objectTransferObjects repr.
- objects: list
- address: dict
- command: str | None = 'TransferObjects'
- __init__(objects: list, address: dict, command: str | None = 'TransferObjects') 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_wallet_deser.SuiMergeCoins(sources: list, destination: str | None, command: str | None = 'MergeCoins')
Bases:
objectMergeCoins repr.
- sources: list
- destination: str | None
- command: str | None = 'MergeCoins'
- __init__(sources: list, destination: str | None, command: str | None = 'MergeCoins') 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_wallet_deser.SuiMakeMoveVec(elements: list, vec_type: str | None, command: str | None = 'MakeMoveVec')
Bases:
objectMakeMoveVec repr.
- elements: list
- vec_type: str | None
- command: str | None = 'MakeMoveVec'
- __init__(elements: list, vec_type: str | None, command: str | None = 'MakeMoveVec') 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_wallet_deser.SuiPublish(modules: list[str], dependencies: list[str], command: str | None = 'Publish')
Bases:
objectPublish repr.
- modules: list[str]
- dependencies: list[str]
- command: str | None = 'Publish'
- __init__(modules: list[str], dependencies: list[str], command: str | None = 'Publish') 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_wallet_deser.SuiUpgrade(modules: list[str], dependencies: list[str], package: str, ticket: dict, command: str | None = 'Upgrade')
Bases:
objectUpgrade repr.
- modules: list[str]
- dependencies: list[str]
- package: str
- ticket: dict
- command: str | None = 'Upgrade'
- __init__(modules: list[str], dependencies: list[str], package: str, ticket: dict, command: str | None = 'Upgrade') 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_wallet_deser.SuiIntent(name: str, inputs: list, data: dict)
Bases:
object$Intent repr.
- name: str
- inputs: list
- data: dict
- __init__(name: str, inputs: list, 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_wallet_deser.CommandInputFactory
Bases:
objectProcess Call Arg Inputs.
- classmethod inputs_from_list(input_data: list) list[Any]
Iterate through list and resolve inputs.
- classmethod inputs_from_dict(input_data: dict) Any
Resolve single input.
- class pysui.sui.sui_pgql.pgql_wallet_deser.CallArgFactory
Bases:
objectProcess Call Arg Inputs.
- classmethod callargs_from_list(inputs: list) list[Any]
Iterate through list and resolve call arg structures.
- class pysui.sui.sui_pgql.pgql_wallet_deser.CommandFactory
Bases:
objectProcess Commands.
- classmethod commands_from_list(inputs: list) list[Any]
Iterate through list and resolve command structures.
- class pysui.sui.sui_pgql.pgql_wallet_deser.PysuiData(pysui_version: str, xchng_version: int, sdk_source: str = 'pysui_sdk', creation_date: datetime = datetime.datetime(2024, 7, 18, 9, 2, 28, 224526))
Bases:
objectPysui data for ixchg.
- pysui_version: str
- xchng_version: int
- sdk_source: str = 'pysui_sdk'
- creation_date: datetime = datetime.datetime(2024, 7, 18, 9, 2, 28, 224526)
- __init__(pysui_version: str, xchng_version: int, sdk_source: str = 'pysui_sdk', creation_date: datetime = datetime.datetime(2024, 7, 18, 9, 2, 28, 224526)) 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_wallet_deser.PysuiExtension(pysui: PysuiData)
Bases:
objectPysui extension for ixchg.
- 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_wallet_deser.null_gas_data() SuiGasData
.
- class pysui.sui.sui_pgql.pgql_wallet_deser.SuiBuilder(sender: str | None = None, expiration: str | None = None, version: int = 2, gas_data: ~pysui.sui.sui_pgql.pgql_wallet_deser.SuiGasData | None = <factory>, inputs: list[dict] | None = <factory>, commands: list[dict] | None = <factory>, extensions: dict | None = <factory>)
Bases:
objectSui Transaciton Block Wallet Standard.
- sender: str | None = None
- expiration: str | None = None
- version: int = 2
- gas_data: SuiGasData | None
- inputs: list[dict] | None
- commands: list[dict] | None
- extensions: dict | None
- __init__(sender: str | None = None, expiration: str | None = None, version: int = 2, gas_data: ~pysui.sui.sui_pgql.pgql_wallet_deser.SuiGasData | None = <factory>, inputs: list[dict] | None = <factory>, commands: list[dict] | None = <factory>, extensions: 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
- pysui.sui.sui_pgql.pgql_wallet_deser.deserialize_from_wallet_standard(*, wallet_json: str) SuiBuilder
Deserialize from the Sui Wallet Transaction Standard to dataclasses.
pysui.sui.sui_pgql.pgql_wallet_ser module
Sui Transaction Wallet Standard serialization.
- class pysui.sui.sui_pgql.pgql_wallet_ser.GasData(budget: str | int | None = None, owner: str | None = None, payment: list[dict] | None = None, price: str | int | None = None)
Bases:
DataClassJsonMixinGasData repr.
- budget: str | int | None = None
- owner: str | None = None
- payment: list[dict] | None = None
- price: str | int | None = None
- __init__(budget: str | int | None = None, owner: str | None = None, payment: list[dict] | None = None, price: str | int | None = None) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.OIDStr(objectId: str)
Bases:
objectObject ID for Unresolved Object.
- objectId: str
- __init__(objectId: str) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.PBytes(pbytes: str)
Bases:
objectPure Bytes.
- pbytes: str
- __init__(pbytes: str) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.PValue(value: Any)
Bases:
objectUnresolve Pure Value.
- value: Any
- __init__(value: Any) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.BaseObject(objectId: str, digest: str | None = None, version: str | None = None)
Bases:
objectBase Object Fields.
- objectId: str
- digest: str | None = None
- version: str | None = None
- __init__(objectId: str, digest: str | None = None, version: str | None = None) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.SObject(objectId: str, initialSharedVersion: int | None = None, mutable: bool | None = None)
Bases:
objectShared Object.
- objectId: str
- mutable: bool | None = None
- __init__(objectId: str, initialSharedVersion: int | None = None, mutable: bool | None = None) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.ImmObject(ImmOrOwnedObject: BaseObject)
Bases:
DataClassJsonMixinImmutable or Owned Object.
- ImmOrOwnedObject: BaseObject
- __init__(ImmOrOwnedObject: BaseObject) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.RecievingObject(Receiving: BaseObject)
Bases:
DataClassJsonMixinReceiving Object.
- Receiving: BaseObject
- __init__(Receiving: BaseObject) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.ShrObject(SharedObject: SObject)
Bases:
DataClassJsonMixinShare Object Wrapper.
- class pysui.sui.sui_pgql.pgql_wallet_ser.UnResObj(UnresolvedObject: OIDStr)
Bases:
DataClassJsonMixinUnresolved Object Wrapper.
- class pysui.sui.sui_pgql.pgql_wallet_ser.Object(Object: ImmObject | RecievingObject | ShrObject)
Bases:
DataClassJsonMixinObject.
- Object: ImmObject | RecievingObject | ShrObject
- __init__(Object: ImmObject | RecievingObject | ShrObject) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.PureArg(Pure: PBytes)
Bases:
DataClassJsonMixinPure Argument Wrapper.
- class pysui.sui.sui_pgql.pgql_wallet_ser.UnResPureArg(UnresolvedPureArg: PValue)
Bases:
DataClassJsonMixinUnresolved Pure Argument Wrapper.
- class pysui.sui.sui_pgql.pgql_wallet_ser.CallArg(inputs: list[Object | UnResObj | PureArg | UnResPureArg])
Bases:
DataClassJsonMixinCallArg collection.
- inputs: list[Object | UnResObj | PureArg | UnResPureArg]
- __init__(inputs: list[Object | UnResObj | PureArg | UnResPureArg]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.InputIndex(Input: int)
Bases:
DataClassJsonMixinInput Argument
- Input: int
- __init__(Input: int) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.ResultIndex(Result: int)
Bases:
DataClassJsonMixinInput Argument
- Result: int
- __init__(Result: int) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.NestedResultIndex(NestedResult: list[int, int])
Bases:
DataClassJsonMixinInput Argument
- NestedResult: list[int, int]
- __init__(NestedResult: list[int, int]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.GasUsed(GasCoin: bool)
Bases:
DataClassJsonMixinGasCoin Argument.
- GasCoin: bool
- __init__(GasCoin: bool) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.SplitPayload(coin: GasUsed | InputIndex | ResultIndex | NestedResultIndex, amounts: list[InputIndex | ResultIndex | NestedResultIndex])
Bases:
DataClassJsonMixinSplitCoins.
- coin: GasUsed | InputIndex | ResultIndex | NestedResultIndex
- amounts: list[InputIndex | ResultIndex | NestedResultIndex]
- __init__(coin: GasUsed | InputIndex | ResultIndex | NestedResultIndex, amounts: list[InputIndex | ResultIndex | NestedResultIndex]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.SplitCommand(SplitCoins: SplitPayload)
Bases:
DataClassJsonMixinSplitCoins Command.
- SplitCoins: SplitPayload
- __init__(SplitCoins: SplitPayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MergePayload(destination: InputIndex | ResultIndex | NestedResultIndex, sources: list[InputIndex | ResultIndex | NestedResultIndex])
Bases:
DataClassJsonMixinMergeCoins.
- destination: InputIndex | ResultIndex | NestedResultIndex
- sources: list[InputIndex | ResultIndex | NestedResultIndex]
- __init__(destination: InputIndex | ResultIndex | NestedResultIndex, sources: list[InputIndex | ResultIndex | NestedResultIndex]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MergeCommand(MergeCoins: MergePayload)
Bases:
DataClassJsonMixinMergeCoins Command.
- MergeCoins: MergePayload
- __init__(MergeCoins: MergePayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.TransferPayload(address: InputIndex | ResultIndex | NestedResultIndex, objects: list[InputIndex | ResultIndex | NestedResultIndex])
Bases:
DataClassJsonMixinTransferObjects.
- address: InputIndex | ResultIndex | NestedResultIndex
- objects: list[InputIndex | ResultIndex | NestedResultIndex]
- __init__(address: InputIndex | ResultIndex | NestedResultIndex, objects: list[InputIndex | ResultIndex | NestedResultIndex]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.TransferCommand(TransferObjects: TransferPayload)
Bases:
DataClassJsonMixinTransferObjects Command.
- TransferObjects: TransferPayload
- __init__(TransferObjects: TransferPayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MakeVecPayload(elements: list[InputIndex | ResultIndex | NestedResultIndex], etype: list[str])
Bases:
DataClassJsonMixinMakeMoveVec.
- elements: list[InputIndex | ResultIndex | NestedResultIndex]
- etype: list[str]
- __init__(elements: list[InputIndex | ResultIndex | NestedResultIndex], etype: list[str]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MakeVecCommand(MakeMoveVec: MakeVecPayload)
Bases:
DataClassJsonMixinMakeMoveVec Command.
- MakeMoveVec: MakeVecPayload
- __init__(MakeMoveVec: MakeVecPayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.PublishPayload(modules: list[str], dependencies: list[str])
Bases:
DataClassJsonMixinPublish.
- modules: list[str]
- dependencies: list[str]
- __init__(modules: list[str], dependencies: list[str]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.PublishCommand(Publish: PublishPayload)
Bases:
DataClassJsonMixinPublish Command.
- Publish: PublishPayload
- __init__(Publish: PublishPayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.UpgradePayload(package: str, ticket: InputIndex | ResultIndex | NestedResultIndex, modules: list[str], dependencies: list[str])
Bases:
DataClassJsonMixinUpgrade.
- package: str
- ticket: InputIndex | ResultIndex | NestedResultIndex
- modules: list[str]
- dependencies: list[str]
- __init__(package: str, ticket: InputIndex | ResultIndex | NestedResultIndex, modules: list[str], dependencies: list[str]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.UpgradeCommand(Upgrade: UpgradePayload)
Bases:
DataClassJsonMixinUpgrade Command.
- Upgrade: UpgradePayload
- __init__(Upgrade: UpgradePayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MovePayload(package: str, module: str, function: str, arguments: list[InputIndex | ResultIndex | NestedResultIndex], typeArguments: list[str])
Bases:
DataClassJsonMixinMoveCall.
- package: str
- module: str
- function: str
- arguments: list[InputIndex | ResultIndex | NestedResultIndex]
- typeArguments: list[str]
- __init__(package: str, module: str, function: str, arguments: list[InputIndex | ResultIndex | NestedResultIndex], typeArguments: list[str]) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.MoveCallCommand(MoveCall: MovePayload)
Bases:
DataClassJsonMixinMoveCall Command.
- MoveCall: MovePayload
- __init__(MoveCall: MovePayload) None
- class pysui.sui.sui_pgql.pgql_wallet_ser.Command(commands: list[MoveCallCommand | SplitCommand | MergeCommand | TransferCommand | MakeVecCommand | PublishCommand | UpgradeCommand])
Bases:
DataClassJsonMixinCommand collection.
- commands: list[MoveCallCommand | SplitCommand | MergeCommand | TransferCommand | MakeVecCommand | PublishCommand | UpgradeCommand]
- __init__(commands: list[MoveCallCommand | SplitCommand | MergeCommand | TransferCommand | MakeVecCommand | PublishCommand | UpgradeCommand]) None
- pysui.sui.sui_pgql.pgql_wallet_ser.serialize_to_wallet_standard(*, transaction: SuiTransaction, **kwargs) str
Serialize pysui transaction to Sui wallet standard JSON.
- Keyword arguments:
json_indent [int]: JSON indentation level, defaults to 2
unrealize_objs [bool]: Only includes object IDs in inputs and not object references
include_sender [bool]: Includes the transaction sender address in output
epoch_expiration [int]: Specify the transaction expiration epoch
gas_data [dict]: Specify transaction gas payment options…
budget [str, int]: Specify the transaction budget, defaults to None
owner [str]: Specifies the owner address paying for the transaction, defaults to None
price [str, int]: Specify the gas cost, defaults to None
payment list[dict]: A list of one or more object references, defaults to None
- Parameters:
transaction (SuiTransaction) – Transaction to serialize
**kwargs (dict)
- Returns:
JSON representation of transactiom
- Return type:
str
Module contents
Pysui Sui GraphQL RPC Package.