Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions dapp-template/QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Base URL on this line shows galaswap -

Should this include a /v1 like the CreateHeadlessWallet above? Or is this actually like the others that go to the gateway and should the https://api-galaswap.gala.com be removed?


## Block Explorer

Expand Down
6 changes: 3 additions & 3 deletions dapp-template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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=<my project id>
```

Expand Down
4 changes: 2 additions & 2 deletions dapp-template/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand All @@ -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 })
Expand Down
2 changes: 1 addition & 1 deletion dapp-template/src/components/Balance.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion dapp-template/src/components/BurnGala.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion dapp-template/src/components/TransferGala.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
88 changes: 0 additions & 88 deletions dapp-template/src/components/WalletConnect.vue

This file was deleted.

6 changes: 3 additions & 3 deletions dapp-template/src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// <reference types="vite/client" />

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
}

Expand Down