gock_contract_intents

Private, expiring PulseChain contract-intent records for GOCK chat.

The model never receives a private route identifier and cannot choose a target wallet or browser session. A contract tool may only resolve the server-owned origin binding for the authenticated message that invoked it.

gock_contract_intents.new_private_route_id()

Return an unguessable login-session route secret.

Return type:

str

gock_contract_intents.contract_route_hash(private_route_id)

Derive a non-secret Redis routing identifier from a session secret.

Return type:

str

Parameters:

private_route_id (Any)

gock_contract_intents.normalize_route_hash(value)
Return type:

str

Parameters:

value (Any)

gock_contract_intents.private_contract_channel(route_hash)
Return type:

str

Parameters:

route_hash (Any)

gock_contract_intents.contract_origin_key(principal_id, message_id)
Return type:

str

Parameters:
  • principal_id (Any)

  • message_id (Any)

gock_contract_intents.new_contract_intent_id()
Return type:

str

gock_contract_intents.normalize_intent_id(value)
Return type:

str

Parameters:

value (Any)

gock_contract_intents.contract_intent_key(intent_id)
Return type:

str

Parameters:

intent_id (Any)

gock_contract_intents.contract_pending_key(route_hash)
Return type:

str

Parameters:

route_hash (Any)

gock_contract_intents.contract_lease_key(intent_id)
Return type:

str

Parameters:

intent_id (Any)

gock_contract_intents.contract_submission_key(intent_id)
Return type:

str

Parameters:

intent_id (Any)

gock_contract_intents.encode_record(record)
Return type:

str

Parameters:

record (dict[str, Any])

gock_contract_intents.decode_record(raw)
Return type:

dict[str, Any] | None

Parameters:

raw (Any)

gock_contract_intents.build_contract_origin(*, route_hash, principal_id, wallet, room, message_id, origin_kind='assistant', artifact_sha256=None, now=None)
Return type:

dict[str, Any]

Parameters:
  • route_hash (Any)

  • principal_id (Any)

  • wallet (Any)

  • room (Any)

  • message_id (Any)

  • origin_kind (Any)

  • artifact_sha256 (list[str] | None)

  • now (float | None)

gock_contract_intents.normalize_value_wei(value)
Return type:

str

Parameters:

value (Any)

gock_contract_intents.normalize_deploy_bytecode(value)
Return type:

str

Parameters:

value (Any)

gock_contract_intents.deploy_bytecode_sha256(value)
Return type:

str

Parameters:

value (Any)

gock_contract_intents.extract_chat_artifact_hashes(value)

Hash bounded 0x bytecode blobs explicitly pasted into a chat message.

Return type:

list[str]

Parameters:

value (Any)

gock_contract_intents.build_contract_intent(*, origin, action, resolved_contract, title='', explanation='', selected_function_signature='', selected_arguments=None, value_wei='0', bytecode='', risk_flags=None, now=None)

Build the canonical persisted form of a private unsigned intent.

Return type:

dict[str, Any]

Parameters:
gock_contract_intents.validate_contract_origin(record, *, principal_id, message_id, now=None)
Return type:

dict[str, Any]

Parameters:
async gock_contract_intents.store_contract_origin(redis, record)
Return type:

None

Parameters:
async gock_contract_intents.load_contract_origin(redis, *, principal_id, message_id)
Return type:

dict[str, Any]

Parameters:
  • redis (Any)

  • principal_id (Any)

  • message_id (Any)

async gock_contract_intents.store_contract_intent(redis, record)

Persist an intent and index it for private reconnect delivery.

Return type:

None

Parameters:
async gock_contract_intents.load_contract_intent(redis, intent_id)
Return type:

dict[str, Any]

Parameters:
async gock_contract_intents.pending_contract_intents(redis, *, route_hash, now=None)

Return live intents for one session route and prune stale index rows.

Return type:

list[dict[str, Any]]

Parameters:
gock_contract_intents.public_contract_intent(record)

Return the browser-safe portion of an intent (never its route secret).

Return type:

dict[str, Any]

Parameters:

record (dict[str, Any])

gock_contract_intents.contract_card_frame(record, *, replay=False)
Return type:

dict[str, Any]

Parameters: