Reacquiring opened Channel object reference

Hi guys.

I am with the following situation where the Channel object I get from the Channel (...) constructor is lost when user e.g refreshes an application page. I know that current state can be persisted by saving what state() call returns. I would like to re acquire the same object for this already opened channel providing channel-id and state. Is this possible? It’s critical for transparent application reload/refresh.

Thanks.

Suppose in pseudo:

newChannel = await Channel ( ... ) ;

await Channel_is_open(); 

/* channel operations here 
...
...
*/

newChannel = null;  /* reference lost  */

/* Want to reconnect */

newChannel = Channel (  channel-id,  last_state ) 

await Channel_is_Open();

/* continue operations ... */

Thanks.

See: https://github.com/aeternity/aepp-sdk-js/issues/651 for the related entry.