Skip to content

Add PSKT & PSKB functionality#3

Draft
smartgoo wants to merge 16 commits intokaspanet:mainfrom
smartgoo:pskt
Draft

Add PSKT & PSKB functionality#3
smartgoo wants to merge 16 commits intokaspanet:mainfrom
smartgoo:pskt

Conversation

@smartgoo
Copy link
Collaborator

  • Add PSKT & PSKB
  • Introduce submodule exceptions where custom exceptions are located (e.g. from kaspa.exceptions import PsktError)
  • Declarative macro for custom exception creation

@smartgoo
Copy link
Collaborator Author

Blocked by inability to create some consensus client objects from a dictionary. Which was added in #4 and refined in #16. Should be able to pick back up, see what else comes up.

@smartgoo
Copy link
Collaborator Author

smartgoo commented Feb 2, 2026

Pausing work on this as it's a niche feature and higher effort than anticipated.

Current status of this PR:

  • PSKT exposed to Python with same methods as WASM SDK.
  • Added exceptions submodule and custom PSKT-related exceptions. Custom exceptions submodule may be pulled out and added to a separate PR.
  • Simple multisig PSKT example work in progress. Hung up at how to sign and then pass to other signers.

Current known blockers/challenges to overcome:

  • Could not find PSKT examples using WASM SDK
  • Limited Rust examples
  • Rust PSKT struct has methods pass_signature_sync() and pass_signature() which appears to store signatures in partial_sigs field of on PSKT Input struct. However these are not exposed to WASM SDK, and there are no other signer related methods exposed to WASM SDK. So not sure how to sign properly.
  • Native Input and InputBuilder are not exposed to WASM SDK, marked as TODO.
  • Does not seem like no_more_outputs() and no_more_inputs() exposed to Python works properly.

TODOs when ready to pick back up:

  • Consider contributing to rusty-kaspa to bring full functionality to WASM SDK.
  • Figure out how to sign in manner that serialized PSKT can be passed including partial signatures.
  • Finish process from there (combine, finalize, submit, etc).
  • Create from Transaction object.
  • Doc comments on methods epxosed to Python.
  • Docs guide.
  • PSKB

@smartgoo smartgoo marked this pull request as draft February 2, 2026 21:19
@IzioDev
Copy link

IzioDev commented Feb 12, 2026

Hey @smartgoo

You're hitting the right spot here, WASM is missing crucial APIs to expose this set of (well needed) features.
There is a pending PR, in which I am the bottleneck (because I took other more prioritized tasks): kaspanet/rusty-kaspa#770

This one should partially unlock the Python SDK.

@smartgoo
Copy link
Collaborator Author

@IzioDev Thanks! I will keep an eye on that PR.

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.

2 participants