Socket
Socket
Sign inDemoInstall

@0xsequence/api

Package Overview
Dependencies
Maintainers
4
Versions
472
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@0xsequence/api - npm Package Compare versions

Comparing version 0.20.0 to 0.21.0

7

CHANGELOG.md
# @0xsequence/api
## 0.21.0
### Minor Changes
- - fix gas estimation on wallets with large number of signers
- update to session handling and wallet config construction upon auth
## 0.20.0

@@ -4,0 +11,0 @@

28

dist/0xsequence-api.cjs.dev.js

@@ -571,26 +571,18 @@ 'use strict';

class ArcadeumAPIClient extends ArcadeumAPI {
constructor(hostname) {
constructor(hostname, jwtAuth) {
super(hostname, fetch__default['default']);
this.jwtAuth = undefined;
this.jwtAuth = jwtAuth;
this._fetch = (input, init) => {
return new Promise((resolve, reject) => {
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
init.headers = _extends({}, init.headers, headers);
fetch__default['default'](input, init).then(resp => {
// after the request has been made..
resolve(resp);
}).catch(err => {
// request error
reject(err);
});
});
init.headers = _extends({}, init.headers, headers);
return fetch__default['default'](input, init);
};

@@ -597,0 +589,0 @@

@@ -571,26 +571,18 @@ 'use strict';

class ArcadeumAPIClient extends ArcadeumAPI {
constructor(hostname) {
constructor(hostname, jwtAuth) {
super(hostname, fetch__default['default']);
this.jwtAuth = undefined;
this.jwtAuth = jwtAuth;
this._fetch = (input, init) => {
return new Promise((resolve, reject) => {
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
init.headers = _extends({}, init.headers, headers);
fetch__default['default'](input, init).then(resp => {
// after the request has been made..
resolve(resp);
}).catch(err => {
// request error
reject(err);
});
});
init.headers = _extends({}, init.headers, headers);
return fetch__default['default'](input, init);
};

@@ -597,0 +589,0 @@

@@ -563,26 +563,18 @@ import fetch from 'cross-fetch';

class ArcadeumAPIClient extends ArcadeumAPI {
constructor(hostname) {
constructor(hostname, jwtAuth) {
super(hostname, fetch);
this.jwtAuth = undefined;
this.jwtAuth = jwtAuth;
this._fetch = (input, init) => {
return new Promise((resolve, reject) => {
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
// automatically include jwt auth header to requests
// if its been set on the api client
const headers = {};
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`;
} // before the request is made
init.headers = _extends({}, init.headers, headers);
fetch(input, init).then(resp => {
// after the request has been made..
resolve(resp);
}).catch(err => {
// request error
reject(err);
});
});
init.headers = _extends({}, init.headers, headers);
return fetch(input, init);
};

@@ -589,0 +581,0 @@

export * from './api.gen';
import { ArcadeumAPI as BaseArcadeumAPI } from './api.gen';
export declare class ArcadeumAPIClient extends BaseArcadeumAPI {
jwtAuth: string | undefined;
constructor(hostname: string);
jwtAuth?: string | undefined;
constructor(hostname: string, jwtAuth?: string | undefined);
_fetch: (input: RequestInfo, init?: RequestInit | undefined) => Promise<Response>;
}
{
"name": "@0xsequence/api",
"version": "0.20.0",
"version": "0.21.0",
"description": "api sub-package for Sequence",

@@ -5,0 +5,0 @@ "repository": "https://github.com/0xsequence/sequence.js/tree/master/packages/api",

export * from './api.gen'
import { ArcadeumAPI as BaseArcadeumAPI } from './api.gen'
import fetch from 'cross-fetch'
import { ArcadeumAPI as BaseArcadeumAPI } from './api.gen'
export class ArcadeumAPIClient extends BaseArcadeumAPI {
jwtAuth: string | undefined = undefined
constructor(hostname: string) {
constructor(hostname: string, public jwtAuth?: string) {
super(hostname, fetch)

@@ -15,22 +14,14 @@ this.fetch = this._fetch

_fetch = (input: RequestInfo, init?: RequestInit): Promise<Response> => {
return new Promise<Response>((resolve, reject) => {
// automatically include jwt auth header to requests
// if its been set on the api client
const headers: { [key: string]: any } = {}
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`
}
// automatically include jwt auth header to requests
// if its been set on the api client
const headers: { [key: string]: any } = {}
if (this.jwtAuth && this.jwtAuth.length > 0) {
headers['Authorization'] = `BEARER ${this.jwtAuth}`
}
// before the request is made
init!.headers = { ...init!.headers, ...headers }
fetch(input, init).then(resp => {
// after the request has been made..
resolve(resp)
}).catch(err => {
// request error
reject(err)
})
})
}
// before the request is made
init!.headers = { ...init!.headers, ...headers }
return fetch(input, init)
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc