Skip to content

Commit

Permalink
bumping deps
Browse files Browse the repository at this point in the history
  • Loading branch information
coranos committed May 8, 2024
1 parent 693abe1 commit 9b99439
Show file tree
Hide file tree
Showing 8 changed files with 130 additions and 92 deletions.
8 changes: 5 additions & 3 deletions app/scripts/bananode-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@

const LOG_GET_GENERATED_WORK = false;

let auth, arbitraryHeaders;
let auth;

let arbitraryHeaders;

/**
* Sets an authorization string (http 'Authorization' header), useful if node requires api key.
Expand All @@ -32,12 +34,12 @@
* Sets arbitrary headers
*
* @memberof BananodeApi
* @param {Object.<string, string>} headers key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work
* @param {Object.<string, string>} arbitraryHeaders key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work
* @return {undefined} returns nothing.
*/
const setHeaders = (arbitraryHeaders) => {
arbitraryHeaders = arbitraryHeaders;
}
};

const delay = (time) => {
// console.log('delay', 'time', time);
Expand Down
23 changes: 19 additions & 4 deletions dist/bananocoin-bananojs.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//bananocoin-bananojs.js
//version 2.10.8
//version 2.10.9
//license MIT
/* eslint-disable */
const require = (modname) => {
Expand Down Expand Up @@ -2116,7 +2116,9 @@ window.bananocoin.bananojs.https.request = (

const LOG_GET_GENERATED_WORK = false;

let auth, arbitraryHeaders;
let auth;

let arbitraryHeaders;

/**
* Sets an authorization string (http 'Authorization' header), useful if node requires api key.
Expand All @@ -2133,12 +2135,12 @@ window.bananocoin.bananojs.https.request = (
* Sets arbitrary headers
*
* @memberof BananodeApi
* @param {Object.<string, string>} headers key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work
* @param {Object.<string, string>} arbitraryHeaders key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work
* @return {undefined} returns nothing.
*/
const setHeaders = (arbitraryHeaders) => {
arbitraryHeaders = arbitraryHeaders;
}
};

const delay = (time) => {
// console.log('delay', 'time', time);
Expand Down Expand Up @@ -5692,6 +5694,18 @@ window.bananocoin.bananojs.https.request = (
}
};

/**
* Sets the Bananode Api Headers
* @memberof Main
* @param {string} auth the new headers
* @return {undefined} returns nothing.
*/
const setHeaders = (auth) => {
if (bananodeApi !== undefined) {
bananodeApi.setHeaders(auth);
}
};

/**
* Sets the Bananode Api Proxy (http pr https proxy)
* @memberof Main
Expand Down Expand Up @@ -7105,6 +7119,7 @@ window.bananocoin.bananojs.https.request = (
exports.setBananodeApi = setBananodeApi;
exports.setUseRateLimit = setUseRateLimit;
exports.setAuth = setAuth;
exports.setHeaders = setHeaders;
exports.setBananodeApiProxy = setBananodeApiProxy;
exports.getBananodeApiProxy = getBananodeApiProxy;
exports.getBananoPartsFromDecimal = getBananoPartsFromDecimal;
Expand Down
19 changes: 16 additions & 3 deletions docs/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* [.BANANO_PREFIX](#Main.BANANO_PREFIX) : <code>string</code>
* [.setBananodeApi(_bananodeApi)](#Main.setBananodeApi) ⇒ <code>undefined</code>
* [.setAuth(auth)](#Main.setAuth) ⇒ <code>undefined</code>
* [.setHeaders(headers)](#BananodeApi.setHeaders) ⇒ <code>undefined</code>
* [.setHeaders(auth)](#Main.setHeaders) ⇒ <code>undefined</code>
* [.setBananodeApiProxy(proxy)](#Main.setBananodeApiProxy) ⇒ <code>undefined</code>
* [.getBananodeApiProxy()](#Main.getBananodeApiProxy) ⇒ <code>Object</code>
* [.setBananodeApiUrl(url)](#Main.setBananodeApiUrl) ⇒ <code>undefined</code>
Expand Down Expand Up @@ -72,6 +72,18 @@ Sets the Bananode Api Authorization
| --- | --- | --- |
| auth | <code>string</code> | the new authorization |

<a name="Main.setHeaders"></a>

### Main.setHeaders(auth) ⇒ <code>undefined</code>
Sets the Bananode Api Headers

**Kind**: static method of [<code>Main</code>](#Main)
**Returns**: <code>undefined</code> - returns nothing.

| Param | Type | Description |
| --- | --- | --- |
| auth | <code>string</code> | the new headers |

<a name="Main.setBananodeApiProxy"></a>

### Main.setBananodeApiProxy(proxy) ⇒ <code>undefined</code>
Expand Down Expand Up @@ -1233,6 +1245,7 @@ Recieve deposits for a banano account with a given seed.
* [.setUseRateLimit(flag)](#BananodeApi.setUseRateLimit) ⇒ <code>undefined</code>
* [.getAccountsPending(accounts, count, source)](#BananodeApi.getAccountsPending) ⇒ <code>Promise.&lt;object&gt;</code>
* [.setAuth(authString)](#BananodeApi.setAuth) ⇒ <code>undefined</code>
* [.setHeaders(arbitraryHeaders)](#BananodeApi.setHeaders) ⇒ <code>undefined</code>

<a name="BananodeApi.getAccountBalanceRaw"></a>

Expand Down Expand Up @@ -1366,15 +1379,15 @@ Sets an authorization string (http 'Authorization' header), useful if node requi

<a name="BananodeApi.setHeaders"></a>

### BananodeApi.setHeaders(headers) ⇒ <code>undefined</code>
### BananodeApi.setHeaders(arbitraryHeaders) ⇒ <code>undefined</code>
Sets arbitrary headers

**Kind**: static method of [<code>BananodeApi</code>](#BananodeApi)
**Returns**: <code>undefined</code> - returns nothing.

| Param | Type | Description |
| --- | --- | --- |
| headers | <code>Object.&lt;string, string&gt;</code> | key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work |
| arbitraryHeaders | <code>Object.&lt;string, string&gt;</code> | key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work |

<a name="BananoParts"></a>

Expand Down
16 changes: 15 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ declare namespace Main {
* @returns returns nothing.
*/
function setAuth(auth: string): undefined;
/**
* Sets the Bananode Api Headers
* @param auth - the new headers
* @returns returns nothing.
*/
function setHeaders(auth: string): undefined;
/**
* Sets the Bananode Api Proxy (http pr https proxy)
* @param proxy - the new proxy
Expand Down Expand Up @@ -697,10 +703,18 @@ declare namespace BananodeApi {
function getAccountsPending(accounts: string[], count: number, source: string): Promise<object>;
/**
* Sets an authorization string (http 'Authorization' header), useful if node requires api key.
* @param authString - api key as a string\
* @param authString - api key as a string
* @returns returns nothing.
*/
function setAuth(authString: string): undefined;
/**
* Sets arbitrary headers
* @param arbitraryHeaders - key-value pair object of header names (key) to header values (value), trying to specify Content-Type and Content-Length headers will not work
* @returns returns nothing.
*/
function setHeaders(arbitraryHeaders: {
[key: string]: string;
}): undefined;
}

/**
Expand Down
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@
}
};

/**
* Sets the Bananode Api Headers
* @memberof Main
* @param {string} auth the new headers
* @return {undefined} returns nothing.
*/
const setHeaders = (auth) => {
if (bananodeApi !== undefined) {
bananodeApi.setHeaders(auth);
}
};

/**
* Sets the Bananode Api Proxy (http pr https proxy)
* @memberof Main
Expand Down Expand Up @@ -1456,6 +1468,7 @@
exports.setBananodeApi = setBananodeApi;
exports.setUseRateLimit = setUseRateLimit;
exports.setAuth = setAuth;
exports.setHeaders = setHeaders;
exports.setBananodeApiProxy = setBananodeApiProxy;
exports.getBananodeApiProxy = getBananodeApiProxy;
exports.getBananoPartsFromDecimal = getBananoPartsFromDecimal;
Expand Down
Loading

0 comments on commit 9b99439

Please sign in to comment.