@0xsequence/metadata 1.5.0 → 1.6.1
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.
|
@@ -67,6 +67,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
67
67
|
//
|
|
68
68
|
class Metadata {
|
|
69
69
|
constructor(hostname, fetch) {
|
|
70
|
+
this.hostname = void 0;
|
|
71
|
+
this.fetch = void 0;
|
|
70
72
|
this.path = '/rpc/Metadata/';
|
|
71
73
|
this.ping = headers => {
|
|
72
74
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -264,15 +266,16 @@ const buildResponse = res => {
|
|
|
264
266
|
if (!res.ok) {
|
|
265
267
|
throw data; // webrpc error response
|
|
266
268
|
}
|
|
267
|
-
|
|
268
269
|
return data;
|
|
269
270
|
});
|
|
270
271
|
};
|
|
271
272
|
|
|
272
273
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
273
274
|
class SequenceMetadata extends Metadata {
|
|
274
|
-
constructor(hostname = 'https://metadata.sequence.app',
|
|
275
|
+
constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
|
|
275
276
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
277
|
+
this.projectAccessKey = projectAccessKey;
|
|
278
|
+
this.jwtAuth = jwtAuth;
|
|
276
279
|
this._fetch = (input, init) => {
|
|
277
280
|
// automatically include jwt and access key auth header to requests
|
|
278
281
|
// if its been set on the api client
|
|
@@ -290,8 +293,6 @@ class SequenceMetadata extends Metadata {
|
|
|
290
293
|
init.headers = _extends({}, init.headers, headers);
|
|
291
294
|
return fetch(input, init);
|
|
292
295
|
};
|
|
293
|
-
this.projectAccessKey = _projectAccessKey;
|
|
294
|
-
this.jwtAuth = _jwtAuth;
|
|
295
296
|
this.fetch = this._fetch;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
@@ -67,6 +67,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
67
67
|
//
|
|
68
68
|
class Metadata {
|
|
69
69
|
constructor(hostname, fetch) {
|
|
70
|
+
this.hostname = void 0;
|
|
71
|
+
this.fetch = void 0;
|
|
70
72
|
this.path = '/rpc/Metadata/';
|
|
71
73
|
this.ping = headers => {
|
|
72
74
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -264,15 +266,16 @@ const buildResponse = res => {
|
|
|
264
266
|
if (!res.ok) {
|
|
265
267
|
throw data; // webrpc error response
|
|
266
268
|
}
|
|
267
|
-
|
|
268
269
|
return data;
|
|
269
270
|
});
|
|
270
271
|
};
|
|
271
272
|
|
|
272
273
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
273
274
|
class SequenceMetadata extends Metadata {
|
|
274
|
-
constructor(hostname = 'https://metadata.sequence.app',
|
|
275
|
+
constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
|
|
275
276
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
277
|
+
this.projectAccessKey = projectAccessKey;
|
|
278
|
+
this.jwtAuth = jwtAuth;
|
|
276
279
|
this._fetch = (input, init) => {
|
|
277
280
|
// automatically include jwt and access key auth header to requests
|
|
278
281
|
// if its been set on the api client
|
|
@@ -290,8 +293,6 @@ class SequenceMetadata extends Metadata {
|
|
|
290
293
|
init.headers = _extends({}, init.headers, headers);
|
|
291
294
|
return fetch(input, init);
|
|
292
295
|
};
|
|
293
|
-
this.projectAccessKey = _projectAccessKey;
|
|
294
|
-
this.jwtAuth = _jwtAuth;
|
|
295
296
|
this.fetch = this._fetch;
|
|
296
297
|
}
|
|
297
298
|
}
|
|
@@ -63,6 +63,8 @@ let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
|
63
63
|
//
|
|
64
64
|
class Metadata {
|
|
65
65
|
constructor(hostname, fetch) {
|
|
66
|
+
this.hostname = void 0;
|
|
67
|
+
this.fetch = void 0;
|
|
66
68
|
this.path = '/rpc/Metadata/';
|
|
67
69
|
this.ping = headers => {
|
|
68
70
|
return this.fetch(this.url('Ping'), createHTTPRequest({}, headers)).then(res => {
|
|
@@ -260,15 +262,16 @@ const buildResponse = res => {
|
|
|
260
262
|
if (!res.ok) {
|
|
261
263
|
throw data; // webrpc error response
|
|
262
264
|
}
|
|
263
|
-
|
|
264
265
|
return data;
|
|
265
266
|
});
|
|
266
267
|
};
|
|
267
268
|
|
|
268
269
|
const fetch = typeof global === 'object' ? global.fetch : window.fetch;
|
|
269
270
|
class SequenceMetadata extends Metadata {
|
|
270
|
-
constructor(hostname = 'https://metadata.sequence.app',
|
|
271
|
+
constructor(hostname = 'https://metadata.sequence.app', projectAccessKey, jwtAuth) {
|
|
271
272
|
super(hostname.endsWith('/') ? hostname.slice(0, -1) : hostname, fetch);
|
|
273
|
+
this.projectAccessKey = projectAccessKey;
|
|
274
|
+
this.jwtAuth = jwtAuth;
|
|
272
275
|
this._fetch = (input, init) => {
|
|
273
276
|
// automatically include jwt and access key auth header to requests
|
|
274
277
|
// if its been set on the api client
|
|
@@ -286,8 +289,6 @@ class SequenceMetadata extends Metadata {
|
|
|
286
289
|
init.headers = _extends({}, init.headers, headers);
|
|
287
290
|
return fetch(input, init);
|
|
288
291
|
};
|
|
289
|
-
this.projectAccessKey = _projectAccessKey;
|
|
290
|
-
this.jwtAuth = _jwtAuth;
|
|
291
292
|
this.fetch = this._fetch;
|
|
292
293
|
}
|
|
293
294
|
}
|
package/package.json
CHANGED