-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into feat/sepolia
- Loading branch information
Showing
32 changed files
with
22,375 additions
and
13,866 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 |
---|---|---|
|
@@ -31,3 +31,5 @@ build | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
|
||
!apps/docs |
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 |
---|---|---|
|
@@ -85,4 +85,8 @@ typechain | |
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
*.db | ||
*.db | ||
|
||
# Docusaurus generated files | ||
.docusaurus | ||
.cache-loader |
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 was deleted.
Oops, something went wrong.
This file was deleted.
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 |
---|---|---|
@@ -1,11 +1,9 @@ | ||
checksumBehavior: update | ||
|
||
nodeLinker: node-modules | ||
compressionLevel: mixed | ||
|
||
enableGlobalCache: false | ||
|
||
plugins: | ||
- path: .yarn/plugins/@yarnpkg/plugin-version.cjs | ||
spec: "@yarnpkg/plugin-version" | ||
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs | ||
spec: "@yarnpkg/plugin-workspace-tools" | ||
nodeLinker: node-modules | ||
|
||
yarnPath: .yarn/releases/yarn-3.4.1.cjs | ||
yarnPath: .yarn/releases/yarn-4.1.1.cjs |
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,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
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,3 @@ | ||
module.exports = { | ||
presets: [require.resolve("@docusaurus/core/lib/babel/preset")] | ||
} |
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,4 @@ | ||
{ | ||
"label": "API", | ||
"position": 2 | ||
} |
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 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# API Docs | ||
|
||
Read the documentation of the API and try it out: [Bandada API Docs](https://api.bandada.pse.dev/). |
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,211 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
import Tabs from "@theme/Tabs" | ||
import TabItem from "@theme/TabItem" | ||
|
||
# API SDK | ||
|
||
[The API SDK JavaScript package](https://github.com/privacy-scaling-explorations/bandada/tree/main/libs/api-sdk) provides a list of functions to make it easier to work with the Bandada API. | ||
|
||
Example of project using the API SDK library: [bandada-api-sdk-demo](https://github.com/bandada-infra/bandada-sdk-demo). | ||
|
||
## Install library | ||
|
||
<Tabs | ||
defaultValue="npm" | ||
groupId="package-managers" | ||
values={[ | ||
{label: 'npm', value: 'npm'}, | ||
{label: 'Yarn', value: 'yarn'}, | ||
{label: 'pnpm', value: 'pnpm'} | ||
]}> | ||
<TabItem value="npm"> | ||
|
||
```bash | ||
npm install @bandada/api-sdk | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="yarn"> | ||
|
||
```bash | ||
yarn add @bandada/api-sdk | ||
``` | ||
|
||
</TabItem> | ||
<TabItem value="pnpm"> | ||
|
||
```bash | ||
pnpm add @bandada/api-sdk | ||
``` | ||
|
||
</TabItem> | ||
</Tabs> | ||
|
||
## Create a new instance | ||
|
||
\# **new ApiSdk**(url: SupportedUrl | string, config?: object): _ApiSdk_ | ||
|
||
Creates a new instance of ApiSdk using the API URL and the [config](https://axios-http.com/docs/req_config). | ||
|
||
- Creates a new instance using the production Bandada API URL and the default config. | ||
|
||
This is what you need if you are using the production Bandada API. | ||
|
||
```ts | ||
import { ApiSdk } from "@bandada/api-sdk" | ||
|
||
const apiSdk = new ApiSdk() | ||
``` | ||
|
||
- Creates a new instance using a [Supported URL](https://github.com/privacy-scaling-explorations/bandada/blob/main/libs/api-sdk/src/types/index.ts#L43). | ||
|
||
This is useful when working with the development environment. | ||
|
||
```ts | ||
import { ApiSdk, SupportedUrl } from "@bandada/api-sdk" | ||
|
||
const apiSdk = new ApiSdk(SupportedUrl.DEV) | ||
``` | ||
|
||
- Creates a new instance using a custom API URL. | ||
|
||
```ts | ||
import { ApiSdk } from "@bandada/api-sdk" | ||
|
||
const apiSdk = new ApiSdk("https://example.com/api") | ||
``` | ||
|
||
- Creates a new instance using a custom API URL and config. | ||
|
||
```ts | ||
import { ApiSdk } from "@bandada/api-sdk" | ||
|
||
const url = "https://example.com/api" | ||
const config = { | ||
headers: { | ||
"Content-Type": "text/html" | ||
} | ||
} | ||
const apiSdk = new ApiSdk(url, config) | ||
``` | ||
|
||
## Get groups | ||
|
||
\# **getGroups**(): _Promise\<GroupResponse[]>_ | ||
|
||
Returns the list of groups. | ||
|
||
```ts | ||
const groups = await apiSdk.getGroups() | ||
``` | ||
|
||
## Get group | ||
|
||
\# **getGroup**(): _Promise\<GroupResponse>_ | ||
|
||
Returns a specific group. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
|
||
const group = await apiSdk.getGroup(groupId) | ||
``` | ||
|
||
## Is group member | ||
|
||
\# **isGroupMember**(): _Promise\<boolean>_ | ||
|
||
Returns true if the member is in the group and false otherwise. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberId = "1" | ||
|
||
const isMember = await apiSdk.isGroupMember(groupId, memberId) | ||
``` | ||
|
||
## Generate merkle proof | ||
|
||
\# **generateMerkleProof**(): _Promise\<string>_ | ||
|
||
Returns the Merkle Proof for a member in a group. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberId = "1" | ||
|
||
const proof = await apiSdk.generateMerkleProof(groupId, memberId) | ||
``` | ||
|
||
## Add member using an API Key | ||
|
||
\# **addMemberByApiKey**(): _Promise\<void>_ | ||
|
||
Adds a member to a group using an API Key. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberId = "1" | ||
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc" | ||
|
||
await apiSdk.addMemberByApiKey(groupId, memberId, apiKey) | ||
``` | ||
|
||
## Add members using an API Key | ||
|
||
\# **addMembersByApiKey**(): _Promise\<void>_ | ||
|
||
Adds multiple members to a group using an API Key. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberIds = ["1", "2", "3"] | ||
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc" | ||
|
||
await apiSdk.addMembersByApiKey(groupId, memberIds, apiKey) | ||
``` | ||
|
||
## Add member using an invite code | ||
|
||
\# **addMemberByInviteCode**(): _Promise\<void>_ | ||
|
||
Adds a member to a group using an Invite Code. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberId = "1" | ||
const inviteCode = "MQYS4UR5" | ||
|
||
await apiSdk.addMemberByInviteCode(groupId, memberId, inviteCode) | ||
``` | ||
|
||
## Remove member using an API Key | ||
|
||
\# **removeMemberByApiKey**(): _Promise\<void>_ | ||
|
||
Removes a member from a group using an API Key. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberId = "1" | ||
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc" | ||
|
||
await apiSdk.removeMemberByApiKey(groupId, memberId, apiKey) | ||
``` | ||
|
||
## Remove members using an API Key | ||
|
||
\# **removeMembersByApiKey**(): _Promise\<void>_ | ||
|
||
Removes multiple members from a group using an API Key. | ||
|
||
```ts | ||
const groupId = "10402173435763029700781503965100" | ||
const memberIds = ["1", "2", "3"] | ||
const apiKey = "70f07d0d-6aa2-4fe1-b4b9-06c271a641dc" | ||
|
||
await apiSdk.removeMembersByApiKey(groupId, memberIds, apiKey) | ||
``` |
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 @@ | ||
--- | ||
sidebar_position: 3 | ||
--- | ||
|
||
# FAQ |
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 @@ | ||
--- | ||
sidebar_position: 1 | ||
slug: / | ||
--- | ||
|
||
# What is Bandada? | ||
|
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,16 @@ | ||
--- | ||
sidebar_position: 4 | ||
--- | ||
|
||
import RenderArticles from "../src/components/RenderArticles" | ||
import RenderVideos from "../src/components/RenderVideos" | ||
|
||
# Resources | ||
|
||
## Articles | ||
|
||
<RenderArticles/> | ||
|
||
## Videos | ||
|
||
<RenderVideos/> |
Oops, something went wrong.