Skip to content

Latest commit

 

History

History
57 lines (40 loc) · 2.35 KB

api-reference.mdx

File metadata and controls

57 lines (40 loc) · 2.35 KB
sidebar_label description
API reference
This page contains technical resources related to the Polygon ID State Replication.

import OutLink from "@site/src/components/OutLink";

Polygon ID State Replication: API reference

This page contains technical resources related to the Polygon ID State Replication.

Demo DApp

Users can check out how the state replication works using our demo DApp. Leveraging the state replication lets users submit a Polygon ID zero-knowledge proof on Ethereum. Users get an SBT as a reward.

Testnet(Sepolia): https://polygon.mainnet-beta.rarimo.com/

Identity relayer

This service replicates GIST roots and identity states on demand. Call it before submitting proof on the destination chain.

  • GitGub: https://rarimo.github.io/identity-relayer-svc/
  • API Reference: https://rarimo.github.io/rarimo-core/docs/common/bridging/002-identity.html
  • Testnet URI: https://api.mainnet-beta.rarimo.com/integrations/relayer/

Relayer endpoints

To perform state publishing, you can execute POST /integrations/relayer/state/relay request with the following body:

{
  "chain": "Ethereum",
  "hash": "0x212bc6f8194aa63eee97b0566b7cd65c66bb57cc4936c11e611f1042bb0b7118",
  "waitConfirm": true
}

To perform GIST publishing, you can execute POST /integrations/relayer/gist/relay request with the following body:

{
  "chain": "Ethereum",
  "hash": "0x1e4b74c14388fbfca27496828d24c248637792eb0286e7519860abb3ec01bc70",
  "waitConfirm": true
}
  • "chain": "chain_name" - chain, to which the state (or gist) will be relayed;
  • "hash": "0x..." - hash of the state (or gist) to relay. Same as on the state contract in 0x... hex format;
  • "waitConfirm": true indicates whether the request should wait until the transaction is included in the block (false by default);

The response codes:

  • 200 - successful relay, body contains tx hash;
  • 404 - the state is not transferred yet; try to repeat the request later;
  • 400 - state has been relayed before;