dysnomia_contract_presets

Pinned, inert Dysnomia contract presets for GOCK private intent cards.

The data in this module was transcribed from one immutable Git snapshot of the local dysnomia-ai-core reference repository. It is deliberately not an execution layer: there is no provider, signer, key custody, approval policy, transaction submission, or network access here.

Callers may use build_private_intent_arguments() to construct arguments for Stargazer’s existing private, unsigned PulseChain intent path. The existing server-side ABI validation, simulation, session binding, and explicit browser-wallet confirmation remain authoritative.

class dysnomia_contract_presets.AbiParameter(name, canonical_type, description='')

Bases: object

Minimal ABI parameter metadata for one preset argument or return value.

Parameters:
  • name (str)

  • canonical_type (str)

  • description (str)

name: str
canonical_type: str
description: str
as_abi()
Return type:

dict[str, str]

class dysnomia_contract_presets.CatalogPolicy(chain_id=369, network_access=False, selects_rpc_endpoint=False, holds_private_keys=False, signs_transactions=False, sends_transactions=False, auto_approves=False, permits_unbounded_allowance=False, requires_explicit_wallet_confirmation=True, requires_live_contract_verification=True, requires_simulation_before_wallet=True)

Bases: object

Explicit negative capabilities of this data-only catalog.

Parameters:
  • chain_id (int)

  • network_access (bool)

  • selects_rpc_endpoint (bool)

  • holds_private_keys (bool)

  • signs_transactions (bool)

  • sends_transactions (bool)

  • auto_approves (bool)

  • permits_unbounded_allowance (bool)

  • requires_explicit_wallet_confirmation (bool)

  • requires_live_contract_verification (bool)

  • requires_simulation_before_wallet (bool)

chain_id: int
network_access: bool
selects_rpc_endpoint: bool
holds_private_keys: bool
signs_transactions: bool
sends_transactions: bool
auto_approves: bool
permits_unbounded_allowance: bool
requires_explicit_wallet_confirmation: bool
requires_live_contract_verification: bool
requires_simulation_before_wallet: bool
class dysnomia_contract_presets.ContractActionPreset(key, source_action, entity, description, intent_action, target_kind, target_role, function_signature, state_mutability, inputs=(), outputs=(), prerequisites=(), prerequisite_actions=(), risk_flags=(), source_refs=())

Bases: object

One read, write, or deployment proposal; never an executable action.

Parameters:
key: str
source_action: str
entity: str
description: str
intent_action: Literal['inspect', 'write', 'deploy']
target_kind: Literal['fixed', 'dynamic', 'deployment']
target_role: str
function_signature: str
state_mutability: str
inputs: tuple[AbiParameter, ...]
outputs: tuple[AbiParameter, ...]
prerequisites: tuple[str, ...]
prerequisite_actions: tuple[str, ...]
risk_flags: tuple[str, ...]
source_refs: tuple[SourceRef, ...]
property contract_address: str | None
abi_entry()
Return type:

dict[str, Any]

provenance()
Return type:

dict[str, Any]

class dysnomia_contract_presets.DssArtifactMetadata(constructor_signature, creation_bytecode_sha256, creation_bytecode_bytes, bytecode_source, abi_source, creation_bytecode_included=False)

Bases: object

Pinned metadata for the referenced DSS artifact; bytecode is not executed.

Parameters:
  • constructor_signature (str)

  • creation_bytecode_sha256 (str)

  • creation_bytecode_bytes (int)

  • bytecode_source (SourceRef)

  • abi_source (SourceRef)

  • creation_bytecode_included (bool)

constructor_signature: str
creation_bytecode_sha256: str
creation_bytecode_bytes: int
bytecode_source: SourceRef
abi_source: SourceRef
creation_bytecode_included: bool
class dysnomia_contract_presets.PinnedAddress(role, address, description, source)

Bases: object

A reference address that must still be verified against live chain 369.

Parameters:
role: str
address: str
description: str
source: SourceRef
class dysnomia_contract_presets.SourceRef(path, start_line, end_line)

Bases: object

A precise repository-relative citation into the pinned source commit.

Parameters:
path: str
start_line: int
end_line: int
as_dict()
Return type:

dict[str, Any]

class dysnomia_contract_presets.WorkflowPreset(key, description, steps, prerequisites, warnings, source_refs)

Bases: object

Ordered reference workflow composed solely of catalog action keys.

Parameters:
key: str
description: str
steps: tuple[str, ...]
prerequisites: tuple[str, ...]
warnings: tuple[str, ...]
source_refs: tuple[SourceRef, ...]
dysnomia_contract_presets.action_abi(key)

Build a fresh minimal ABI for one action.

DSS presets receive the pinned DSS constructor/functions/errors so an unverified participant deployment still has exact local interface metadata. Other actions receive only their exact function entry.

Return type:

list[dict[str, Any]]

Parameters:

key (str)

dysnomia_contract_presets.action_context(key)

Return serializable doctrine/provenance for prompts or private cards.

Return type:

dict[str, Any]

Parameters:

key (str)

dysnomia_contract_presets.build_private_intent_arguments(key, *, arguments=(), target_address=None, creation_bytecode=None)

Build pure arguments for Stargazer’s existing private-intent tool.

This helper does not create an intent, access a session, simulate, sign, or send anything. Dynamic targets and address arguments must already be explicit addresses; the existing server remains responsible for complete ABI normalization and all authorization checks.

Return type:

dict[str, Any]

Parameters:
dysnomia_contract_presets.get_action_preset(key)

Return one immutable preset by exact key.

Return type:

ContractActionPreset

Parameters:

key (str)

dysnomia_contract_presets.list_action_presets(*, entity=None, intent_action=None)

List catalog entries with optional, deterministic filtering.

Return type:

tuple[ContractActionPreset, ...]

Parameters:
  • entity (str | None)

  • intent_action (Literal['inspect', 'write', 'deploy'] | None)

dysnomia_contract_presets.resolve_preset_target(key, target_address=None)

Resolve a fixed/dynamic target without consulting a model or network.

Return type:

str

Parameters:
  • key (str)

  • target_address (str | None)

dysnomia_contract_presets.validate_pinned_dss_bytecode(value)

Normalize DSS creation bytecode and require the pinned artifact digest.

Return type:

str

Parameters:

value (Any)