Skip to content

Conversation

@spacesops
Copy link

Adds an optional --data parameter to createptr to allow initial setting of the "data" field with arbitrary hex data.

The hex data can contain multiple items, parsed by schema as implemented in the spaces-hex-tool.

Also adds a getallptrs command to return all ptrs on the chain and decode the available data by schema.

Also adds a listallspaces command to return all spaces on the chain in an owned state with optional --with-data param to limited those returned having non-null "data".

@buffrr buffrr changed the base branch from main to subspaces December 4, 2025 10:46
spacesops and others added 15 commits December 4, 2025 10:03
- Add parse_space_for_json to parse covenant data into records format (like getallptrs)
- Fix authorize command to properly parse @space names using from_str_unprefixed
- Add --memo option to send command with OP_RETURN output (max 80 chars, hex-encoded)
- Add --with-memos flag to listtransactions to display decoded memo text from OP_RETURN outputs
- Fix ResolvableTarget parsing to use from_str_unprefixed for space names
Fix data inconsistency in RevokeReason::Expired handling that caused
panics when querying spaces that were revoked due to expiration.

Root cause: Expired revocations only removed Outpoint->Spaceout mapping
but left Space->Outpoint mapping, creating inconsistent state.

Changes:
- Remove Space->Outpoint mapping in Expired revocation handler
- Handle inconsistencies gracefully in get_space_info by returning None
  and cleaning up orphaned Space->Outpoint mappings instead of panicking
Fix data inconsistency handling in prepare_open that caused panics
when opening spaces that were revoked due to expiration.

Root cause: When an outpoint exists but spaceout doesn't (due to
inconsistent state from Expired revocations), the code would panic
with 'spaceout exists' instead of handling it gracefully.

Changes:
- Replace expect() with match statement to handle None case
- Treat missing spaceout as new space (space was revoked, so it's
  effectively not registered anymore)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants