multi-chain identities linking protocol
Ark Network is a protocol for verified multi-chain addresses (identities) linking. The protocol consists of an oracle address on Arweave network and other data registry contracts on EVM (and possibly non-EVM chains) with a validation backend. The protocol support Telegram identity linkage with the multi-chain addresses as well.
Ark V1 Node (Ark Network) has been deprecated in favor of Ark V2 (Ark Protocol), the current node does not process the verification of any new identity linking request. However, it is still available in read mode only. Check Ark Protocol - V2 here!
git clone https://github.com/decentldotland/ark-network.git
cd ark-network
npm install .
npm run polling
The repository ark-network
is built with ES6 syntax, therefore building with truffle is not compatible
mkdir ark-deploy
cd ark-deploy
truffle init
cp -r ark-network/contracts ark-deploy
Make sure to edit 2_deploy_contract.js
to add the contract's constructor arguments inside the /migrations
directory.
truffle dev
truffle compile
truffle migrate --network ganache
1- The user invoke linkIdentity("ARWEAVE_ADDRESS")
function in the EVM registry contract.
2- The user invoke linkIdentity("EVM_ADDRESS", "EVM_INVOC_TXID_FROM_1", "EVM_NETWORK_KEY)
function in the Arweave oracle address.
3- The non-verified identity get added in the Arweave oracle address:
//user_object
{
"arweave_address": "AeK_9yb3f3HEK1Gzwky6tIx8ujW9Pxr_FkhCkWftFtw", // the TX caller address
"evm_address": "0x197f818c1313dc58b32d88078ecdfb40ea822614", // the EVM identity to be verified
"verification_req": "0x5030f945f09e39af85986807293220b1daa736fdee6b490ae78eb150f155072d", // TXID of the interaction with the EVM sc
"ver_req_network": "AURORA-TESTNET", // the network KEY, where the verification_req took place
"telegram_username": null,
"identity_id": "ALcuqH1FfQvmx-8lL9P_fZJQQp0XUkcg7Sw5-PH9R7Q", // auto-generated, the SWC interactionTX.ID
"is_verified": false, // initial value
"is_evaluated": false, // initial value
"last_modification": 953910
}
4- The node listens for new non-evaluated interactions (TXs) with the Arweave oracle SWC.
5- For non-evaluated TX, the node call getTransactionReceipt(verification_req)
and get TX's metadata.
6- The metadata are used to validate that the 1
and 2
have been invoked by the same persona.
7- If the EVM TX logs (emmited events) match the 3
TX's property user_object.arweave_address
-- the identity is considered valid.
8- The contract's admin invoke verifyIdentity("arweave_address")
in the Arweave SWC address:
// user_object
{
"arweave_address": "AeK_9yb3f3HEK1Gzwky6tIx8ujW9Pxr_FkhCkWftFtw",
"evm_address": "0x197f818c1313dc58b32d88078ecdfb40ea822614",
"verification_req": "0x5030f945f09e39af85986807293220b1daa736fdee6b490ae78eb150f155072d",
"ver_req_network": "AURORA-TESTNET",
"telegram_username": null,
"identity_id": "ALcuqH1FfQvmx-8lL9P_fZJQQp0XUkcg7Sw5-PH9R7Q",
"is_verified": true,
"is_evaluated": true,
"last_modification": 965730,
"last_validation": 965730,
"validator": "vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0"
}
If the user add his Telegram username in the 2
function invocation, it's required to add his user_object.identity_id
in his Telegram bio under the form of ark:identity_id
.
The node will GET
the user's telegram profile by hitting his username, extract the bio and compare it to hsi user_object.identity_id
. The logic behind Telegram identity verification can be found here.
set of public API methods for the Ark Network node
- API endpoint (development - testnet): https://ark-api.decent.land/v1/
GET /oracle/state
Reponse example: return a cached state of the Ark oracle smartweave oracle address
{
"res": [
{
"arweave_address": "AeK_9yb3f3HEK1Gzwky6tIx8ujW9Pxr_FkhCkWftFtw",
"evm_address": "0x197f818c1313dc58b32d88078ecdfb40ea822614",
"verification_req": "0x5030f945f09e39af85986807293220b1daa736fdee6b490ae78eb150f155072d",
"ver_req_network": "AURORA-TESTNET",
"telegram_username": null,
"identity_id": "ALcuqH1FfQvmx-8lL9P_fZJQQp0XUkcg7Sw5-PH9R7Q",
"is_verified": false,
"is_evaluated": true,
"last_modification": 965730,
"last_validation": 965730,
"validator": "vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0"
},
{
"arweave_address": "vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0",
"evm_address": "0x197f818c1313dc58b32d88078ecdfb40ea822614",
"verification_req": "0x5030f945f09e39af85986807293220b1daa736fdee6b490ae78eb150f155072d",
"ver_req_network": "AURORA-TESTNET",
"telegram_username": null,
"identity_id": "ZEJzVwFjdZPkuJiU6peJFF4FshYu5lAAgXn3jo__eE8",
"is_verified": true,
"is_evaluated": true,
"last_modification": 965736,
"last_validation": 965736,
"validator": "vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0"
}
]
}
GET /network/stats
Response example:
{"users_count":1,"hashed_state":"9cc5786936b0f5c3507a3f87594e562d3367ee8e6c86417c7c5110807038711e","last_cached_block":965761}
GET /network/addresses
Reponse example: return the validators addresses and the smart contracts addresses
{
"validators": ["vZY2XY1RD9HIfWi8ift-1_DnHLDadZMWrufSh-_rKF0"],
"arweave_oracle_addr": {
"addr": "5H5Hj81G5j5P2raDhe5VFU-zkf08KDc588GJ8dtlHTw",
"network": "arweave-mainnet"
},
"eth_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "goerli&&mainnet"
},
"aurora_oracle_addr": {
"addr": "0xfb0200C27185185D7DEe0403D5f102ADb59B7c34",
"network": "aurora-testnet"
},
"bsc_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "bsc-mainnet"
},
"avalanche_oracle_addr": {
"addr": "0xE5E0A3380811aD9380F91a6996529da0a262EcD1",
"network": "avax-c-chain"
},
"ftm_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "ftm-mainnet"
},
"optimism_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "optimism-mainnet"
},
"arbitrum_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "arbitrum-one"
},
"polygon_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "polygon-mainnet"
},
"near_mainnet_addr": {
"addr": "ark_station_1.near",
"network": "near-mainnet"
},
"neon_devnet_oracle_addr": {
"addr": "0xdE44d3fB118E0f007f2C0D8fFFE98b994383949A",
"network": "neon-devnet"
}
}
To get the active Arweave oracle contract, always use the arweave_oracle_addr
from /network/addresses
GET /ark/profile/:network/:address/:compress?
network
can be either arweave
or evm
- and thus address
should be on the equivalent network.
Response: return user's Ark identity multichain metadata.
This project is licensed under the MIT license.