-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 336aac1
Showing
99 changed files
with
24,564 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# fallback file for env-cmd | ||
# do not edit this file. for your local environment | ||
# create your own file called '.env.local' in the same dir and add entries like | ||
# CONTRACTUS_TESTLOGS=true | ||
# of course drop the '# ' comment prefix in your file ;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
bundles/* | ||
discify/* | ||
dist/* | ||
node_modules/* | ||
.env.local | ||
ipfs-contractus | ||
package-lock.json.* | ||
package-lock.json | ||
docs/_build/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.env | ||
bundles/bcc/bcc.js.map | ||
bundles/bcc/dbcpPath.json | ||
discify/ | ||
docu/ | ||
scripts/ | ||
src/ | ||
tsconfig.json | ||
tslint.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package-lock=false |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# blockchain-core | ||
|
||
## Next Version | ||
### Features | ||
### Fixes | ||
### Deprecations | ||
|
||
## Version 1.0.2 | ||
### Features | ||
- add support for adding sharing file hashes to cache to avoid duplicate contract calls | ||
- add paging to `getCalls` and `getAnswers` in `ServiceContract` module | ||
- add function to clear sharing caches to `Sharing` module | ||
- add support for nested encryption to `ServiceContract` module | ||
- rename to api-blockchain-core | ||
|
||
### Fixes | ||
|
||
### Deprecations | ||
- change service call encryption schema to multi-sharings based encryption | ||
|
||
|
||
## Version 1.0.1 | ||
### Features | ||
- add docu for rights-and-roles.ts, ipld.ts | ||
- use @evan.network for package name and dependencies scopes | ||
- add .npmignore | ||
- (deprecation) rights-and-roles.ts:hasUserRole second argument "accountId" will be dropped, as it isnt' required anymore | ||
- rename *contractus* variables to *evan* | ||
- rename bcc-core bundle to bcc | ||
- rename BCCCore to CoreRuntime | ||
- rename BCCProfile to ProfileRuntime | ||
- rename BCCBC to BCRuntime | ||
- allow overwriting runtimes nameResolver with runtimeConfig | ||
- fix unbound entry retrieval in DataContract.getListEntries by adding paging to it | ||
- add `removeAccountFromRole` and `transferOwnership` to `RightsAndRoles` for better permission management | ||
- make `extendSharings` publicly accessible for adding properties to sharings withou saving them | ||
- add `createSharing` to `DataContract` and accept a sharings hash in `createContract` , which allows to decouple sharing creation and contract creation | ||
- accept ipld hashes in `storeForAccount` in `Profile` to decouple tree encryption and property storing | ||
- add support for multi-sharings to `Sharings` module | ||
- add multi-sharing support to `ServiceContract` module | ||
|
||
## Version 1.0.0 | ||
- DBCP update | ||
- Fix web3 reconnect | ||
- Add iframe support for dapps | ||
|
||
## Version 0.9.0 | ||
- initial version and release candidate for 1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SPHINXPROJ = blockchain-core | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
================================================================================ | ||
Account Store | ||
================================================================================ | ||
|
||
.. list-table:: | ||
:widths: auto | ||
:stub-columns: 1 | ||
|
||
* - Class Name | ||
- AccountStore | ||
* - Implements | ||
- `KeyStoreInterface <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`__ | ||
* - Extends | ||
- `Logger </common/logger.html>`_ | ||
* - Source | ||
- `account-store.ts <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`__ | ||
|
||
The `AccountStore <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`_ implements the `KeyStoreInterface <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`_ and is a wrapper for a storage, where evan.network account ids are stored. The default `AccountStore <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`_ takes an account --> private key mapping as a pojo as its arguments and uses this to perform lookups, when the :ref:`getPrivateKey <accountstore_getPrivateKey>` function is called. This lookup needs to be done, when transactions are signed by the `InternalSigner <https://github.com/evannetwork/dbcp/tree/master/src/contracts/signer-internal.ts>`_ (see `Signer </blockchain/signer.html>`_). | ||
|
||
Note that the return value of the :ref:`getPrivateKey <accountstore_getPrivateKey>` function is a promise. This may not be required in the default `AccountStore <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`_, but this allows you to implement own implementations of the `KeyStoreInterface <https://github.com/evannetwork/dbcp/tree/master/src/account-store.ts>`_, which may enforce a more strict security behavior or are able to access other sources for private keys. | ||
|
||
|
||
|
||
------------------------------------------------------------------------------ | ||
|
||
.. _accountstore_constructor: | ||
|
||
constructor | ||
================================================================================ | ||
|
||
.. code-block:: typescript | ||
new AccountStore(options); | ||
Creates a new AccountStore instance. | ||
|
||
---------- | ||
Parameters | ||
---------- | ||
|
||
#. ``options`` - ``AccountStoreOptions``: options for AccountStore constructor. | ||
* ``accounts`` - ``any``: object with accountid/privatekey mapping | ||
* ``log`` - ``Function`` (optional): function to use for logging: ``(message, level) => {...}`` | ||
* ``logLevel`` - |source logLevel|_ (optional): messages with this level will be logged with ``log`` | ||
* ``logLog`` - |source logLogInterface|_ (optional): container for collecting log messages | ||
* ``logLogLevel`` - |source logLevel|_ (optional): messages with this level will be pushed to ``logLog`` | ||
|
||
------- | ||
Returns | ||
------- | ||
|
||
``AccountStore`` instance | ||
|
||
------- | ||
Example | ||
------- | ||
|
||
.. code-block:: typescript | ||
const accountStore = new AccountStore({ | ||
accounts: { | ||
'0x1234': '12479abc3df' | ||
} | ||
}); | ||
-------------------------------------------------------------------------------- | ||
|
||
.. _accountstore_getPrivateKey: | ||
|
||
getPrivateKey | ||
=================== | ||
|
||
.. code-block:: javascript | ||
accountStore.getPrivateKey(accountId); | ||
get private key for given account | ||
|
||
|
||
|
||
---------- | ||
Parameters | ||
---------- | ||
|
||
#. ``accountId`` - ``string``: eth accountId | ||
|
||
------- | ||
Returns | ||
------- | ||
|
||
Promise resolves to ``string``: private key for this account | ||
|
||
------- | ||
Example | ||
------- | ||
|
||
.. code-block:: javascript | ||
const privateKey = await runtime.accountStore.getPrivateKey('0x0000000000000000000000000000000000000002'); | ||
.. required for building markup | ||
.. |source logLevel| replace:: ``LogLevel`` | ||
.. _source logLevel: /common/logger.html#loglevel | ||
|
||
.. |source logLogInterface| replace:: ``LogLogInterface`` | ||
.. _source logLogInterface: /common/logger.html#logloginterface |
Oops, something went wrong.