Skip to content

Commit

Permalink
chore(xcm-api): Remove -hash
Browse files Browse the repository at this point in the history
  • Loading branch information
dudo50 committed Nov 23, 2024
1 parent 973dfde commit a97b990
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions apps/xcm-api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@ Possible parameters:
NOTICE:
- The latest version switched to the POST method for XCM Transfers, but we kept GET method support. It will however be deprecated at some point. Please consider switching to POST method.
- API now returns you transaction hash instead of transaction instruction that needs to be parsed! Implementation is as easy as api.tx(receivedHash).
- `-hash` is now deprecated and endpoint format returned back to be without -hash. Eg. 'x-transfer' instead of 'x-transfer-hash'
```

```js
//Construct XCM call from Relay chain to Parachain (DMP)
const response = await fetch('http://localhost:3001/x-transfer-hash', {
const response = await fetch('http://localhost:3001/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand All @@ -71,7 +72,7 @@ const response = await fetch('http://localhost:3001/x-transfer-hash', {
});

//Construct XCM call from Parachain chain to Relay chain (UMP)
const response = await fetch('http://localhost:3001/x-transfer-hash', {
const response = await fetch('http://localhost:3001/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand All @@ -85,7 +86,7 @@ const response = await fetch('http://localhost:3001/x-transfer-hash', {
});

//Construct XCM call from Parachain to Parachain (HRMP)
const response = await fetch('http://localhost:3001/x-transfer-hash', {
const response = await fetch('http://localhost:3001/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand All @@ -102,7 +103,7 @@ const response = await fetch('http://localhost:3001/x-transfer-hash', {

//Construct custom multilocation XCM call from Parachain to Parachain (HRMP)
//Multilocations can be customized for Destination, Address and Currency.
const response = await fetch('http://localhost:3001/x-transfer-hash', {
const response = await fetch('http://localhost:3001/x-transfer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -154,7 +155,7 @@ Possible parameters:
- `fungible` (Inside JSON body): (required): Represents the asset being claimed. It should be a multilocation.

```js
const response = await fetch('http://localhost:3001/asset-claim-hash', {
const response = await fetch('http://localhost:3001/asset-claim', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down Expand Up @@ -220,7 +221,7 @@ Possible parameters:
- `injectorAddress`: (required): Specifies the sender's address.

```js
const response = await fetch('http://localhost:3001/router-hash', {
const response = await fetch('http://localhost:3001/router', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down

0 comments on commit a97b990

Please sign in to comment.