@avaprotocol/sdk-js 0.6.9 → 0.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,13 +1,10 @@
1
+ "use strict";
2
+ var __create = Object.create;
1
3
  var __defProp = Object.defineProperty;
2
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
4
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
6
- get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
7
- }) : x)(function(x) {
8
- if (typeof require !== "undefined") return require.apply(this, arguments);
9
- throw Error('Dynamic require of "' + x + '" is not supported');
10
- });
11
8
  var __esm = (fn, res) => function __init() {
12
9
  return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
13
10
  };
@@ -23,6 +20,14 @@ var __copyProps = (to, from, except, desc) => {
23
20
  }
24
21
  return to;
25
22
  };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
26
31
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
32
 
28
33
  // grpc_codegen/avs_pb.js
@@ -40,7 +45,7 @@ var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_p
40
45
  var init_avs_pb = __esm({
41
46
  "grpc_codegen/avs_pb.js"() {
42
47
  "use strict";
43
- jspb = __require("google-protobuf");
48
+ jspb = require("google-protobuf");
44
49
  goog = jspb;
45
50
  global = function() {
46
51
  if (this) {
@@ -57,9 +62,9 @@ var init_avs_pb = __esm({
57
62
  }
58
63
  return Function("return this")();
59
64
  }.call(null);
60
- google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js");
65
+ google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js");
61
66
  goog.object.extend(proto, google_protobuf_timestamp_pb);
62
- google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js");
67
+ google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js");
63
68
  goog.object.extend(proto, google_protobuf_wrappers_pb);
64
69
  goog.exportSymbol("proto.aggregator.AddressRequest", null, global);
65
70
  goog.exportSymbol("proto.aggregator.AddressResp", null, global);
@@ -4102,7 +4107,13 @@ var init_avs_pb = __esm({
4102
4107
  });
4103
4108
 
4104
4109
  // src/index.ts
4105
- import * as grpc2 from "@grpc/grpc-js";
4110
+ var src_exports = {};
4111
+ __export(src_exports, {
4112
+ default: () => Client,
4113
+ getKeyRequestMessage: () => getKeyRequestMessage
4114
+ });
4115
+ module.exports = __toCommonJS(src_exports);
4116
+ var grpc2 = __toESM(require("@grpc/grpc-js"));
4106
4117
 
4107
4118
  // src/auth.ts
4108
4119
  var getKeyRequestMessage = (address, expiredAt) => {
@@ -4110,10 +4121,10 @@ var getKeyRequestMessage = (address, expiredAt) => {
4110
4121
  };
4111
4122
 
4112
4123
  // grpc_codegen/avs_grpc_pb.js
4113
- var grpc = __require("@grpc/grpc-js");
4124
+ var grpc = require("@grpc/grpc-js");
4114
4125
  var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports));
4115
- var google_protobuf_timestamp_pb2 = __require("google-protobuf/google/protobuf/timestamp_pb.js");
4116
- var google_protobuf_wrappers_pb2 = __require("google-protobuf/google/protobuf/wrappers_pb.js");
4126
+ var google_protobuf_timestamp_pb2 = require("google-protobuf/google/protobuf/timestamp_pb.js");
4127
+ var google_protobuf_wrappers_pb2 = require("google-protobuf/google/protobuf/wrappers_pb.js");
4117
4128
  function serialize_aggregator_AddressRequest(arg) {
4118
4129
  if (!(arg instanceof avs_pb.AddressRequest)) {
4119
4130
  throw new Error("Expected argument of type aggregator.AddressRequest");
@@ -4424,7 +4435,7 @@ var BaseClient = class {
4424
4435
  this.rpcClient = new AggregatorClient(
4425
4436
  this.endpoint,
4426
4437
  // TODO: switch to the TLS after we're able to update all the operator
4427
- grpc2.ChannelCredentials.createInsecure()
4438
+ grpc2.credentials.createInsecure()
4428
4439
  );
4429
4440
  console.log("this.rpcClient:", this.rpcClient);
4430
4441
  }
@@ -4489,7 +4500,7 @@ var Client = class extends BaseClient {
4489
4500
  super(config);
4490
4501
  }
4491
4502
  };
4492
- export {
4493
- Client as default,
4503
+ // Annotate the CommonJS export names for ESM import in node:
4504
+ 0 && (module.exports = {
4494
4505
  getKeyRequestMessage
4495
- };
4506
+ });