Skip to content

Commit

Permalink
Merge pull request #9 from atmoner/dev
Browse files Browse the repository at this point in the history
Update generated doc!
  • Loading branch information
atmoner authored Nov 6, 2023
2 parents 9a85cee + 9874070 commit f2d9784
Show file tree
Hide file tree
Showing 67 changed files with 2,067 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ src/.vuepress/.cache/
src/.vuepress/.temp/
src/.vuepress/dist/
generate.js
generate-query.js
8 changes: 6 additions & 2 deletions src/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ import { navbar } from "vuepress-theme-hope";

export default navbar([
"/",
"/stargate/",
"/query/",
"/stargate/",
{
text: "Query examples",
prefix: "query/",
link: "query/",
},
{
text: "Broadcast examples",
prefix: "broadcast/",
Expand Down
9 changes: 8 additions & 1 deletion src/.vuepress/sidebar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ export default sidebar({
prefix: "tips/",
link: "tips/",
children: "structure",
}
}/* ,
{
text: "test",
icon: "book",
prefix: "query-test/",
link: "query-test/",
children: "structure",
} */
],
});
35 changes: 35 additions & 0 deletions src/broadcast/gov/MsgDeposit.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Deposit()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## Deposit()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.gov.v1.MsgDeposit"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"proposalId": "0",
"depositor": "",
"amount": []
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

36 changes: 36 additions & 0 deletions src/broadcast/gov/MsgVote.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: Vote()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## Vote()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.gov.v1.MsgVote"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"proposalId": "0",
"voter": "",
"option": 0,
"metadata": ""
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

36 changes: 36 additions & 0 deletions src/broadcast/gov/MsgVoteWeighted.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: VoteWeighted()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## VoteWeighted()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.gov.v1.MsgVoteWeighted"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"proposalId": "0",
"voter": "",
"options": [],
"metadata": ""
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

43 changes: 43 additions & 0 deletions src/broadcast/slashing/MsgUpdateParams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: UpdateParams()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## UpdateParams()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.slashing.v1beta1.MsgUpdateParams"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"authority": "",
"params": {
"signedBlocksWindow": "0",
"minSignedPerWindow": {},
"downtimeJailDuration": {
"seconds": "0",
"nanos": 0
},
"slashFractionDoubleSign": {},
"slashFractionDowntime": {}
}
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

39 changes: 39 additions & 0 deletions src/broadcast/staking/MsgCancelUnbondingDelegation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
title: CancelUnbondingDelegation()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## CancelUnbondingDelegation()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.staking.v1beta1.MsgCancelUnbondingDelegation"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"delegatorAddress": "",
"validatorAddress": "",
"amount": {
"denom": "",
"amount": ""
},
"creationHeight": "0"
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

44 changes: 44 additions & 0 deletions src/broadcast/staking/MsgUpdateParams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
title: UpdateParams()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## UpdateParams()

```js
import { defaultRegistryTypes } from "@cosmjs/stargate";

const foundMsgType = defaultRegistryTypes.find(
(element) => element[0] === "/cosmos.staking.v1beta1.MsgUpdateParams"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"authority": "",
"params": {
"unbondingTime": {
"seconds": "0",
"nanos": 0
},
"maxValidators": 0,
"maxEntries": 0,
"historicalEntries": 0,
"bondDenom": "",
"minCommissionRate": ""
}
}),
}

// const result = await signer.client.signAndBroadcast('address', [finalMsg], "auto", "")

```

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions src/query/authz/QueryGranteeGrantsRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: GranteeGrants()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## Connect rpc

```js
import { Tendermint37Client } from "@cosmjs/tendermint-rpc"
import { createProtobufRpcClient, QueryClient } from "@cosmjs/stargate"
import * as authz from "cosmjs-types/cosmos/authz/v1beta1/query"

const client = await Tendermint37Client.connect('{rpc_url}')
const queryClient = new QueryClient(client)
const rpcClient = createProtobufRpcClient(queryClient)

const queryauthz = new authz.QueryClientImpl(rpcClient)
```

## Example
```js
let GranteeGrants = await queryauthz.GranteeGrants({
"grantee": ""
})
console.log(GranteeGrants)
```

35 changes: 35 additions & 0 deletions src/query/authz/QueryGranterGrantsRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: GranterGrants()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## Connect rpc

```js
import { Tendermint37Client } from "@cosmjs/tendermint-rpc"
import { createProtobufRpcClient, QueryClient } from "@cosmjs/stargate"
import * as authz from "cosmjs-types/cosmos/authz/v1beta1/query"

const client = await Tendermint37Client.connect('{rpc_url}')
const queryClient = new QueryClient(client)
const rpcClient = createProtobufRpcClient(queryClient)

const queryauthz = new authz.QueryClientImpl(rpcClient)
```

## Example
```js
let GranterGrants = await queryauthz.GranterGrants({
"granter": ""
})
console.log(GranterGrants)
```

37 changes: 37 additions & 0 deletions src/query/authz/QueryGrantsRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
title: Grants()
author: atmon3r
icon: file
copyright: false
---

::: info
This doc is generated with
- [@cosmjs/stargate](https://www.npmjs.com/package/@cosmjs/stargate): ^0.31.3
- [cosmjs-types](https://www.npmjs.com/package/cosmjs-types): ^0.9.0
:::

## Connect rpc

```js
import { Tendermint37Client } from "@cosmjs/tendermint-rpc"
import { createProtobufRpcClient, QueryClient } from "@cosmjs/stargate"
import * as authz from "cosmjs-types/cosmos/authz/v1beta1/query"

const client = await Tendermint37Client.connect('{rpc_url}')
const queryClient = new QueryClient(client)
const rpcClient = createProtobufRpcClient(queryClient)

const queryauthz = new authz.QueryClientImpl(rpcClient)
```

## Example
```js
let Grants = await queryauthz.Grants({
"granter": "",
"grantee": "",
"msgTypeUrl": ""
})
console.log(Grants)
```

Loading

0 comments on commit f2d9784

Please sign in to comment.