How to register account offline with typescript?

Hi,

I’m using algosdk to register account offline. makeKeyRegistrationTxn function describe:

* @param voteKey - voting key. for key deregistration, leave undefined
* @param selectionKey - selection key. for key deregistration, leave undefined
* @param voteFirst - first round on which voteKey is valid
* @param voteLast - last round on which voteKey is valid
* @param voteKeyDilution - integer
* @param stateProofKey - state proof key. for key deregistration, leave undefined

But voteKey, selectionKey, stateProofKey define as string so i can not pass undefined type into these variable. A question is how can i register account offline with typescript?

Thanks,

Have you tried the object version?

I often strongly recommend to use the object version as it increases significantly the readability of the code.

See js-algorand-sdk/5.Transaction.js at 7c5334552d1cb3300f8904ed614dcc7ed1c384ff · algorand/js-algorand-sdk · GitHub