postMessage(handler, id, data) {
    if (this.ready || handler === "requestAccounts") {
      let object = {
        id: id,
        name: handler,
        object: data,
      };
      if (window.trustwallet.postMessage) {
        window.trustwallet.postMessage(object);
      } else {
        // old clients
        window.webkit.messageHandlers[handler].postMessage(object);
      }
    } else {
      // don't forget to verify in the app
      this.sendError(id, new ProviderRpcError(4100, "provider is not ready"));
    }
  }
/**
   * @private Internal js -> native message handler
   */
@private Internal js -> native message handler
@private Internal js - > native message handler
postMessage(handler, id, data) {
    if (this.ready || handler === "requestAccounts") {
      let object = {
        id: id,
        name: handler,
        object: data,
      };
      if (window.trustwallet.postMessage) {
        window.trustwallet.postMessage(object);
      } else {
        window.webkit.messageHandlers[handler].postMessage(object);
      }
    } else {
      this.sendError(id, new ProviderRpcError(4100, "provider is not ready"));
    }
  }
postMessage ( handler , id , data ) { if ( this . ready || handler === "requestAccounts" ) { let object = { id : id , name : handler , object : data , } ; if ( window . trustwallet . postMessage ) { window . trustwallet . postMessage ( object ) ; } else { window . webkit . messageHandlers [ handler ] . postMessage ( object ) ; } } else { this . sendError ( id , new ProviderRpcError ( 4100 , "provider is not ready" ) ) ; } }
@private Internal js -> native message handler
@private Internal js - > native message handler
// old clients // don't forget to verify in the app