This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core-chaincode,core-controller): remove the use of fabric-client…
… in controllers Closes #37, #34 * update the chaincode-invokable relation so we can pass external objects * add the chaincodetx ref with the types * update unit tests for invokable changes Signed-off-by: Diego Barahona <[email protected]>
- Loading branch information
Showing
10 changed files
with
1,576 additions
and
1,474 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 |
---|---|---|
|
@@ -13,3 +13,5 @@ dist | |
docs | ||
.convector-dev-env | ||
chaincode | ||
|
||
.history |
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,7 @@ | ||
import { ClientIdentity } from 'fabric-shim'; | ||
import { StubHelper } from '@theledger/fabric-chaincode-utils'; | ||
|
||
export abstract class ChaincodeTx { | ||
stub: StubHelper; | ||
identity: ClientIdentity; | ||
} |
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
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 |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
|
||
export * from './config'; | ||
export * from './chaincode'; | ||
export * from './chaincode-tx'; |
8 changes: 7 additions & 1 deletion
8
@worldsibu/convector-core-controller/src/convector-controller.ts
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 |
---|---|---|
@@ -1,10 +1,16 @@ | ||
/** @module convector-core-controller */ | ||
|
||
/** Base controller class. All controllers must inherit it */ | ||
export abstract class ConvectorController { | ||
export abstract class ConvectorController<T=any> { | ||
/** | ||
* Sender's public certificate fingerprint. | ||
* This can be used to identify the user invoking the controller functions | ||
*/ | ||
protected sender: string; | ||
|
||
/** | ||
* Transaction details. Depends on the platform running, when using core-chaincode | ||
* this will be a @worldsibu/convector-core-chaincode#ChaincodeTx | ||
*/ | ||
protected tx: T; | ||
} |
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
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
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
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
Oops, something went wrong.