hint-network-availability.rst (1015B)
1 .. ts:op:: hintNetworkAvailability 2 3 Inform wallet-core about the host system's network connectivity. 4 5 **Request:** 6 7 The request ``args`` must be a `HintNetworkAvailabilityRequest` object. 8 9 **Response:** 10 11 On success, the result is an empty object. 12 13 **Side effects:** 14 15 Records the host's network state; on change, background tasks are 16 woken up and may start network activity. 17 18 **Details:** 19 20 When the reported availability changes, wallet-core restarts all 21 running background tasks: tasks that are blocked waiting for the 22 network resume when connectivity is back, and tasks notice the outage 23 and wait when it goes away. Reporting the already known state has no 24 effect. Network availability defaults to available, so clients that 25 never send this hint do not block background network activity. 26 27 .. ts:def:: HintNetworkAvailabilityRequest 28 29 interface HintNetworkAvailabilityRequest { 30 // Whether the host system currently has network connectivity. 31 isNetworkAvailable: boolean; 32 }