Skip to content

Commit 6d8ff09

Browse files
authored
Merge pull request #228 from cosmology-tech/injective-examples
use newest interchainjs for injective
2 parents 4d356fa + c24d49c commit 6d8ff09

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+5289
-176
lines changed

examples/asset-list/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@
5353
"typescript": "^5.1.6"
5454
},
5555
"packageManager": "[email protected]"
56-
}
56+
}

examples/authz/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,4 @@
8383
"typescript": "^5.1.6"
8484
},
8585
"packageManager": "[email protected]"
86-
}
86+
}

examples/grpc-web-grpc-gateway/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@
5656
"generate-lockfile": "0.0.12",
5757
"typescript": "^5.1.6"
5858
}
59-
}
59+
}

examples/ibc-transfer/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@
5353
"typescript": "^5.1.6"
5454
},
5555
"packageManager": "[email protected]"
56-
}
56+
}

examples/injective-vue/.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
pnpm-debug.log*
8+
lerna-debug.log*
9+
10+
node_modules
11+
dist
12+
dist-ssr
13+
*.local
14+
15+
# Editor directories and files
16+
.vscode/*
17+
!.vscode/extensions.json
18+
.idea
19+
.DS_Store
20+
*.suo
21+
*.ntvs*
22+
*.njsproj
23+
*.sln
24+
*.sw?
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"Vue.volar"
4+
]
5+
}

examples/injective-vue/README.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Introduction
2+
This example demonstrates the usage of Vue composables provided by [@interchain-kit/vue](https://github.com/cosmology-tech/interchain-kit/tree/main/packages/vue) and generated by [telescope](https://github.com/cosmology-tech/telescope).
3+
## Directory Structure
4+
```
5+
├── src/
6+
│ ├── codegen # containing vue composables generated by `telescope`
7+
│ ├── components/
8+
│ │ ├── asset-list/
9+
│ │ ├── authz/
10+
│ │ ├── provide-liquidity/
11+
│ │ ├── stake-tokens/
12+
│ │ └── voting/
13+
│ ├── composables/
14+
│ │ ├── asset-list/
15+
│ │ ├── authz/
16+
│ │ ├── common/
17+
│ │ ├── injective/
18+
│ │ ├── provide-liquidity/
19+
│ │ ├── stake-tokens/
20+
│ │ └── voting/
21+
│ ├── utils/
22+
│ │ ├── asset-list/
23+
│ │ ├── authz/
24+
│ │ ├── provide-liquidity/
25+
│ │ ├── stake-tokens/
26+
│ │ └── voting/
27+
│ ├── views/
28+
│ │ ├── asset-list.vue
29+
│ │ ├── authz.vue
30+
│ │ ├── index.vue
31+
│ │ └── voting.vue
32+
│ ├── router.ts
33+
│ ├── utils/
34+
│ ├── App.vue
35+
│ └── main.ts
36+
```
37+
## Pages
38+
39+
### Asset List
40+
- **Completion Status:** ✅ Completed
41+
- **Functionalities:**
42+
- Wallet connect
43+
- Assets display
44+
- IBC transfer
45+
- **Telescope generated `Vue Composables` Used:**
46+
```ts
47+
cosmos.bank.v1beta1.useBalance
48+
cosmos.bank.v1beta1.useAllBalances
49+
cosmos.staking.v1beta1.useDelegatorDelegations
50+
osmosis.gamm.v1beta1.usePools
51+
```
52+
- **`msgType`s are signAndBroadcasted:**
53+
```ts
54+
/ibc.applications.transfer.v1.MsgTransfer
55+
```
56+
57+
### Auth
58+
- **Completion Status:** ✅ Completed
59+
- **Functionalities:**
60+
- Vote permission granting and revoking
61+
- Send permission granting and revoking
62+
- Delegate permission granting and revoking
63+
- Claim rewards granting and revoking
64+
- **Telescope generated `Vue Composables` Used:**
65+
```ts
66+
cosmos.authz.v1beta1.useGranterGrants
67+
cosmos.authz.v1beta1.useGranteeGrants
68+
cosmos.staking.v1beta1.useValidators
69+
```
70+
- **`msgType`s are signAndBroadcasted:**
71+
```ts
72+
/cosmos.authz.v1beta1.MsgRevoke
73+
/cosmos.authz.v1beta1.MsgGrant
74+
```
75+
76+
### Voting
77+
- **Completion Status:** ✅ Completed
78+
- **Functionalities:**
79+
- Proposals display
80+
- Proposal voting
81+
- **Telescope generated `Vue Composables` Used:**
82+
```ts
83+
cosmos.gov.v1.useProposals
84+
cosmos.gov.v1.useParams
85+
cosmos.gov.v1.useProposals
86+
cosmos.staking.v1beta1.usePools
87+
```
88+
- **`msgType`s are signAndBroadcasted:**
89+
```ts
90+
/cosmos.gov.v1.MsgVote
91+
```
92+
93+
### Injective
94+
- **Completion Status:** ✅ Completed
95+
- **Functionalities:**
96+
- inj balance display
97+
- inj tokens transfer
98+
- **Telescope generated `Vue Composables` Used:**
99+
```ts
100+
cosmos.bank.v1beta1.useBalance
101+
```
102+
- **`msgType`s are signAndBroadcasted:**
103+
```ts
104+
/cosmos.bank.v1beta1.MsgSend
105+
```
106+
### Stake tokens
107+
- **Completion Status:** ⏳ In Progress... 50% done.
108+
- **Functionalities:**
109+
- all validators display
110+
- validators display for a specified address
111+
- claimable rewards display
112+
- staked tokens display for a specified chain
113+
- claim rewards
114+
- manage validators
115+
- **Telescope generated `Vue Composables` Used:**
116+
```ts
117+
cosmos.mint.v1beta.useAnnualProvisions
118+
cosmos.distribution.v1beta1.useParams
119+
cosmos.distribution.v1beta1.useDelegationTotalRewards
120+
codegen.cosmos.staking.v1beta1.useDelegatorValidators
121+
cosmos.staking.v1beta1.useParams
122+
```
123+
- **`msgType`s are signAndBroadcasted:**
124+
```ts
125+
```
126+
127+
### Provide Liquidity
128+
- **Completion Status:** ⏳ In Progress...
129+
130+
### Swap tokens
131+
- **Completion Status:** ⏳ In Progress...
132+
133+
### NFT
134+
- **Completion Status:** ⏳ In Progress...
135+
136+
### Rollkit
137+
- **Completion Status:** ⏳ In Progress...
138+
139+
### Grpc Web & Grpc Gateway
140+
- **Completion Status:** ⏳ In Progress...

examples/injective-vue/index.html

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Vite + Vue + TS</title>
8+
</head>
9+
<body>
10+
<div id="app"></div>
11+
<script type="module" src="/src/main.ts"></script>
12+
</body>
13+
</html>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "injective-vue",
3+
"private": true,
4+
"version": "0.0.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "vue-tsc -b && vite build",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"@chain-registry/v2": "^1.71.44",
13+
"@chain-registry/v2-types": "^0.53.20",
14+
"@cosmjs/amino": "^0.32.4",
15+
"@cosmjs/stargate": "^0.32.4",
16+
"@interchain-kit/core": "^0.0.1-beta.39",
17+
"@interchain-kit/keplr-extension": "^0.0.1-beta.39",
18+
"@interchain-kit/leap-extension": "^0.0.1-beta.39",
19+
"@interchain-kit/vue": "^0.0.1-beta.38",
20+
"@interchain-ui/vue": "^1.4.1",
21+
"@interchainjs/cosmos": "1.6.1",
22+
"@interchainjs/injective": "1.6.1",
23+
"@tanstack/vue-query": "5.62.7",
24+
"interchain-vue": "1.6.2",
25+
"osmojs": "^16.15.0",
26+
"vue": "^3.5.13",
27+
"vue-router": "^4.5.0"
28+
},
29+
"devDependencies": {
30+
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
31+
"@vitejs/plugin-vue": "^5.2.1",
32+
"typescript": "~5.6.2",
33+
"vite": "^6.0.0",
34+
"vue-tsc": "^2.1.10"
35+
}
36+
}
Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)