Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/CloudDocument.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/LokiQuery.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/MongoQuery.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_db_loki-db.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_db_tingo-db.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_db_zango-db.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_icrufler.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_idb.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_ischema.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/bouncer_mongo-query.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_ble-socket.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_i2p-socket-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_isocket-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_loopback-channel.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_loopback-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_loopback-socket.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_peer-comms.js.html

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/comms_rest-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_rtc-socket-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/comms_websocket-comms.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_iconfig.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_json-file.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_local-storage.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_memory.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/config_nconf.js.html

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions docs/config_secure-config.js.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/global.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.BLEPeerClient.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.I2pSocketComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.ISocketComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.LoopbackChannel.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.LoopbackComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.LoopbackSocket.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.PeerComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.RTCSocketComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.RestComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.WebsocketComms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Comms.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.IConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.JsonFileConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.LocalStorageConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.MemoryConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.NconfConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.SecureConfig.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Config.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.IDb.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.ISchema.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.LokiDb.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.TingoDb.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.ZangoDb.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Db.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.CloudParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.DocumentFactory.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.IDocument.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.IParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.LokiCache.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.LokiParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.MongoParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.PeerParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.Query.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.TingoParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.ZangoParty.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Party.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.EndpointContext.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.IEndpoint.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.IMiddleware.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.ISandboxRunner.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.IService.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.ITask.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.RunnerRouter.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.ServiceHost.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.ServiceRunner.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.ServiceRunnerNode.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Service.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Topics.LocalTopicHost.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/module-Topics.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_cloud_cloud-document.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_cloud_cloud-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_document-factory.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_idocument.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_index.js.html

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions docs/party_iparty.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_local_loki-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_local_loki-query.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_local_tingo-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_local_zango-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_loki-cache.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_mongo_mongo-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_peer_peer-party.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/party_query.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_endpoint-context.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_iendpoint.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_imiddleware.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_isandbox-runner.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_ischema.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_iservice.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_itask.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_runner-router.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_service-host.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_service-runner-node.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/service_service-runner.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/topics_index.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/topics_local-topic-host.js.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/tutorial-implementing-services.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/tutorial-local-party.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/tutorial-peer-to-peer.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/tutorial-service-task.html

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@dataparty/api",
"private": false,
"version": "1.2.24",
"version": "1.2.25",
"main": "dist/dataparty.js",
"frontend": "dist/dataparty-browser.js",
"backend": "dist/dataparty.js",
Expand Down Expand Up @@ -67,7 +67,7 @@
"@zeit/ncc": "^0.22.3",
"ajv": "6.9.1",
"axios": "^0.27.2",
"bleno": "npm:@abandonware/bleno@^0.5.1-4",
"bleno": "npm:@abandonware/bleno@^0.6.1",
"body-parser": "^1.19.0",
"bson": "^4.6.1",
"bson-objectid": "^1.3.0",
Expand All @@ -91,7 +91,7 @@
"morgan": "^1.10.0",
"multer": "^1.4.5-lts.1",
"nconf": "^0.10.0",
"noble": "npm:@abandonware/noble@^1.9.2-20",
"noble": "npm:@abandonware/noble@^1.9.2-23",
"node-mocks-http": "^1.12.1",
"node-persist": "^3.0.1",
"origin-router": "^1.6.4",
Expand Down
2 changes: 1 addition & 1 deletion scripts/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ set -x

rm -rf docs
npm run generate-docs
mv docs/@dataparty/api/1.2.24/* docs/
mv docs/@dataparty/api/1.2.25/* docs/
cp -r images/ docs
10 changes: 5 additions & 5 deletions src/comms/rest-comms.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ class RestComms extends EventEmitter {
}

async loadCloud() {
this.uri = this.config.read('cloud.uri')
this.wsUri = this.config.read('cloud.wsUri')
this.uri = await this.config.read('cloud.uri')
this.wsUri = await this.config.read('cloud.wsUri')

if (this.uri && this.uri[this.uri.length - 1] !== '/') {
this.uri = this.uri + '/'
Expand All @@ -95,9 +95,9 @@ class RestComms extends EventEmitter {
//
}

storeSession() {
async storeSession() {
const path = this.cfgPrefix + '.rest-session'
this.config.write(path, { id: this.sessionId })
await this.config.write(path, { id: this.sessionId })
}

async call(path, data,
Expand Down Expand Up @@ -316,7 +316,7 @@ class RestComms extends EventEmitter {

this.sessionId = reply.session
this.authed = true
this.storeSession()
await this.storeSession()

await this.syncActors()
this.emit('open')
Expand Down
4 changes: 2 additions & 2 deletions src/config/secure-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ class SecureConfig extends IConfig {
if(await this.isInitialized()){ throw new Error('already initialized') }

const settings = {
key_type: 'key'
type: 'key'
}

await this.initialize(key, defaults, settings)
}


async initialize(key, defaults, settings){
debug('initialize - type:', settings.key_type)
debug('initialize - type:', settings.type)
if(await this.isInitialized()){ throw new Error('already initialized') }

const pwIdentity = new dataparty_crypto.Identity({
Expand Down
6 changes: 4 additions & 2 deletions src/party/iparty.js
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,8 @@ class IParty {
this._actor.type = primaryActor.type

const path = 'actor'

//! @hack & @todo - this needs to be `await` so this accessor probably should be removed
this.config.write(path, this._actor)
}

Expand All @@ -238,7 +240,7 @@ class IParty {
*/
async loadIdentity(){
const path = 'identity'
const cfgIdenStr = this.config.read(path)
const cfgIdenStr = await this.config.read(path)

if (!cfgIdenStr){
debug('generated new identity')
Expand Down Expand Up @@ -270,7 +272,7 @@ class IParty {
*/
async loadActor(){
const path = 'actor'
const localActorObj = this.config.read(path)
const localActorObj = await this.config.read(path)

if (!localActorObj){ return }

Expand Down
8 changes: 8 additions & 0 deletions src/venue/schema/group.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
owner: [User, Party],
name: String,
identity:{
type: [NaCl],

}
}
8 changes: 8 additions & 0 deletions src/venue/schema/party-service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
party: [Party],
visibility: ['Public', 'Private', 'Group'],
serviceUUID: String, //! Service UUID
serviceHash: String, //! Hash of service
prefix: String,
disabled: Boolean
}
8 changes: 7 additions & 1 deletion src/venue/schema/party.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
type: [NaCl]
hash: String
},
rootOfTrust: {

nacl: NaClIdentityObject[],
wallet: WalletIdentityObject[],
pgp: String[]
}
unlisted: Boolean
private: Boolean //! Only show to people who party.identity has trusted
type: ['External', 'SharedHosted', 'Internal']
type: ['External', 'SharedHost', 'ContainerHost', 'Internal']
}
3 changes: 2 additions & 1 deletion src/venue/schema/trust.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{
owner: [User | Host],
from: Identity,
timestamp: Date,
expiry: Date,
target: {
id: String,
type: String,
hash: String
host: String //! Host identity hash
}

}