Skip to content

Conversation

@joyqvq
Copy link

@joyqvq joyqvq commented Dec 15, 2025

sui-sdk-types::UserSignature cannot deserialize from base64 string format, breaking compatibility with Sui's GenericSignature format https://github.com/MystenLabs/sui/blob/main/crates/sui-types/src/signature.rs#L304

e.g. client sends
{
"user": "0x123",
"signature": "ANp47jDZQszLl6ocHM..." // base64 encoded user sig
}

without the fix deser fails - UserSignature only accepts structured json like:
{
"signature": {
"scheme": "ed25519",
"signature": "2njuMNlCzMuXqhwcz9...",
"public_key": "DX2rNYyNrapO+gBJp..."
}
}

this change fixes it by accept both formats using an untagged enum, test added! (otherwise i had to implement a workaround: https://github.com/MystenLabs/seal/pull/412/changes#diff-7e3a1314e53d356a05b0214b65850dd9de61b41131fc5d4e3076fed0c3d450d4R55)

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.

1 participant