Compare commits

..
14 Commits
Author SHA1 Message Date
Chris Troutner f41cac9fc7 Merge pull request #16 from Permissionless-Software-Foundation/ct-unstable
fix(broadcast): Fixing bug in broadcast JSON RPC
2021-08-15 09:07:09 -07:00
Chris Troutner 8ad1400d3c fix(error reporting): Adding JSON RPC error reporting 2021-08-15 08:32:39 -07:00
Chris Troutner e48a9213c5 fix(broadcast): Fixing bug in broadcast JSON RPC 2021-08-13 16:15:44 -07:00
Chris Troutner 2e2d092b18 Merge pull request #15 from Permissionless-Software-Foundation/ct-unstable
fix(protocol): Adding protocol field to announceJsonLd
2021-08-05 17:18:31 -07:00
Chris Troutner c8aefae0cc fix(protocol): Adding protocol property to announceJsonLd 2021-08-05 17:16:37 -07:00
Chris Troutner 17e465b3ab Merge branch 'master' of https://github.com/Permissionless-Software-Foundation/ipfs-service-provider into ct-unstable 2021-08-05 17:14:40 -07:00
Chris Troutner 40bb75bf33 Merge pull request #18 from Permissionless-Software-Foundation/ct-unstable
fix(protocol): Adding protocol field to announceJsonLd
2021-08-05 17:11:00 -07:00
Chris Troutner 02201afc59 fix(protocol): Adding protocol field to announceJsonLd 2021-08-05 17:08:56 -07:00
Chris Troutner bae98bba28 Merge pull request #14 from Permissionless-Software-Foundation/ct-unstable
feat(about): Adding npm version to JSON RPC About endpoint output
2021-08-03 13:13:25 -07:00
Chris Troutner 0eb7aeaed1 feat(version): Adding npm version to ipfs-coord announce payload 2021-08-03 13:12:02 -07:00
Chris Troutner dbd5022c4c Merge pull request #17 from Permissionless-Software-Foundation/ct-unstable
feat(about): Adding npm version to JSON RPC About endpoint output
2021-08-03 13:07:57 -07:00
Chris Troutner 72ac73c410 feat(about): Adding npm version to JSON RPC About endpoint output 2021-08-03 13:05:45 -07:00
Chris Troutner 9b52c81b25 Adding startup script to gitignore 2021-08-03 12:53:35 -07:00
Chris Troutner 7cc13b9ba9 Adding todo in comments 2021-07-31 16:07:47 -07:00
7 changed files with 28 additions and 25 deletions
+1
View File
@@ -65,5 +65,6 @@ system-user-*.json
orbitdb
ipfsdata
ipfs-service-provider.sh
start-bch-wallet-service.sh
!README.md
-15
View File
@@ -1,15 +0,0 @@
/*
This file should be customized for your app. The string in this file is
displayed when a user makes the 'about' JSON RPC call.
*/
module.exports = `
This is the about string for the ipfs-service-provider repository:
https://github.com/Permissionless-Software-Foundation/ipfs-service-provider
Brought to you by the Permissionless Software Foundation:
https://PSFoundation.cash
Documentation:
https://ipfs-service-provider.fullstack.cash/
`
+6
View File
@@ -5,6 +5,10 @@
/* eslint no-unneeded-ternary:0 */
// Get the version from the package.json file.
const pkgInfo = require('../../package.json')
const version = pkgInfo.version
const ipfsCoordName = process.env.COORD_NAME
? process.env.COORD_NAME
: 'ipfs-bch-wallet-service'
@@ -52,6 +56,8 @@ module.exports = {
'@context': 'https://schema.org/',
'@type': 'WebAPI',
name: ipfsCoordName,
version,
protocol: 'bch-wallet',
description:
'IPFS service providing BCH blockchain access needed by a wallet.',
documentation: 'https://ipfs-bch-wallet-service.fullstack.cash/',
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "ipfs-bch-wallet-service",
"version": "1.0.0",
"version": "1.9.1",
"description": "IPFS and REST service providing blockchain access needed by a wallet. ",
"main": "index.js",
"scripts": {
+3 -2
View File
@@ -6,7 +6,7 @@
const jsonrpc = require('jsonrpc-lite')
// Local libraries
const aboutStr = require('../../../../config/about')
const config = require('../../../../config')
class AboutRPC {
constructor (localConfig) {
@@ -36,7 +36,8 @@ class AboutRPC {
return {
success: true,
status: 200,
message: aboutStr,
// message: aboutStr,
message: JSON.stringify(config.announceJsonLd),
endpoint: 'about'
}
}
+13 -7
View File
@@ -146,7 +146,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH transactions()')
// throw err
// Return an error response
@@ -223,7 +223,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH balance()')
// throw err
// Return an error response
@@ -336,7 +336,8 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH utxos()')
console.error('Error in JSON RPC utxos(): ', err)
// throw err
// Return an error response
@@ -388,12 +389,17 @@ class BCHRPC {
const data = await this.bchjs.RawTransactions.sendRawTransaction(hex)
// console.log(`data: ${JSON.stringify(data, null, 2)}`)
const retObj = data
retObj.status = 200
const retObj = {
success: true,
status: 200,
endpoint: 'broadcast',
txid: data
}
// retObj.status = 200
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH broadcast()')
// throw err
// Return an error response
@@ -514,7 +520,7 @@ class BCHRPC {
return retObj
} catch (err) {
// console.error('Error in createUser()')
console.error('Error in JSON RPC BCH transaction()')
// throw err
// Return an error response
+4
View File
@@ -20,6 +20,10 @@ async function startTest () {
await testUtils.testTransaction(testData.uutId)
// ToDo:
// testTransactions()
// testUtxos()
console.log('E2E TEST: Tests completed successfully!')
process.exit()
} catch (err) {