Skip to content

Commit

Permalink
GITBOOK-18: added users and am fixing for users with screenshots
Browse files Browse the repository at this point in the history
  • Loading branch information
nadabots authored and gitbook-bot committed Feb 17, 2024
1 parent 5861a14 commit 71d841c
Show file tree
Hide file tree
Showing 15 changed files with 140 additions and 73 deletions.
Binary file added .gitbook/assets/3rdpartyverify.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/addstamptransactiondetails.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/addstampwallet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/getcheck.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/nadabotprofile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/nadabotsearch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/toverifystamp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .gitbook/assets/updatedpoints.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ We are looking to create a trusted and inclusive web3 environment by eliminating
* **✅ Sybil providers:** add additional checks to get users to verify with you service
* **📲 Applications / Protocols:** integrate our contract via cross contract call to enforce bot protection

{% content-ref url="guides/for-users.md" %}
[for-users.md](guides/for-users.md)
{% content-ref url="guides/for-users/" %}
[for-users](guides/for-users/)
{% endcontent-ref %}

{% content-ref url="guides/for-sybil-providers.md" %}
Expand Down
3 changes: 2 additions & 1 deletion SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

## 📖 Guides

* [👨💼 For Users](guides/for-users.md)
* [👨💼 For Users](guides/for-users/README.md)
* [🔍 Find Other Users](guides/for-users/find-other-users.md)
* [✅ For Sybil Providers](guides/for-sybil-providers.md)
* [📱 For Applications](guides/for-applications.md)
* [🤖 For Bots](guides/for-bots.md)
Expand Down
37 changes: 33 additions & 4 deletions guides/for-applications.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@ If you want to integrate us this usually means you are building an application o

## Front End Gating

### BOS/NEARJS

[NEARJS](https://docs.near.org/bos)/BOS is a framework for front end development that stores front end JSX code on chain that can be accessed across different gateways / web apps that support the BOS VM. NEAR API JS is built in. Here is an easy way to detect human checks

#### Check Contract for Human

{% hint style="info" %}
Humans are calculated by adding assigned weights of stamps a user has, against a set of rules of how stamps interacts, against a human threshold. If the account that is being checked passes the human threshold score after being called than an account is considered a human
{% endhint %}

[https://near.social/plugrel.near/widget/nadabot\_human](https://near.social/plugrel.near/widget/nadabot\_human) (Example of BOS helper component)

```jsx
// check is_human method that enables
const accountId = props.accountId ?? "odins_eyehole.near";

Near.asyncView("v1.nadabot.near", "is_human", { account_id: accountId }).then(
(result) => {
State.update({ human: result });
}
);

return <>{state.human && <span></span>}</>;
```
##
## VanillaJS
Check out the NEAR Docs to get a better sense of how to integrate in the front end. If you are using a javascript front end library you will most likely be integrating with our contract via NEAR API JS
Expand Down Expand Up @@ -60,13 +89,13 @@ async function checkIsHuman(accountId) {
}

const contract = new wallet.account().contract({
viewMethods: ['isHuman'],
viewMethods: ['is_human'],
changeMethods: [],
});

try {
const isHuman = await contract.isHuman({ account_id: accountId });
let grantAccess = isHuman;
const isHuman = await contract.is_human({ account_id: accountId });
let grantAccess = is_human;
console.log("Grant Access: ", grantAccess);

// Additional logic based on grantAccess
Expand All @@ -86,7 +115,7 @@ This code does the following:
1. Initializes a connection to the NEAR blockchain using the `near-api-js` library.
2. Sets up the NEAR Wallet Selector, which allows users to log in using various NEAR wallets.
3. Checks if the user is logged in; if not, shows a popup modal prompting them to sign in.
4. Once logged in, it calls the `isHuman` view method on the `sybil.potlock.near` contract, passing the specified `accountId`.
4. Once logged in, it calls the `is_human` view method on the `v1.nadabot.near` contract, passing the specified `accountId`.
5. The result (true/false) is saved in the `grantAccess` variable and can be used for further logic.
Make sure to handle the UI elements (like the popup modal) according to your application's frontend framework or library. The above code assumes a basic JavaScript setup and will need to be adapted to fit your specific implementation details.
Expand Down
22 changes: 10 additions & 12 deletions guides/for-sybil-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Want us to add your verification process inside of our human registry? \
## Benefits

* Get people sent to you through our aggregator
* Have all the applications that emit our contracts automatically integrate yourselve
* Have all the applications that emit our contracts automatically integrate yourself

{% hint style="info" %}
Have a stamp idea and want the ecosystem to build it, post on github at [https://nada.bot/request-stamp](https://nada.bot/request-stamp) OR want to build an idea the ecosysstem has had for stamp, check out the idea board at [https://nada.bot/requests](https://nada.bot/requests)
Have a stamp idea and want the ecosystem to build it, post on github at [https://nada.bot/request-stamp](https://nada.bot/request-stamp) OR want to build an idea the ecosystem has had for stamp, check out the idea board at [https://nada.bot/requests](https://nada.bot/requests)
{% endhint %}

### Requirements
Expand All @@ -27,15 +27,17 @@ This maybe a specific route of an existing application where you use a third par

* Create a helper view method on a contract that takes in a accountid and returns a boolean
* Add the contract name and method&#x20;
* Create a picture (uploads it to ipfs)
* Create a picture (uploads it to IPFS)
* A clear description of your verification process and what you are verifying
* Estimate gas user needs to verify stamp on your contract (not including what user needs to pay to add stamp to our contract \~0.01N)

First login, click “Submit Check”, then a form will pull up. Submitting of the form requires a transaction
## How to Submit Check - (On Chain)

First login, click “A Custom Check”, then a f[orm will appear.](https://app.nada.bot/add-stamp) Submitting of the form requires a transaction

<figure><img src="../.gitbook/assets/Screenshot 2024-01-05 at 3.01.08 PM.png" alt=""><figcaption><p>Add A Custom Check</p></figcaption></figure>

Fill out all details about your form. Make sure you send a link. The best flow for users is to give an applciation link when after they verify their is redirect back to your check on nada.bot in order to streamline the need for users to also sign a verify transaction to add your stamp to their registry record. Also make sure to clearly describe steps and amount of gas needed.
Fill out all details about your form. Make sure you send a link. The best flow for users is to give an application link when after they verify their is redirect back to your check on nada.bot in order to streamline the need for users to also sign a verify transaction to add your stamp to their registry record. Also make sure to clearly describe steps and amount of gas needed.

\

Expand All @@ -51,7 +53,7 @@ Check out our registry contract to understand how to make your check compatible
### How It Works in Our System

* Afterward our bot prevention team will review the Check and then add a weight on it. (This weight can be changed)
* GIve 2-3 business days to be verified
* Give 2-3 business days to be verified
* You will then be available for other people to verify. After they verify with you they must add a stamp (requires gas) to get their own score up, See proof you are not a bot&#x20;
* If we discover that bots are verifying with your system or any wrong doing your score can get eliminated or your check will be removed from the approve list.

Expand All @@ -61,13 +63,9 @@ Check out our registry contract to understand how to make your check compatible

* **Our Sybil Simulator Contract** [**https://github.com/PotLock/core/tree/main/contracts/sybil\_provider\_simulator**](https://github.com/PotLock/core/tree/main/contracts/sybil\_provider\_simulator)
* NEAR Social Profile Provider - check if someone has a relatively complete NEAR Social Profile [https://github.com/PotLock/near-social-sybil-provider](https://github.com/PotLock/near-social-sybil-provider)

**Other Examples**

* **Wormhol3 Twitter x NEAR Social Cross posting (WIP)** [https://github.com/wormhole3/wormhole3-account-binding](https://github.com/wormhole3/wormhole3-account-binding) (for connecting account with twitter and delegating access to contract to post on NEAR.social)
* Integrations Contract used for Connected Contracts, Account Age, Farcaster, and Lens [https://github.com/Prometheo/sybil-provider/tree/main/src](https://github.com/Prometheo/sybil-provider/tree/main/src)&#x20;
* Holoynm - [https://github.com/holonym-foundation/v3-near-contract](https://github.com/holonym-foundation/v3-near-contract)
* **NDC I Am Human** [https://github.com/near-ndc/i-am-human/tree/master/contracts/human\_checker](https://github.com/near-ndc/i-am-human/tree/master/contracts/human\_checker) (uses fractal face scan for detecting) [https://nearblocks.io/address/registry.i-am-human.near](https://nearblocks.io/address/registry.i-am-human.near) (WIP)
* I-Am-Human registry

I am human is a registry contract that issues SBT based on Fractal's face verification to issue a SBT according to NEP 393. This was using in the first NDC election to verify humans for a vote. We leverage the registry is\_human method to check if someone has a face scan without the need for PotLock's contributor to keep track or having a Fractal api. &#x20;
* Holoynm (WIP) [https://github.com/holonym-foundation/v3-near-contract](https://github.com/holonym-foundation/v3-near-contract)
* **Dapplets using connected Accounts (WIP)** [https://github.com/dapplets/connected-accounts-assembly](https://github.com/dapplets/connected-accounts-assembly)
54 changes: 0 additions & 54 deletions guides/for-users.md

This file was deleted.

74 changes: 74 additions & 0 deletions guides/for-users/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
---
description: For users who are verifying that they are not a bot
---

# 👨💼 For Users

Why Would Users Be Using Nada.bot

_**In order to prove you are not a bot you need to get different “Checks” which involves going to a 3rd party, verifying with their contract, than adding that check to our global registry.**_&#x20;

{% hint style="info" %}
Different applications like PotLock and Cplanet Contensts do cross contract calls that enforce that you are not a bot.&#x20;
{% endhint %}

## What you can do

* Verify with different checks on 3rd party providers&#x20;
* Validate and get a higher score

{% hint style="warning" %}
if you don’t have a wallet than create a NEAR Wallet. If you don’t have one get one at [shard.dog/nadabot](http://shard.dog/nadabot)
{% endhint %}

First you login, where you **start at human score of zero** if you never used the app or added a stamp to our contract. Even if you verified on other applications nada.bot is integrated you must add those checks to the [v1.nadabot.near](../../extra/our-contract.md) contract to get points. You aim is to get past this human score through a collection of stamps/checks. Then you are to look at stamp. Most stamps should say “Get Check”. This means we have checked their contract and you are not verified.

{% embed url="https://www.youtube.com/watch?t=5s&v=d3lPI6io71g" %}

{% hint style="warning" %}
_It is important to note that this account will be the one you use to build your reputation and it cant be transferred to another account, so don’t you lose this._&#x20;
{% endhint %}

Every stamp is a 2 part step

* the page checks if you have that check on that contract -> if you don't it says _**"Get Check"**_ as a tan button, where it takes you to an external link to verify with that sybil provider contract
* you come back to page, now if you successfully got the check on that contract, the stamp will say _**"Verify"**_ in black underneath Pending Verifications. You then need to add that stamp to the nadabot contract to move the stamp in the verified section and get the points associated with that stamp

Repeat to get more points until you are a human

{% hint style="info" %}
But i did the i-am-human stamp? Why am i not a human? I am human is the name of the stamp, but not what it means to be a human on nada.bot. People often buy faces to fake this, and you still need to verify with our nadabot contract to even get the i-am-human stamp counted.
{% endhint %}



Click on a stamp, read the instructions, then click on the get check button. This should take you to a 3rd party link where you need to connect your wallet again and then verify. Note that each verification may require gas an in instruction to load up your account with enough gas to prove this stamp.

<figure><img src="../../.gitbook/assets/getcheck.png" alt=""><figcaption><p>get a check to go to 3rd party app to verify on their contract</p></figcaption></figure>

Every provider will be different and require you connect a 3rd party login, wallet, or even upload documents to update their contracts state. The following example is of the social check

<figure><img src="../../.gitbook/assets/3rdpartyverify.png" alt=""><figcaption><p>Verifying with social check contract verifying that you compelted a social check</p></figcaption></figure>

Once you verify through the sybil provider's application, go back to the [app.nada.bot](https://app.nada.bot) homepage and refresh. There that section should now be in the **Verify** section where we now detect that you have gotten that stamp but you need to pay 0.01 N in order to add the check to our nada.bot check registry to improve your human score. &#x20;

<figure><img src="../../.gitbook/assets/toverifystamp.png" alt=""><figcaption></figcaption></figure>

Once you confirm the transaction you should then see this check in the approve section and your score to go up.

<figure><img src="../../.gitbook/assets/addstamptransactiondetails.png" alt=""><figcaption><p>Example of confirming stamp (add_stamp) on v1.nada.bot.near in order to get the points associated with the stamp - this is on meteor wallet extension</p></figcaption></figure>

<figure><img src="../../.gitbook/assets/updatedpoints.png" alt=""><figcaption><p>In this example at the time the Social Check was 11 points while the points needed to be a human was 20 points. This can change. As you can see 11/20 points is not enough to be a human. You can also see that you can see recent check</p></figcaption></figure>

Now after the transaction you can see the account has 11/20 points because 11 is the number of the Complete NEAR Social Profile check has and 20 is the Human Threshold or the minum amount of points at the time to be a human. This is subject to change. You can also see recent checks so you can see stamps you added. If you scroll all the way to bottom you can also see verified checks

{% hint style="warning" %}
_human threshold is subject ot change or get lower depending on bot activity, as well as weights based on perceived level of difficulty, however your status of verification doesn’t change. Say a weight for a Twitter Check by Shard.dog changes from 1->2 this means, your score will go up._
{% endhint %}

## Other Tutorials

{% content-ref url="find-other-users.md" %}
[find-other-users.md](find-other-users.md)
{% endcontent-ref %}

19 changes: 19 additions & 0 deletions guides/for-users/find-other-users.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
description: >-
You can also find other users to see what checks they have verified and what
score they have directly from the Web app
---

# 🔍 Find Other Users

Go to the Search Bar and type in the accountid

<figure><img src="../../.gitbook/assets/nadabotsearch.png" alt=""><figcaption><p>Its a search bar all you have to do is type</p></figcaption></figure>

## Go to their Profile

If you click on their page you go to their profile and you can see which checks they have verified

<figure><img src="../../.gitbook/assets/nadabotprofile.png" alt=""><figcaption><p>search a persons profile</p></figcaption></figure>

or go directly from the navbar by replace odins\_eyehole.near with {yournearaccountname}.id [https://app.nada.bot/account-info?accountId=odins\_eyehole.near](https://app.nada.bot/account-info?accountId=odins\_eyehole.near)

0 comments on commit 71d841c

Please sign in to comment.