github.com/primecitizens/pcz/std@v0.2.1/plat/js/webext/webauthenticationproxy/bindings/ffi_bindings.ts (about)

     1  import { importModule, Application, heap, Pointer } from "@ffi";
     2  
     3  importModule("plat/js/webext/webauthenticationproxy", (A: Application) => {
     4    const WEBEXT = typeof globalThis.browser === "undefined" ? globalThis.chrome : globalThis.browser;
     5  
     6    return {
     7      "store_CreateRequest": (ptr: Pointer, ref: heap.Ref<any>) => {
     8        const x = A.H.get<any>(ref);
     9  
    10        if (typeof x === "undefined") {
    11          A.store.Bool(ptr + 9, false);
    12          A.store.Bool(ptr + 8, false);
    13          A.store.Int32(ptr + 0, 0);
    14          A.store.Ref(ptr + 4, undefined);
    15        } else {
    16          A.store.Bool(ptr + 9, true);
    17          A.store.Bool(ptr + 8, "requestId" in x ? true : false);
    18          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
    19          A.store.Ref(ptr + 4, x["requestDetailsJson"]);
    20        }
    21      },
    22      "load_CreateRequest": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    23        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    24  
    25        if (A.load.Bool(ptr + 8)) {
    26          x["requestId"] = A.load.Int32(ptr + 0);
    27        } else {
    28          delete x["requestId"];
    29        }
    30        x["requestDetailsJson"] = A.load.Ref(ptr + 4, undefined);
    31        return create === A.H.TRUE ? A.H.push(x) : ref;
    32      },
    33  
    34      "store_DOMExceptionDetails": (ptr: Pointer, ref: heap.Ref<any>) => {
    35        const x = A.H.get<any>(ref);
    36  
    37        if (typeof x === "undefined") {
    38          A.store.Bool(ptr + 8, false);
    39          A.store.Ref(ptr + 0, undefined);
    40          A.store.Ref(ptr + 4, undefined);
    41        } else {
    42          A.store.Bool(ptr + 8, true);
    43          A.store.Ref(ptr + 0, x["name"]);
    44          A.store.Ref(ptr + 4, x["message"]);
    45        }
    46      },
    47      "load_DOMExceptionDetails": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    48        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    49  
    50        x["name"] = A.load.Ref(ptr + 0, undefined);
    51        x["message"] = A.load.Ref(ptr + 4, undefined);
    52        return create === A.H.TRUE ? A.H.push(x) : ref;
    53      },
    54  
    55      "store_CreateResponseDetails": (ptr: Pointer, ref: heap.Ref<any>) => {
    56        const x = A.H.get<any>(ref);
    57  
    58        if (typeof x === "undefined") {
    59          A.store.Bool(ptr + 21, false);
    60          A.store.Bool(ptr + 20, false);
    61          A.store.Int32(ptr + 0, 0);
    62  
    63          A.store.Bool(ptr + 4 + 8, false);
    64          A.store.Ref(ptr + 4 + 0, undefined);
    65          A.store.Ref(ptr + 4 + 4, undefined);
    66          A.store.Ref(ptr + 16, undefined);
    67        } else {
    68          A.store.Bool(ptr + 21, true);
    69          A.store.Bool(ptr + 20, "requestId" in x ? true : false);
    70          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
    71  
    72          if (typeof x["error"] === "undefined") {
    73            A.store.Bool(ptr + 4 + 8, false);
    74            A.store.Ref(ptr + 4 + 0, undefined);
    75            A.store.Ref(ptr + 4 + 4, undefined);
    76          } else {
    77            A.store.Bool(ptr + 4 + 8, true);
    78            A.store.Ref(ptr + 4 + 0, x["error"]["name"]);
    79            A.store.Ref(ptr + 4 + 4, x["error"]["message"]);
    80          }
    81          A.store.Ref(ptr + 16, x["responseJson"]);
    82        }
    83      },
    84      "load_CreateResponseDetails": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
    85        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
    86  
    87        if (A.load.Bool(ptr + 20)) {
    88          x["requestId"] = A.load.Int32(ptr + 0);
    89        } else {
    90          delete x["requestId"];
    91        }
    92        if (A.load.Bool(ptr + 4 + 8)) {
    93          x["error"] = {};
    94          x["error"]["name"] = A.load.Ref(ptr + 4 + 0, undefined);
    95          x["error"]["message"] = A.load.Ref(ptr + 4 + 4, undefined);
    96        } else {
    97          delete x["error"];
    98        }
    99        x["responseJson"] = A.load.Ref(ptr + 16, undefined);
   100        return create === A.H.TRUE ? A.H.push(x) : ref;
   101      },
   102  
   103      "store_GetRequest": (ptr: Pointer, ref: heap.Ref<any>) => {
   104        const x = A.H.get<any>(ref);
   105  
   106        if (typeof x === "undefined") {
   107          A.store.Bool(ptr + 9, false);
   108          A.store.Bool(ptr + 8, false);
   109          A.store.Int32(ptr + 0, 0);
   110          A.store.Ref(ptr + 4, undefined);
   111        } else {
   112          A.store.Bool(ptr + 9, true);
   113          A.store.Bool(ptr + 8, "requestId" in x ? true : false);
   114          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
   115          A.store.Ref(ptr + 4, x["requestDetailsJson"]);
   116        }
   117      },
   118      "load_GetRequest": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   119        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   120  
   121        if (A.load.Bool(ptr + 8)) {
   122          x["requestId"] = A.load.Int32(ptr + 0);
   123        } else {
   124          delete x["requestId"];
   125        }
   126        x["requestDetailsJson"] = A.load.Ref(ptr + 4, undefined);
   127        return create === A.H.TRUE ? A.H.push(x) : ref;
   128      },
   129  
   130      "store_GetResponseDetails": (ptr: Pointer, ref: heap.Ref<any>) => {
   131        const x = A.H.get<any>(ref);
   132  
   133        if (typeof x === "undefined") {
   134          A.store.Bool(ptr + 21, false);
   135          A.store.Bool(ptr + 20, false);
   136          A.store.Int32(ptr + 0, 0);
   137  
   138          A.store.Bool(ptr + 4 + 8, false);
   139          A.store.Ref(ptr + 4 + 0, undefined);
   140          A.store.Ref(ptr + 4 + 4, undefined);
   141          A.store.Ref(ptr + 16, undefined);
   142        } else {
   143          A.store.Bool(ptr + 21, true);
   144          A.store.Bool(ptr + 20, "requestId" in x ? true : false);
   145          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
   146  
   147          if (typeof x["error"] === "undefined") {
   148            A.store.Bool(ptr + 4 + 8, false);
   149            A.store.Ref(ptr + 4 + 0, undefined);
   150            A.store.Ref(ptr + 4 + 4, undefined);
   151          } else {
   152            A.store.Bool(ptr + 4 + 8, true);
   153            A.store.Ref(ptr + 4 + 0, x["error"]["name"]);
   154            A.store.Ref(ptr + 4 + 4, x["error"]["message"]);
   155          }
   156          A.store.Ref(ptr + 16, x["responseJson"]);
   157        }
   158      },
   159      "load_GetResponseDetails": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   160        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   161  
   162        if (A.load.Bool(ptr + 20)) {
   163          x["requestId"] = A.load.Int32(ptr + 0);
   164        } else {
   165          delete x["requestId"];
   166        }
   167        if (A.load.Bool(ptr + 4 + 8)) {
   168          x["error"] = {};
   169          x["error"]["name"] = A.load.Ref(ptr + 4 + 0, undefined);
   170          x["error"]["message"] = A.load.Ref(ptr + 4 + 4, undefined);
   171        } else {
   172          delete x["error"];
   173        }
   174        x["responseJson"] = A.load.Ref(ptr + 16, undefined);
   175        return create === A.H.TRUE ? A.H.push(x) : ref;
   176      },
   177  
   178      "store_IsUvpaaRequest": (ptr: Pointer, ref: heap.Ref<any>) => {
   179        const x = A.H.get<any>(ref);
   180  
   181        if (typeof x === "undefined") {
   182          A.store.Bool(ptr + 5, false);
   183          A.store.Bool(ptr + 4, false);
   184          A.store.Int32(ptr + 0, 0);
   185        } else {
   186          A.store.Bool(ptr + 5, true);
   187          A.store.Bool(ptr + 4, "requestId" in x ? true : false);
   188          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
   189        }
   190      },
   191      "load_IsUvpaaRequest": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   192        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   193  
   194        if (A.load.Bool(ptr + 4)) {
   195          x["requestId"] = A.load.Int32(ptr + 0);
   196        } else {
   197          delete x["requestId"];
   198        }
   199        return create === A.H.TRUE ? A.H.push(x) : ref;
   200      },
   201  
   202      "store_IsUvpaaResponseDetails": (ptr: Pointer, ref: heap.Ref<any>) => {
   203        const x = A.H.get<any>(ref);
   204  
   205        if (typeof x === "undefined") {
   206          A.store.Bool(ptr + 7, false);
   207          A.store.Bool(ptr + 5, false);
   208          A.store.Int32(ptr + 0, 0);
   209          A.store.Bool(ptr + 6, false);
   210          A.store.Bool(ptr + 4, false);
   211        } else {
   212          A.store.Bool(ptr + 7, true);
   213          A.store.Bool(ptr + 5, "requestId" in x ? true : false);
   214          A.store.Int32(ptr + 0, x["requestId"] === undefined ? 0 : (x["requestId"] as number));
   215          A.store.Bool(ptr + 6, "isUvpaa" in x ? true : false);
   216          A.store.Bool(ptr + 4, x["isUvpaa"] ? true : false);
   217        }
   218      },
   219      "load_IsUvpaaResponseDetails": (ptr: Pointer, create: heap.Ref<boolean>, ref: heap.Ref<any>): heap.Ref<any> => {
   220        const x = create === A.H.TRUE ? {} : A.H.get<any>(ref);
   221  
   222        if (A.load.Bool(ptr + 5)) {
   223          x["requestId"] = A.load.Int32(ptr + 0);
   224        } else {
   225          delete x["requestId"];
   226        }
   227        if (A.load.Bool(ptr + 6)) {
   228          x["isUvpaa"] = A.load.Bool(ptr + 4);
   229        } else {
   230          delete x["isUvpaa"];
   231        }
   232        return create === A.H.TRUE ? A.H.push(x) : ref;
   233      },
   234      "has_Attach": (): heap.Ref<boolean> => {
   235        if (WEBEXT?.webAuthenticationProxy && "attach" in WEBEXT?.webAuthenticationProxy) {
   236          return A.H.TRUE;
   237        }
   238        return A.H.FALSE;
   239      },
   240      "func_Attach": (fn: Pointer): void => {
   241        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.attach);
   242      },
   243      "call_Attach": (retPtr: Pointer): void => {
   244        const _ret = WEBEXT.webAuthenticationProxy.attach();
   245        A.store.Ref(retPtr, _ret);
   246      },
   247      "try_Attach": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   248        try {
   249          const _ret = WEBEXT.webAuthenticationProxy.attach();
   250          A.store.Ref(retPtr, _ret);
   251          return A.H.TRUE;
   252        } catch (err: any) {
   253          A.store.Ref(errPtr, err);
   254          return A.H.FALSE;
   255        }
   256      },
   257      "has_CompleteCreateRequest": (): heap.Ref<boolean> => {
   258        if (WEBEXT?.webAuthenticationProxy && "completeCreateRequest" in WEBEXT?.webAuthenticationProxy) {
   259          return A.H.TRUE;
   260        }
   261        return A.H.FALSE;
   262      },
   263      "func_CompleteCreateRequest": (fn: Pointer): void => {
   264        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.completeCreateRequest);
   265      },
   266      "call_CompleteCreateRequest": (retPtr: Pointer, details: Pointer): void => {
   267        const details_ffi = {};
   268  
   269        if (A.load.Bool(details + 20)) {
   270          details_ffi["requestId"] = A.load.Int32(details + 0);
   271        }
   272        if (A.load.Bool(details + 4 + 8)) {
   273          details_ffi["error"] = {};
   274          details_ffi["error"]["name"] = A.load.Ref(details + 4 + 0, undefined);
   275          details_ffi["error"]["message"] = A.load.Ref(details + 4 + 4, undefined);
   276        }
   277        details_ffi["responseJson"] = A.load.Ref(details + 16, undefined);
   278  
   279        const _ret = WEBEXT.webAuthenticationProxy.completeCreateRequest(details_ffi);
   280        A.store.Ref(retPtr, _ret);
   281      },
   282      "try_CompleteCreateRequest": (retPtr: Pointer, errPtr: Pointer, details: Pointer): heap.Ref<boolean> => {
   283        try {
   284          const details_ffi = {};
   285  
   286          if (A.load.Bool(details + 20)) {
   287            details_ffi["requestId"] = A.load.Int32(details + 0);
   288          }
   289          if (A.load.Bool(details + 4 + 8)) {
   290            details_ffi["error"] = {};
   291            details_ffi["error"]["name"] = A.load.Ref(details + 4 + 0, undefined);
   292            details_ffi["error"]["message"] = A.load.Ref(details + 4 + 4, undefined);
   293          }
   294          details_ffi["responseJson"] = A.load.Ref(details + 16, undefined);
   295  
   296          const _ret = WEBEXT.webAuthenticationProxy.completeCreateRequest(details_ffi);
   297          A.store.Ref(retPtr, _ret);
   298          return A.H.TRUE;
   299        } catch (err: any) {
   300          A.store.Ref(errPtr, err);
   301          return A.H.FALSE;
   302        }
   303      },
   304      "has_CompleteGetRequest": (): heap.Ref<boolean> => {
   305        if (WEBEXT?.webAuthenticationProxy && "completeGetRequest" in WEBEXT?.webAuthenticationProxy) {
   306          return A.H.TRUE;
   307        }
   308        return A.H.FALSE;
   309      },
   310      "func_CompleteGetRequest": (fn: Pointer): void => {
   311        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.completeGetRequest);
   312      },
   313      "call_CompleteGetRequest": (retPtr: Pointer, details: Pointer): void => {
   314        const details_ffi = {};
   315  
   316        if (A.load.Bool(details + 20)) {
   317          details_ffi["requestId"] = A.load.Int32(details + 0);
   318        }
   319        if (A.load.Bool(details + 4 + 8)) {
   320          details_ffi["error"] = {};
   321          details_ffi["error"]["name"] = A.load.Ref(details + 4 + 0, undefined);
   322          details_ffi["error"]["message"] = A.load.Ref(details + 4 + 4, undefined);
   323        }
   324        details_ffi["responseJson"] = A.load.Ref(details + 16, undefined);
   325  
   326        const _ret = WEBEXT.webAuthenticationProxy.completeGetRequest(details_ffi);
   327        A.store.Ref(retPtr, _ret);
   328      },
   329      "try_CompleteGetRequest": (retPtr: Pointer, errPtr: Pointer, details: Pointer): heap.Ref<boolean> => {
   330        try {
   331          const details_ffi = {};
   332  
   333          if (A.load.Bool(details + 20)) {
   334            details_ffi["requestId"] = A.load.Int32(details + 0);
   335          }
   336          if (A.load.Bool(details + 4 + 8)) {
   337            details_ffi["error"] = {};
   338            details_ffi["error"]["name"] = A.load.Ref(details + 4 + 0, undefined);
   339            details_ffi["error"]["message"] = A.load.Ref(details + 4 + 4, undefined);
   340          }
   341          details_ffi["responseJson"] = A.load.Ref(details + 16, undefined);
   342  
   343          const _ret = WEBEXT.webAuthenticationProxy.completeGetRequest(details_ffi);
   344          A.store.Ref(retPtr, _ret);
   345          return A.H.TRUE;
   346        } catch (err: any) {
   347          A.store.Ref(errPtr, err);
   348          return A.H.FALSE;
   349        }
   350      },
   351      "has_CompleteIsUvpaaRequest": (): heap.Ref<boolean> => {
   352        if (WEBEXT?.webAuthenticationProxy && "completeIsUvpaaRequest" in WEBEXT?.webAuthenticationProxy) {
   353          return A.H.TRUE;
   354        }
   355        return A.H.FALSE;
   356      },
   357      "func_CompleteIsUvpaaRequest": (fn: Pointer): void => {
   358        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest);
   359      },
   360      "call_CompleteIsUvpaaRequest": (retPtr: Pointer, details: Pointer): void => {
   361        const details_ffi = {};
   362  
   363        if (A.load.Bool(details + 5)) {
   364          details_ffi["requestId"] = A.load.Int32(details + 0);
   365        }
   366        if (A.load.Bool(details + 6)) {
   367          details_ffi["isUvpaa"] = A.load.Bool(details + 4);
   368        }
   369  
   370        const _ret = WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest(details_ffi);
   371        A.store.Ref(retPtr, _ret);
   372      },
   373      "try_CompleteIsUvpaaRequest": (retPtr: Pointer, errPtr: Pointer, details: Pointer): heap.Ref<boolean> => {
   374        try {
   375          const details_ffi = {};
   376  
   377          if (A.load.Bool(details + 5)) {
   378            details_ffi["requestId"] = A.load.Int32(details + 0);
   379          }
   380          if (A.load.Bool(details + 6)) {
   381            details_ffi["isUvpaa"] = A.load.Bool(details + 4);
   382          }
   383  
   384          const _ret = WEBEXT.webAuthenticationProxy.completeIsUvpaaRequest(details_ffi);
   385          A.store.Ref(retPtr, _ret);
   386          return A.H.TRUE;
   387        } catch (err: any) {
   388          A.store.Ref(errPtr, err);
   389          return A.H.FALSE;
   390        }
   391      },
   392      "has_Detach": (): heap.Ref<boolean> => {
   393        if (WEBEXT?.webAuthenticationProxy && "detach" in WEBEXT?.webAuthenticationProxy) {
   394          return A.H.TRUE;
   395        }
   396        return A.H.FALSE;
   397      },
   398      "func_Detach": (fn: Pointer): void => {
   399        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.detach);
   400      },
   401      "call_Detach": (retPtr: Pointer): void => {
   402        const _ret = WEBEXT.webAuthenticationProxy.detach();
   403        A.store.Ref(retPtr, _ret);
   404      },
   405      "try_Detach": (retPtr: Pointer, errPtr: Pointer): heap.Ref<boolean> => {
   406        try {
   407          const _ret = WEBEXT.webAuthenticationProxy.detach();
   408          A.store.Ref(retPtr, _ret);
   409          return A.H.TRUE;
   410        } catch (err: any) {
   411          A.store.Ref(errPtr, err);
   412          return A.H.FALSE;
   413        }
   414      },
   415      "has_OnCreateRequest": (): heap.Ref<boolean> => {
   416        if (
   417          WEBEXT?.webAuthenticationProxy?.onCreateRequest &&
   418          "addListener" in WEBEXT?.webAuthenticationProxy?.onCreateRequest
   419        ) {
   420          return A.H.TRUE;
   421        }
   422        return A.H.FALSE;
   423      },
   424      "func_OnCreateRequest": (fn: Pointer): void => {
   425        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onCreateRequest.addListener);
   426      },
   427      "call_OnCreateRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   428        const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.addListener(A.H.get<object>(callback));
   429      },
   430      "try_OnCreateRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   431        try {
   432          const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.addListener(A.H.get<object>(callback));
   433          return A.H.TRUE;
   434        } catch (err: any) {
   435          A.store.Ref(errPtr, err);
   436          return A.H.FALSE;
   437        }
   438      },
   439      "has_OffCreateRequest": (): heap.Ref<boolean> => {
   440        if (
   441          WEBEXT?.webAuthenticationProxy?.onCreateRequest &&
   442          "removeListener" in WEBEXT?.webAuthenticationProxy?.onCreateRequest
   443        ) {
   444          return A.H.TRUE;
   445        }
   446        return A.H.FALSE;
   447      },
   448      "func_OffCreateRequest": (fn: Pointer): void => {
   449        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener);
   450      },
   451      "call_OffCreateRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   452        const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener(A.H.get<object>(callback));
   453      },
   454      "try_OffCreateRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   455        try {
   456          const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.removeListener(A.H.get<object>(callback));
   457          return A.H.TRUE;
   458        } catch (err: any) {
   459          A.store.Ref(errPtr, err);
   460          return A.H.FALSE;
   461        }
   462      },
   463      "has_HasOnCreateRequest": (): heap.Ref<boolean> => {
   464        if (
   465          WEBEXT?.webAuthenticationProxy?.onCreateRequest &&
   466          "hasListener" in WEBEXT?.webAuthenticationProxy?.onCreateRequest
   467        ) {
   468          return A.H.TRUE;
   469        }
   470        return A.H.FALSE;
   471      },
   472      "func_HasOnCreateRequest": (fn: Pointer): void => {
   473        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener);
   474      },
   475      "call_HasOnCreateRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   476        const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener(A.H.get<object>(callback));
   477        A.store.Bool(retPtr, _ret);
   478      },
   479      "try_HasOnCreateRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   480        try {
   481          const _ret = WEBEXT.webAuthenticationProxy.onCreateRequest.hasListener(A.H.get<object>(callback));
   482          A.store.Bool(retPtr, _ret);
   483          return A.H.TRUE;
   484        } catch (err: any) {
   485          A.store.Ref(errPtr, err);
   486          return A.H.FALSE;
   487        }
   488      },
   489      "has_OnGetRequest": (): heap.Ref<boolean> => {
   490        if (
   491          WEBEXT?.webAuthenticationProxy?.onGetRequest &&
   492          "addListener" in WEBEXT?.webAuthenticationProxy?.onGetRequest
   493        ) {
   494          return A.H.TRUE;
   495        }
   496        return A.H.FALSE;
   497      },
   498      "func_OnGetRequest": (fn: Pointer): void => {
   499        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onGetRequest.addListener);
   500      },
   501      "call_OnGetRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   502        const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.addListener(A.H.get<object>(callback));
   503      },
   504      "try_OnGetRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   505        try {
   506          const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.addListener(A.H.get<object>(callback));
   507          return A.H.TRUE;
   508        } catch (err: any) {
   509          A.store.Ref(errPtr, err);
   510          return A.H.FALSE;
   511        }
   512      },
   513      "has_OffGetRequest": (): heap.Ref<boolean> => {
   514        if (
   515          WEBEXT?.webAuthenticationProxy?.onGetRequest &&
   516          "removeListener" in WEBEXT?.webAuthenticationProxy?.onGetRequest
   517        ) {
   518          return A.H.TRUE;
   519        }
   520        return A.H.FALSE;
   521      },
   522      "func_OffGetRequest": (fn: Pointer): void => {
   523        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onGetRequest.removeListener);
   524      },
   525      "call_OffGetRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   526        const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.removeListener(A.H.get<object>(callback));
   527      },
   528      "try_OffGetRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   529        try {
   530          const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.removeListener(A.H.get<object>(callback));
   531          return A.H.TRUE;
   532        } catch (err: any) {
   533          A.store.Ref(errPtr, err);
   534          return A.H.FALSE;
   535        }
   536      },
   537      "has_HasOnGetRequest": (): heap.Ref<boolean> => {
   538        if (
   539          WEBEXT?.webAuthenticationProxy?.onGetRequest &&
   540          "hasListener" in WEBEXT?.webAuthenticationProxy?.onGetRequest
   541        ) {
   542          return A.H.TRUE;
   543        }
   544        return A.H.FALSE;
   545      },
   546      "func_HasOnGetRequest": (fn: Pointer): void => {
   547        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onGetRequest.hasListener);
   548      },
   549      "call_HasOnGetRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   550        const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.hasListener(A.H.get<object>(callback));
   551        A.store.Bool(retPtr, _ret);
   552      },
   553      "try_HasOnGetRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   554        try {
   555          const _ret = WEBEXT.webAuthenticationProxy.onGetRequest.hasListener(A.H.get<object>(callback));
   556          A.store.Bool(retPtr, _ret);
   557          return A.H.TRUE;
   558        } catch (err: any) {
   559          A.store.Ref(errPtr, err);
   560          return A.H.FALSE;
   561        }
   562      },
   563      "has_OnIsUvpaaRequest": (): heap.Ref<boolean> => {
   564        if (
   565          WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest &&
   566          "addListener" in WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest
   567        ) {
   568          return A.H.TRUE;
   569        }
   570        return A.H.FALSE;
   571      },
   572      "func_OnIsUvpaaRequest": (fn: Pointer): void => {
   573        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener);
   574      },
   575      "call_OnIsUvpaaRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   576        const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener(A.H.get<object>(callback));
   577      },
   578      "try_OnIsUvpaaRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   579        try {
   580          const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.addListener(A.H.get<object>(callback));
   581          return A.H.TRUE;
   582        } catch (err: any) {
   583          A.store.Ref(errPtr, err);
   584          return A.H.FALSE;
   585        }
   586      },
   587      "has_OffIsUvpaaRequest": (): heap.Ref<boolean> => {
   588        if (
   589          WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest &&
   590          "removeListener" in WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest
   591        ) {
   592          return A.H.TRUE;
   593        }
   594        return A.H.FALSE;
   595      },
   596      "func_OffIsUvpaaRequest": (fn: Pointer): void => {
   597        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener);
   598      },
   599      "call_OffIsUvpaaRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   600        const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener(A.H.get<object>(callback));
   601      },
   602      "try_OffIsUvpaaRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   603        try {
   604          const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.removeListener(A.H.get<object>(callback));
   605          return A.H.TRUE;
   606        } catch (err: any) {
   607          A.store.Ref(errPtr, err);
   608          return A.H.FALSE;
   609        }
   610      },
   611      "has_HasOnIsUvpaaRequest": (): heap.Ref<boolean> => {
   612        if (
   613          WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest &&
   614          "hasListener" in WEBEXT?.webAuthenticationProxy?.onIsUvpaaRequest
   615        ) {
   616          return A.H.TRUE;
   617        }
   618        return A.H.FALSE;
   619      },
   620      "func_HasOnIsUvpaaRequest": (fn: Pointer): void => {
   621        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener);
   622      },
   623      "call_HasOnIsUvpaaRequest": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   624        const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener(A.H.get<object>(callback));
   625        A.store.Bool(retPtr, _ret);
   626      },
   627      "try_HasOnIsUvpaaRequest": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   628        try {
   629          const _ret = WEBEXT.webAuthenticationProxy.onIsUvpaaRequest.hasListener(A.H.get<object>(callback));
   630          A.store.Bool(retPtr, _ret);
   631          return A.H.TRUE;
   632        } catch (err: any) {
   633          A.store.Ref(errPtr, err);
   634          return A.H.FALSE;
   635        }
   636      },
   637      "has_OnRemoteSessionStateChange": (): heap.Ref<boolean> => {
   638        if (
   639          WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange &&
   640          "addListener" in WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange
   641        ) {
   642          return A.H.TRUE;
   643        }
   644        return A.H.FALSE;
   645      },
   646      "func_OnRemoteSessionStateChange": (fn: Pointer): void => {
   647        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener);
   648      },
   649      "call_OnRemoteSessionStateChange": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   650        const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener(A.H.get<object>(callback));
   651      },
   652      "try_OnRemoteSessionStateChange": (
   653        retPtr: Pointer,
   654        errPtr: Pointer,
   655        callback: heap.Ref<object>
   656      ): heap.Ref<boolean> => {
   657        try {
   658          const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.addListener(A.H.get<object>(callback));
   659          return A.H.TRUE;
   660        } catch (err: any) {
   661          A.store.Ref(errPtr, err);
   662          return A.H.FALSE;
   663        }
   664      },
   665      "has_OffRemoteSessionStateChange": (): heap.Ref<boolean> => {
   666        if (
   667          WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange &&
   668          "removeListener" in WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange
   669        ) {
   670          return A.H.TRUE;
   671        }
   672        return A.H.FALSE;
   673      },
   674      "func_OffRemoteSessionStateChange": (fn: Pointer): void => {
   675        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener);
   676      },
   677      "call_OffRemoteSessionStateChange": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   678        const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener(A.H.get<object>(callback));
   679      },
   680      "try_OffRemoteSessionStateChange": (
   681        retPtr: Pointer,
   682        errPtr: Pointer,
   683        callback: heap.Ref<object>
   684      ): heap.Ref<boolean> => {
   685        try {
   686          const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.removeListener(A.H.get<object>(callback));
   687          return A.H.TRUE;
   688        } catch (err: any) {
   689          A.store.Ref(errPtr, err);
   690          return A.H.FALSE;
   691        }
   692      },
   693      "has_HasOnRemoteSessionStateChange": (): heap.Ref<boolean> => {
   694        if (
   695          WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange &&
   696          "hasListener" in WEBEXT?.webAuthenticationProxy?.onRemoteSessionStateChange
   697        ) {
   698          return A.H.TRUE;
   699        }
   700        return A.H.FALSE;
   701      },
   702      "func_HasOnRemoteSessionStateChange": (fn: Pointer): void => {
   703        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener);
   704      },
   705      "call_HasOnRemoteSessionStateChange": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   706        const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener(A.H.get<object>(callback));
   707        A.store.Bool(retPtr, _ret);
   708      },
   709      "try_HasOnRemoteSessionStateChange": (
   710        retPtr: Pointer,
   711        errPtr: Pointer,
   712        callback: heap.Ref<object>
   713      ): heap.Ref<boolean> => {
   714        try {
   715          const _ret = WEBEXT.webAuthenticationProxy.onRemoteSessionStateChange.hasListener(A.H.get<object>(callback));
   716          A.store.Bool(retPtr, _ret);
   717          return A.H.TRUE;
   718        } catch (err: any) {
   719          A.store.Ref(errPtr, err);
   720          return A.H.FALSE;
   721        }
   722      },
   723      "has_OnRequestCanceled": (): heap.Ref<boolean> => {
   724        if (
   725          WEBEXT?.webAuthenticationProxy?.onRequestCanceled &&
   726          "addListener" in WEBEXT?.webAuthenticationProxy?.onRequestCanceled
   727        ) {
   728          return A.H.TRUE;
   729        }
   730        return A.H.FALSE;
   731      },
   732      "func_OnRequestCanceled": (fn: Pointer): void => {
   733        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener);
   734      },
   735      "call_OnRequestCanceled": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   736        const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener(A.H.get<object>(callback));
   737      },
   738      "try_OnRequestCanceled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   739        try {
   740          const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.addListener(A.H.get<object>(callback));
   741          return A.H.TRUE;
   742        } catch (err: any) {
   743          A.store.Ref(errPtr, err);
   744          return A.H.FALSE;
   745        }
   746      },
   747      "has_OffRequestCanceled": (): heap.Ref<boolean> => {
   748        if (
   749          WEBEXT?.webAuthenticationProxy?.onRequestCanceled &&
   750          "removeListener" in WEBEXT?.webAuthenticationProxy?.onRequestCanceled
   751        ) {
   752          return A.H.TRUE;
   753        }
   754        return A.H.FALSE;
   755      },
   756      "func_OffRequestCanceled": (fn: Pointer): void => {
   757        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener);
   758      },
   759      "call_OffRequestCanceled": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   760        const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener(A.H.get<object>(callback));
   761      },
   762      "try_OffRequestCanceled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   763        try {
   764          const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.removeListener(A.H.get<object>(callback));
   765          return A.H.TRUE;
   766        } catch (err: any) {
   767          A.store.Ref(errPtr, err);
   768          return A.H.FALSE;
   769        }
   770      },
   771      "has_HasOnRequestCanceled": (): heap.Ref<boolean> => {
   772        if (
   773          WEBEXT?.webAuthenticationProxy?.onRequestCanceled &&
   774          "hasListener" in WEBEXT?.webAuthenticationProxy?.onRequestCanceled
   775        ) {
   776          return A.H.TRUE;
   777        }
   778        return A.H.FALSE;
   779      },
   780      "func_HasOnRequestCanceled": (fn: Pointer): void => {
   781        A.store.Ref(fn, WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener);
   782      },
   783      "call_HasOnRequestCanceled": (retPtr: Pointer, callback: heap.Ref<object>): void => {
   784        const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener(A.H.get<object>(callback));
   785        A.store.Bool(retPtr, _ret);
   786      },
   787      "try_HasOnRequestCanceled": (retPtr: Pointer, errPtr: Pointer, callback: heap.Ref<object>): heap.Ref<boolean> => {
   788        try {
   789          const _ret = WEBEXT.webAuthenticationProxy.onRequestCanceled.hasListener(A.H.get<object>(callback));
   790          A.store.Bool(retPtr, _ret);
   791          return A.H.TRUE;
   792        } catch (err: any) {
   793          A.store.Ref(errPtr, err);
   794          return A.H.FALSE;
   795        }
   796      },
   797    };
   798  });