mirror of
https://github.com/Permissionless-Software-Foundation/bch-js.git
synced 2026-09-21 16:51:59 -07:00
Merge pull request #56 from Permissionless-Software-Foundation/ct-unstable
Basic Authentication
This commit is contained in:
@@ -11,6 +11,23 @@ class Address {
|
|||||||
|
|
||||||
this.restURL = tmp.restURL
|
this.restURL = tmp.restURL
|
||||||
this.apiToken = tmp.apiToken
|
this.apiToken = tmp.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Add JWT token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: `Token ${this.apiToken}`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
+19
-1
@@ -55,9 +55,27 @@ class BCHJS {
|
|||||||
else if (process.env.BCHJSTOKEN && process.env.BCHJSTOKEN !== "")
|
else if (process.env.BCHJSTOKEN && process.env.BCHJSTOKEN !== "")
|
||||||
this.apiToken = process.env.BCHJSTOKEN
|
this.apiToken = process.env.BCHJSTOKEN
|
||||||
|
|
||||||
|
// Retrieve the Basic Authentication password.
|
||||||
|
this.authPass = "" // default value.
|
||||||
|
if (config && config.authPass && config.authPass !== "")
|
||||||
|
this.authPass = config.authPass
|
||||||
|
else if (process.env.BCHJSAUTHPASS && process.env.BCHJSAUTHPASS !== "")
|
||||||
|
this.authPass = process.env.BCHJSAUTHPASS
|
||||||
|
|
||||||
|
// Generate a Basic Authentication token from an auth password
|
||||||
|
this.authToken = ""
|
||||||
|
if (this.authPass) {
|
||||||
|
console.log(`bch-js initialized with authPass: ${this.authPass}`)
|
||||||
|
// Generate the header for Basic Authentication.
|
||||||
|
const combined = `fullstackcash:${this.authPass}`
|
||||||
|
var base64Credential = Buffer.from(combined).toString("base64")
|
||||||
|
this.authToken = `Basic ${base64Credential}`
|
||||||
|
}
|
||||||
|
|
||||||
const libConfig = {
|
const libConfig = {
|
||||||
restURL: this.restURL,
|
restURL: this.restURL,
|
||||||
apiToken: this.apiToken
|
apiToken: this.apiToken,
|
||||||
|
authToken: this.authToken
|
||||||
}
|
}
|
||||||
|
|
||||||
// console.log(`apiToken: ${this.apiToken}`)
|
// console.log(`apiToken: ${this.apiToken}`)
|
||||||
|
|||||||
@@ -15,14 +15,24 @@ class Blockbook {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
// console.log(`Blockbook apiToken: ${this.apiToken}`)
|
// console.log(`Blockbook apiToken: ${this.apiToken}`)
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,13 +11,23 @@ class Blockchain {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,13 +10,23 @@ class Control {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-2
@@ -11,12 +11,21 @@ class ElectrumX {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`,
|
authorization: `Token ${this.apiToken}`
|
||||||
timeout: 15000
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
-1
@@ -11,14 +11,23 @@ class Encryption {
|
|||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
this.axios = axios
|
this.axios = axios
|
||||||
// console.log(`Blockbook apiToken: ${this.apiToken}`)
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,23 @@ class Generating {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,23 @@ class Mining {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-2
@@ -6,17 +6,25 @@ class Price {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
_this = this
|
_this = this
|
||||||
|
|
||||||
if (config) {
|
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
}
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.axios = axios
|
this.axios = axios
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,13 +6,23 @@ class RawTransactions {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,16 @@ class Schnorr {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
@@ -12,6 +21,7 @@ class Schnorr {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @api Schnorr.sign() sign()
|
* @api Schnorr.sign() sign()
|
||||||
|
|||||||
+20
-11
@@ -18,22 +18,31 @@ const Utils = require("./utils")
|
|||||||
// SLP is a superset of BITBOX
|
// SLP is a superset of BITBOX
|
||||||
class SLP {
|
class SLP {
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
const tmp = {}
|
this.restURL = config.restURL
|
||||||
if (!config || !config.restURL) {
|
this.apiToken = config.apiToken
|
||||||
tmp.restURL = `https://api.fullstack.cash/v3/`
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tmp.restURL = config.restURL
|
// Add JWT token to the authorization header.
|
||||||
tmp.apiToken = config.apiToken
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: `Token ${this.apiToken}`
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.restURL = tmp.restURL
|
this.Address = new Address(config)
|
||||||
this.apiToken = tmp.apiToken
|
|
||||||
|
|
||||||
this.Address = new Address(tmp)
|
|
||||||
this.ECPair = ECPair
|
this.ECPair = ECPair
|
||||||
this.TokenType1 = new TokenType1(tmp)
|
this.TokenType1 = new TokenType1(config)
|
||||||
this.NFT1 = new NFT1(this.restURL)
|
this.NFT1 = new NFT1(this.restURL)
|
||||||
this.Utils = new Utils(tmp)
|
this.Utils = new Utils(config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+10
@@ -6,13 +6,23 @@ class Util {
|
|||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.restURL = config.restURL
|
this.restURL = config.restURL
|
||||||
this.apiToken = config.apiToken
|
this.apiToken = config.apiToken
|
||||||
|
this.authToken = config.authToken
|
||||||
|
|
||||||
|
if (this.authToken) {
|
||||||
|
// Add Basic Authentication token to the authorization header.
|
||||||
|
this.axiosOptions = {
|
||||||
|
headers: {
|
||||||
|
authorization: this.authToken
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// Add JWT token to the authorization header.
|
// Add JWT token to the authorization header.
|
||||||
this.axiosOptions = {
|
this.axiosOptions = {
|
||||||
headers: {
|
headers: {
|
||||||
authorization: `Token ${this.apiToken}`
|
authorization: `Token ${this.apiToken}`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
_this = this
|
_this = this
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,12 +5,17 @@
|
|||||||
To Run Test:
|
To Run Test:
|
||||||
- Update the RESTURL for bch-api you want to test against.
|
- Update the RESTURL for bch-api you want to test against.
|
||||||
- Ensure the BCHJSTOKEN environment variable is set to an empty string.
|
- Ensure the BCHJSTOKEN environment variable is set to an empty string.
|
||||||
|
- If working with bch-api locally, eliminate the local IP address from the
|
||||||
|
whitelist in bch-api/src/middleware/route-ratelimit.js
|
||||||
|
|
||||||
|
Run this test with this command:
|
||||||
|
mocha --timeout=30000 anonymous-rate-limits.js
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const assert = require("chai").assert
|
const assert = require("chai").assert
|
||||||
|
|
||||||
const RESTURL = `https://api.fullstack.cash/v3/`
|
// const RESTURL = `https://abc.fullstack.cash/v3/`
|
||||||
// const RESTURL = `http://localhost:3000/v3/`
|
const RESTURL = `http://localhost:3000/v3/`
|
||||||
|
|
||||||
const BCHJS = require("../../../src/bch-js")
|
const BCHJS = require("../../../src/bch-js")
|
||||||
const bchjs = new BCHJS({ restURL: RESTURL })
|
const bchjs = new BCHJS({ restURL: RESTURL })
|
||||||
@@ -32,7 +37,7 @@ describe("#anonymous rate limits", () => {
|
|||||||
|
|
||||||
it("should throw error when rate limit exceeded", async () => {
|
it("should throw error when rate limit exceeded", async () => {
|
||||||
try {
|
try {
|
||||||
for (let i = 0; i < 22; i++) await bchjs.Control.getNetworkInfo()
|
for (let i = 0; i < 35; i++) await bchjs.Control.getNetworkInfo()
|
||||||
|
|
||||||
assert.fail("Unexpected result")
|
assert.fail("Unexpected result")
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
Mocha test that verifies that the bch-api server is enforcing its
|
||||||
|
access rules for Basic Authentication.
|
||||||
|
|
||||||
|
To Run Test:
|
||||||
|
- Update the restURL for bch-api you want to test against.
|
||||||
|
- Update the PRO_PASS value with a current PRO_PASSES string used by bch-api.
|
||||||
|
*/
|
||||||
|
|
||||||
|
const assert = require("chai").assert
|
||||||
|
|
||||||
|
const PRO_PASS = "testpassword"
|
||||||
|
|
||||||
|
const BCHJS = require("../../../src/bch-js")
|
||||||
|
const bchjs = new BCHJS({
|
||||||
|
// restURL: `https://api.fullstack.cash/v3/`,
|
||||||
|
restURL: `http://localhost:3000/v3/`,
|
||||||
|
authPass: PRO_PASS
|
||||||
|
})
|
||||||
|
|
||||||
|
describe("#full node rate limits", () => {
|
||||||
|
it("should allow more than 20 RPM to full node", async () => {
|
||||||
|
for (let i = 0; i < 22; i++) {
|
||||||
|
const result = await bchjs.Control.getNetworkInfo()
|
||||||
|
|
||||||
|
if (i === 5) {
|
||||||
|
// console.log(`validating 5th call: ${i}`)
|
||||||
|
assert.property(result, "version", "more than 3 calls allowed")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i === 15) {
|
||||||
|
// console.log(`validating 5th call: ${i}`)
|
||||||
|
assert.property(result, "version", "more than 10 calls allowed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).timeout(45000)
|
||||||
|
|
||||||
|
it("should allow more than 20 RPM to an indexer", async () => {
|
||||||
|
const addr = "bitcoincash:qrdka2205f4hyukutc2g0s6lykperc8nsu5u2ddpqf"
|
||||||
|
|
||||||
|
for (let i = 0; i < 22; i++) {
|
||||||
|
const result = await bchjs.Blockbook.balance(addr)
|
||||||
|
|
||||||
|
if (i === 5) {
|
||||||
|
// console.log(`validating 5th call: ${i}`)
|
||||||
|
assert.property(result, "balance", "more than 3 calls allowed")
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i === 15) {
|
||||||
|
// console.log(`validating 5th call: ${i}`)
|
||||||
|
assert.property(result, "balance", "more than 10 calls allowed")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).timeout(45000)
|
||||||
|
})
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
|
CT 11/11/2020:
|
||||||
|
There is no longer a free tier. These tests have been deprecated.
|
||||||
|
|
||||||
|
--------
|
||||||
Mocha test that verifies that the bch-api server is enforcing its
|
Mocha test that verifies that the bch-api server is enforcing its
|
||||||
FREE access rules
|
FREE access rules
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
|
CT 11/11/2020:
|
||||||
|
There is no longer a free tier. These tests have been deprecated.
|
||||||
|
|
||||||
|
----
|
||||||
Mocha test that verifies that the bch-api server is enforcing its
|
Mocha test that verifies that the bch-api server is enforcing its
|
||||||
full-node access rules
|
full-node access rules
|
||||||
|
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
const chai = require("chai")
|
|
||||||
const assert = chai.assert
|
|
||||||
const BCHJS = require("../../src/bch-js")
|
|
||||||
|
|
||||||
// Used for debugging and iterrogating JS objects.
|
|
||||||
const util = require("util")
|
|
||||||
util.inspect.defaultOptions = { depth: 1 }
|
|
||||||
|
|
||||||
describe(`#BitboxShim`, () => {
|
|
||||||
it("should create the shim library", () => {
|
|
||||||
const BitboxShim = BCHJS.BitboxShim()
|
|
||||||
const bitbox = new BitboxShim()
|
|
||||||
|
|
||||||
//console.log(`bitbox.Address: ${util.inspect(bitbox.Address)}`)
|
|
||||||
|
|
||||||
assert.hasAnyKeys(bitbox.Address, [
|
|
||||||
// "details",
|
|
||||||
// "utxo",
|
|
||||||
// "unconfirmed",
|
|
||||||
// "transactions",
|
|
||||||
// "toLegacyAddress"
|
|
||||||
"restURL"
|
|
||||||
])
|
|
||||||
})
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user