Litentry Doc

Establishing XCM communication with Litentry

Horizontal Relay-routed Message Passing (HRMP) bi-directional communication between Litentry and other Parachains.
Cross-Consensus Messaging (XCM) Format was first mentioned in Polkadot’s documentation. It evolved from Cross-Chain Messaging Format to become a robust architectural style of message transfer for more than chains but also pallets, smart contracts, bridges, and sharded enclaves. XCM is not a protocol. As such, it cannot parse messages across consensus by itself. Rather, it is a format for how message transfer should be performed and a language for ideas between consensus systems.
The architecture of Polkadot and Kusama allows the interoperability of parachains, enabling the cross-chain transfer of assets and data. To achieve this, an XCM format defines the language around how the message between two chains should be parsed. Since XCM is now available on Polkadot and Kusama. Litentry/Litmus being Parachains of the two relaychains have now opened XCM channel for any parachain in the ecosystem that wishes to partner with us.
The process involves gaining access to bi-directional communication between us and the parachains. This involves opening an outbound and accepting inbound Horizontal Relay-routed Message Passing (HRMP) channel by the two parachains.
The following is a quick summary for partners wishing to establish XCM Channel with Litentry/Litmus.
Sovereign account on Relay
Sovereign account on Sibling Parachain
Below is the Litentry/Litmus Native Token LIT Multilocation information:
Multilocation {parents:1, interior: [Parachain: parachain_id, PalletInstance(10)] }
Multilocation {parents:0, interior: [PalletInstance(10)] }
And the current weight we charge for each individual XCM command:
UnitWeightCost: XcmV2Weight = 200_000_000u64;
(In Litentry/Litmus, 1 LIT in the real world= 1_000_000_000_000 Weight)

How to Establish XCM Channel with Litentry/Litmus.

The XCM Fungible Asset Implementation Guide by Open Web3 Stack - the common-good collection of libraries to accelerate application development on Substrate has explained cross-consensus fungible asset design discussions and considerations. It also provided detailed information regarding orml-xtokens that Litentry/Litmus and many other parachains have adopted and currently testing.
Each parachain has its native token and parachains that want seamless communication between them and other parachains in terms of asset transfer, orml-xtokens can be used as a reference implementation in this regard. Follow the steps below to establish XCM channel between your parachain and Litentry/Litmus:

Step 1: Communicate with Litentry Team and submit your info

We will need the exact same information as the summary provided above. Please connect with the Litentry team via Telegram.

Step 2: Sending/Accepting HRMP Open Channel Request

Next, both partner parachain and Litentry/Litmus parachain need to send two XCM requests (Open and Accept) to Relaychain. Once the transactions are mutually matched, the HRMP channel will be established.
To do this, select the correct Relaychain (in this example, we use Kusama) as shown in 1 below and select Extrinsincs from the drop-down options on the Developer tab.
Next, select HRMP from the "Submit the following Extrinsics" drop-down options and chose hrmpInitOpenChannel(recipient, proposedMaxCapacity, proposedMaxMessageSize) in the part labeled 1 below:
Next, enter the Parachain ID of your partner parachain in the recipient: u32 (ParaId) dialogue box as shown below and enter a safe estimate of your channel usage limit in the proposedMaxCapacity: u32, and proposedMaxMessageSize: u32 dialogue boxes as shown below and hit the "Submit Transaction" button.
Open HRMP Channel Request Sample
Next, chose hrmpAcceptOpenChannel(sender) as shown below to accept the pending open channel request from the sender, enter the sender's parachain ID, then hit the "Submit Transaction" button.
Accept HRMP Channel Request Sample
The transactions above should be sent through XCM to Relay by your sovereign account. Please refer to polkadot official documents and for more details.

Step 3: Accepting/Waiting for Litentry Parachain's HRMP transaction

The Litentry Team will also send HRMP Channel transactions and once mutually matched, the HRMP channel will be established.