stratumn-agent
Advanced tools
Comparing version 0.14.0 to 0.14.1
@@ -19,2 +19,6 @@ 'use strict'; | ||
var _plugins = require('./plugins'); | ||
var _plugins2 = _interopRequireDefault(_plugins); | ||
var _storeHttpClient = require('./storeHttpClient'); | ||
@@ -26,2 +30,10 @@ | ||
/* | ||
Copyright (C) 2017 Stratumn SAS | ||
This Source Code Form is subject to the terms of the Mozilla Public | ||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||
file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
module.exports = { | ||
@@ -32,9 +44,4 @@ create: _create2.default, | ||
memoryStore: _memoryStore2.default, | ||
plugins: _plugins2.default, | ||
storeHttpClient: _storeHttpClient2.default | ||
}; /* | ||
Copyright (C) 2017 Stratumn SAS | ||
This Source Code Form is subject to the terms of the Mozilla Public | ||
License, v. 2.0. If a copy of the MPL was not distributed with this | ||
file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
*/ | ||
}; |
@@ -18,3 +18,3 @@ 'use strict'; | ||
description: 'Saves the action and its arguments in link meta information', | ||
description: 'Saves the action and its arguments in link meta information.', | ||
@@ -21,0 +21,0 @@ didCreateLink: function didCreateLink(link, action, args) { |
@@ -11,3 +11,3 @@ 'use strict'; | ||
description: 'Saves in segment meta the URL that can be used to retrieve a segment', | ||
description: 'Saves in segment meta the URL that can be used to retrieve a segment.', | ||
@@ -14,0 +14,0 @@ didCreateSegment: function didCreateSegment(segment) { |
@@ -17,3 +17,3 @@ 'use strict'; | ||
description: 'Computes and adds the hash of the state in meta', | ||
description: 'Computes and adds the hash of the state in meta.', | ||
@@ -20,0 +20,0 @@ didCreateLink: function didCreateLink(link) { |
{ | ||
"name": "stratumn-agent", | ||
"version": "0.14.0", | ||
"version": "0.14.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -18,2 +18,3 @@ # Stratumn agent for NodeJS [ALPHA - incompatible with production] | ||
var Agent = require('stratumn-agent'); | ||
var plugins = Agent.plugins; | ||
@@ -36,3 +37,3 @@ // Load actions. | ||
salt: process.env.STRATUMN_SALT || Math.random() // change to a unique salt | ||
plugins: ['localTime'] // pick any plugins from src/plugins or develop your own - order matters | ||
plugins: [plugins.localTime] // pick any plugins from src/plugins or develop your own - order matters | ||
}); | ||
@@ -81,1 +82,10 @@ | ||
All methods are optional. They can either be synchronous or return a Promise. | ||
### Available plugins: | ||
- `actionArgs`: Saves the action and its arguments in link meta information. | ||
- `agentUrl`: Saves in segment meta the URL that can be used to retrieve a segment. | ||
- `encryptedState`: Encrypts the state before the segment is saved. Filters out segment that cannot be decrypted. | ||
- `localTime`: Saves the local timestamp in the link meta information. | ||
- `signedState`: Signs the state before the segment is saved. Filters out segments whose signature is invalid. | ||
- `stateHash`: Computes and adds the hash of the state in meta. |
@@ -13,2 +13,3 @@ /* | ||
import memoryStore from './memoryStore'; | ||
import plugins from './plugins'; | ||
import storeHttpClient from './storeHttpClient'; | ||
@@ -21,3 +22,4 @@ | ||
memoryStore, | ||
storeHttpClient | ||
plugins, | ||
storeHttpClient, | ||
}; |
@@ -13,3 +13,3 @@ /* | ||
description: 'Saves the action and its arguments in link meta information', | ||
description: 'Saves the action and its arguments in link meta information.', | ||
@@ -16,0 +16,0 @@ didCreateLink(link, action, args) { |
@@ -13,3 +13,3 @@ /* | ||
description: 'Saves in segment meta the URL that can be used to retrieve a segment', | ||
description: 'Saves in segment meta the URL that can be used to retrieve a segment.', | ||
@@ -16,0 +16,0 @@ didCreateSegment(segment) { |
@@ -15,3 +15,3 @@ /* | ||
description: 'Computes and adds the hash of the state in meta', | ||
description: 'Computes and adds the hash of the state in meta.', | ||
@@ -18,0 +18,0 @@ didCreateLink(link) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116021
61
2446
89