diff --git a/dapp-template/QUICKSTART.md b/dapp-template/QUICKSTART.md index 35ba8e5..b2d0027 100644 --- a/dapp-template/QUICKSTART.md +++ b/dapp-template/QUICKSTART.md @@ -138,16 +138,16 @@ Here's how to implement a token burn transaction: ## API Endpoints Reference ### Docs -- Authentication: `https://gateway.mainnet.galachain.com/docs/?channel=asset&contract=public-key-contract` -- Token Operations: `https://gateway.mainnet.galachain.com/docs/?channel=asset&contract=token-contract` +- Authentication: `https://gateway-mainnet.galachain.com/docs/?channel=asset&contract=public-key-contract` +- Token Operations: `https://gateway-mainnet.galachain.com/docs/?channel=asset&contract=token-contract` - Blocks/Transactions: `https://explorer-api.galachain.com/docs` - GalaSwap API: `https://connect.gala.com/info/api.html` ### Common API Patterns - POST `/api/asset/token-contract/BurnTokens` - POST `/api/asset/token-contract/FetchBalances` -- POST `/api/asset/public-key-contract/GetPublicKey` -- POST `https://api-galaswap.gala.com/galachain/CreateHeadlessWallet` +- POST `https://api-galaswap.gala.com/v1/CreateHeadlessWallet` +- POST `https://api-galaswap.gala.com/galachain/api/asset/public-key-contract/GetPublicKey` ## Block Explorer diff --git a/dapp-template/README.md b/dapp-template/README.md index a9e320d..42a1f1c 100644 --- a/dapp-template/README.md +++ b/dapp-template/README.md @@ -23,9 +23,9 @@ A lightweight application that allows users to connect their wallet, check their 3. Create a `.env` file in the root directory with the following content: ``` - VITE_BURN_GATEWAY_API=https://gateway-mainnet.galachain.com/api/asset/token-contract - VITE_BURN_GATEWAY_PUBLIC_KEY_API=https://gateway-mainnet.galachain.com/api/asset/public-key-contract - VITE_GALASWAP_API=https://api-galaswap.gala.com/galachain + VITE_GATEWAY_TOKEN_API=https://gateway-mainnet.galachain.com/api/asset/token-contract + VITE_GALACONNECT_PUBLIC_KEY_API=https://api-galaswap.gala.com/galachain/api/asset/public-key-contract + VITE_GALACONNECT_API=https://api-galaswap.gala.com/v1 VITE_PROJECT_ID= ``` diff --git a/dapp-template/src/App.vue b/dapp-template/src/App.vue index 71268cc..8e34717 100644 --- a/dapp-template/src/App.vue +++ b/dapp-template/src/App.vue @@ -56,7 +56,7 @@ async function connectWallet() { } async function checkRegistration() { - const response = await fetch(`${import.meta.env.VITE_GATEWAY_API}/GetPublicKey`, { + const response = await fetch(`${import.meta.env.VITE_GALACONNECT_PUBLIC_KEY_API}/GetPublicKey`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ user: walletAddress.value }) @@ -66,7 +66,7 @@ async function checkRegistration() { async function registerUser() { const publicKey = await metamaskClient.getPublicKey() - await fetch(`${import.meta.env.VITE_GALASWAP_API}/CreateHeadlessWallet`, { + await fetch(`${import.meta.env.VITE_GALACONNECT_API}/CreateHeadlessWallet`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ publicKey: publicKey.publicKey }) diff --git a/dapp-template/src/components/Balance.vue b/dapp-template/src/components/Balance.vue index bb55768..609e21c 100644 --- a/dapp-template/src/components/Balance.vue +++ b/dapp-template/src/components/Balance.vue @@ -23,7 +23,7 @@ async function fetchBalance() { if (!props.walletAddress) return try { - const response = await fetch(`${import.meta.env.VITE_BURN_GATEWAY_API}/FetchBalances`, { + const response = await fetch(`${import.meta.env.VITE_GATEWAY_TOKEN_API}/FetchBalances`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ diff --git a/dapp-template/src/components/BurnGala.vue b/dapp-template/src/components/BurnGala.vue index cb77d2a..2f21492 100644 --- a/dapp-template/src/components/BurnGala.vue +++ b/dapp-template/src/components/BurnGala.vue @@ -72,7 +72,7 @@ async function burnTokens() { const signedBurnDto = await props.metamaskClient.sign("BurnTokens", burnTokensDto) - const response = await fetch(`${import.meta.env.VITE_BURN_GATEWAY_API}/BurnTokens`, { + const response = await fetch(`${import.meta.env.VITE_GATEWAY_TOKEN_API}/BurnTokens`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(signedBurnDto) diff --git a/dapp-template/src/components/TransferGala.vue b/dapp-template/src/components/TransferGala.vue index 80f1820..ed0067c 100644 --- a/dapp-template/src/components/TransferGala.vue +++ b/dapp-template/src/components/TransferGala.vue @@ -85,7 +85,7 @@ async function transferTokens() { const signedTransferDto = await props.metamaskClient.sign("TransferTokens", transferTokensDto) - const response = await fetch(`${import.meta.env.VITE_BURN_GATEWAY_API}/TransferToken`, { + const response = await fetch(`${import.meta.env.VITE_GATEWAY_TOKEN_API}/TransferToken`, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(signedTransferDto) diff --git a/dapp-template/src/components/WalletConnect.vue b/dapp-template/src/components/WalletConnect.vue deleted file mode 100644 index bcb13b8..0000000 --- a/dapp-template/src/components/WalletConnect.vue +++ /dev/null @@ -1,88 +0,0 @@ - - - - - \ No newline at end of file diff --git a/dapp-template/src/env.d.ts b/dapp-template/src/env.d.ts index 824c63c..9dfd30a 100644 --- a/dapp-template/src/env.d.ts +++ b/dapp-template/src/env.d.ts @@ -1,9 +1,9 @@ /// interface ImportMetaEnv { - readonly VITE_BURN_GATEWAY_API: string - readonly VITE_BURN_GATEWAY_PUBLIC_KEY_API: string - readonly VITE_GALASWAP_API: string + readonly VITE_GATEWAY_TOKEN_API: string + readonly VITE_GALACONNECT_PUBLIC_KEY_API: string + readonly VITE_GALACONNECT_API: string readonly VITE_PROJECT_ID: string }