-
Notifications
You must be signed in to change notification settings - Fork 204
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: require native shared components implementation (#1349)
Signed-off-by: Victor Anene <[email protected]>
- Loading branch information
1 parent
5559996
commit 343ce6a
Showing
30 changed files
with
282 additions
and
110 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import type { Anoncreds } from '@hyperledger/anoncreds-shared' | ||
|
||
/** | ||
* @public | ||
* AnonCredsRsModuleConfigOptions defines the interface for the options of the AnonCredsRsModuleConfig class. | ||
*/ | ||
export interface AnonCredsRsModuleConfigOptions { | ||
/** | ||
* | ||
* ## Node.JS | ||
* | ||
* ```ts | ||
* import { anoncreds } from '@hyperledger/anoncreds-nodejs' | ||
* | ||
* const agent = new Agent({ | ||
* config: {}, | ||
* dependencies: agentDependencies, | ||
* modules: { | ||
* anoncredsRs: new AnoncredsRsModule({ | ||
* anoncreds, | ||
* }) | ||
* } | ||
* }) | ||
* ``` | ||
* | ||
* ## React Native | ||
* | ||
* ```ts | ||
* import { anoncreds } from '@hyperledger/anoncreds-react-native' | ||
* | ||
* const agent = new Agent({ | ||
* config: {}, | ||
* dependencies: agentDependencies, | ||
* modules: { | ||
* anoncredsRs: new AnoncredsRsModule({ | ||
* anoncreds, | ||
* }) | ||
* } | ||
* }) | ||
* ``` | ||
*/ | ||
anoncreds: Anoncreds | ||
} | ||
|
||
/** | ||
* @public | ||
*/ | ||
export class AnonCredsRsModuleConfig { | ||
private options: AnonCredsRsModuleConfigOptions | ||
|
||
public constructor(options: AnonCredsRsModuleConfigOptions) { | ||
this.options = options | ||
} | ||
|
||
public get anoncreds() { | ||
return this.options.anoncreds | ||
} | ||
} |
This file was deleted.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import type { AriesAskar } from '@hyperledger/aries-askar-shared' | ||
|
||
export interface AskarModuleConfigOptions { | ||
/** | ||
* | ||
* ## Node.JS | ||
* | ||
* ```ts | ||
* import { ariesAskar } from '@hyperledger/aries-askar-nodejs' | ||
* | ||
* const agent = new Agent({ | ||
* config: {}, | ||
* dependencies: agentDependencies, | ||
* modules: { | ||
* ariesAskar: new AskarModule({ | ||
* ariesAskar, | ||
* }) | ||
* } | ||
* }) | ||
* ``` | ||
* | ||
* ## React Native | ||
* | ||
* ```ts | ||
* import { ariesAskar } from '@hyperledger/aries-askar-react-native' | ||
* | ||
* const agent = new Agent({ | ||
* config: {}, | ||
* dependencies: agentDependencies, | ||
* modules: { | ||
* ariesAskar: new AskarModule({ | ||
* ariesAskar, | ||
* }) | ||
* } | ||
* }) | ||
* ``` | ||
*/ | ||
ariesAskar: AriesAskar | ||
} | ||
|
||
/** | ||
* @public | ||
*/ | ||
export class AskarModuleConfig { | ||
private options: AskarModuleConfigOptions | ||
|
||
public constructor(options: AskarModuleConfigOptions) { | ||
this.options = options | ||
} | ||
|
||
public get ariesAskar() { | ||
return this.options.ariesAskar | ||
} | ||
} |
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 was deleted.
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
Oops, something went wrong.