Rekeying an address back to itself?

Hi,

I was wondering if there is a better way of re-rekeying an address back to itself than the following.

I’m using a rekey transaction like: { from: my-address, rekey-to: my-address }

This goes through just fine and it does work on the network level but Pera wallet has a bug which disables the account until it is removed and re-added (it sends null bytes when you sign a transaction).

I will also open a bug on pera wallet’s github, but in the meantime is there a different way to undo rekeying other than this? I tried rekey-to: "" and rekey-to: null but my algosdk refuses to sign an invalid address.

https://www.a-wallet.net/ supports even rekeying of multisig accounts

in technical terms { from: my-address, rekey-to: my-address } is the only solution where you sign with the rekeyd address

Yes, you must be explicit with the rekey-to, rather than set it to null, because there’s no encoding of a null value at the txn msgpack level. The closest thing is simply not setting a field. But if you don’t set it, you don’t rekey it, which was your original intent!

1 Like