-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
10 changed files
with
135 additions
and
19 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
# Changelog | ||
|
||
## 0.1.1 | ||
|
||
- Start Support for `convo.omnid` | ||
- `convo.omnid.computeTrustScore` coming soon. | ||
|
||
## 0.1.0 | ||
- Release Deno Support for `convo.comments`, `convo.threads`, `convo.auth`, `convo.utils`. | ||
- `convo.omnid`, `convo.auth.getSignatureDataV2`, `convo.auth.parseSignatureV2` coming soon. | ||
|
||
- Release Deno Support for `convo.comments`, `convo.threads`, `convo.auth`, | ||
`convo.utils`. | ||
- `convo.omnid`, `convo.auth.getSignatureDataV2`, | ||
`convo.auth.parseSignatureV2` coming soon. |
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 @@ | ||
# @theconvospace/sdk ![npm/v](https://img.shields.io/npm/v/@theconvospace/sdk) | ||
|
||
![npm/types](https://img.shields.io/npm/types/@theconvospace/sdk) | ||
![nodeVersion](https://img.shields.io/node/v/@theconvospace/sdk) | ||
![bundlephobia/dependency-count](https://img.shields.io/librariesio/release/npm/@theconvospace/sdk) | ||
![bundlephobia/minzip](https://img.shields.io/bundlephobia/minzip/@theconvospace/sdk) | ||
![bundlephobia/min/](https://img.shields.io/bundlephobia/min/@theconvospace/sdk) | ||
|
||
SDK containing all the functions you'll need to build on | ||
[theconvo.space](https://theconvo.space) | ||
|
||
Check out the [Changelog](/packages/sdk/CHANGELOG.md) | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add @theconvospace/sdk | ||
npm i --save @theconvospace/sdk | ||
pnpm i --save @theconvospace/sdk | ||
``` |
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,7 @@ | ||
{ | ||
"lint": { | ||
"rules": { | ||
"exclude": ["no-explicit-any"] | ||
} | ||
} | ||
} |
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,50 @@ | ||
import { fetcher } from './utils.ts'; | ||
import Credentials from './omnid/credentials.ts'; | ||
import { | ||
ComputeConfig, | ||
ErrorType, | ||
AdaptorFunctionType, | ||
AdaptorFunctionWithConfigType, | ||
Dictionary, | ||
} from './types.ts'; | ||
|
||
class Omnid { | ||
apikey: string; | ||
node: string; | ||
credentials: Credentials; | ||
|
||
constructor(apikey: string, node: string) { | ||
this.apikey = apikey; | ||
this.node = node; | ||
this.credentials = new Credentials(apikey, this.node); | ||
return this; | ||
} | ||
|
||
getTrustScore = async ( | ||
address: string, | ||
noCache?: boolean | ||
): Promise<any | ErrorType> => { | ||
return await fetcher( | ||
'GET', | ||
`${this.node}/identity?address=${address}${ | ||
Boolean(noCache) == true ? '&noCache=true' : '' | ||
}`, | ||
this.apikey, | ||
{} | ||
); | ||
}; | ||
|
||
getTrustScoreWithProof = async ( | ||
address: string | ||
): Promise<any | ErrorType> => { | ||
return await fetcher( | ||
'GET', | ||
`${this.node}/zkidentity?address=${address}`, | ||
this.apikey, | ||
{} | ||
); | ||
}; | ||
|
||
} | ||
|
||
export default Omnid; |
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,35 @@ | ||
import { Dictionary } from '../types.ts'; | ||
import { fetcher } from './../utils.ts'; | ||
|
||
class Credentials { | ||
apikey: string; | ||
node: string; | ||
|
||
constructor(apikey: string, node: string) { | ||
this.apikey = apikey; | ||
this.node = node; | ||
return this; | ||
} | ||
|
||
issue = async (address: string, adaptor: string): Promise<string> => { | ||
const resp = await fetcher( | ||
'POST', | ||
`${this.node}/omnid/credentials/issue`, | ||
this.apikey, | ||
{ address, adaptor } | ||
); | ||
return resp; | ||
}; | ||
|
||
verify = async (verifiableCredential: Dictionary<any>): Promise<string> => { | ||
const resp = await fetcher( | ||
'POST', | ||
`${this.node}/omnid/credentials/verify`, | ||
this.apikey, | ||
{ verifiableCredential } | ||
); | ||
return resp; | ||
}; | ||
} | ||
|
||
export default Credentials; |
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,19 +1,11 @@ | ||
# @theconvospace/sdk ![npm/v](https://img.shields.io/npm/v/@theconvospace/sdk) | ||
# Convo Space SDK for Deno | ||
|
||
![npm/types](https://img.shields.io/npm/types/@theconvospace/sdk) | ||
![nodeVersion](https://img.shields.io/node/v/@theconvospace/sdk) | ||
![bundlephobia/dependency-count](https://img.shields.io/librariesio/release/npm/@theconvospace/sdk) | ||
![bundlephobia/minzip](https://img.shields.io/bundlephobia/minzip/@theconvospace/sdk) | ||
![bundlephobia/min/](https://img.shields.io/bundlephobia/min/@theconvospace/sdk) | ||
SDK for building on [theconvo.space](https://theconvo.space) | ||
|
||
SDK containing all the functions you'll need to build on [theconvo.space](https://theconvo.space) | ||
|
||
Check out the [Changelog](/packages/sdk/CHANGELOG.md) | ||
Check out the [Changelog](/packages/sdk-deno/CHANGELOG.md) | ||
|
||
## Installation | ||
|
||
```bash | ||
yarn add @theconvospace/sdk | ||
npm i --save @theconvospace/sdk | ||
pnpm i --save @theconvospace/sdk | ||
```js | ||
import * as convo from "https://deno.land/x/convo@v0.1.0/packages/sdk-deno/mod.ts"; | ||
``` |
bfc1f57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
convosdk-examples-nextjs – ./examples/nextjs
convosdk-examples-nextjs-anudit.vercel.app
convosdk-examples-nextjs.vercel.app
convosdk-examples-nextjs-git-main-anudit.vercel.app
bfc1f57
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
convosdk-examples-browser – ./examples/browser
convosdk-examples-browser-git-main-anudit.vercel.app
convosdk-examples-browser-anudit.vercel.app
convosdk-examples-browser.vercel.app