Skip to content

Commit

Permalink
Merge pull request #6 from atmoner/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
atmoner authored Nov 5, 2023
2 parents 46a56c7 + 79d8900 commit 1e57025
Show file tree
Hide file tree
Showing 47 changed files with 943 additions and 133 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ node_modules/
src/.vuepress/.cache/
src/.vuepress/.temp/
src/.vuepress/dist/
generate.js
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"vuepress-theme-hope": "2.0.0-beta.245"
},
"dependencies": {
"@cosmjs/stargate": "^0.31.3"
"@cosmjs/stargate": "^0.31.3",
"cosmjs-types": "^0.9.0"
}
}
2 changes: 1 addition & 1 deletion src/.vuepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineUserConfig({
base: "/cosmjs-examples/",
lang: "en-US",
title: "CosmJs examples",
description: "A docs demo for vuepress-theme-hope ",
description: "CosmJs examples",

theme,
plugins: [
Expand Down
11 changes: 8 additions & 3 deletions src/.vuepress/navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { navbar } from "vuepress-theme-hope";
export default navbar([
"/",
"/stargate/",
"/query/",
"/broadcast/",
"/tips/"
"/query/",
{
text: "Broadcast examples",
icon: "laptop-code",
prefix: "broadcast/",
link: "broadcast/",
},
"/tips/"
]);
15 changes: 0 additions & 15 deletions src/broadcast/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions src/broadcast/authz.md

This file was deleted.

34 changes: 34 additions & 0 deletions src/broadcast/authz/Exec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: Exec()
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
:::

## Exec()

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

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

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"grantee": "",
"msgs": []
}),
}

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

```

35 changes: 35 additions & 0 deletions src/broadcast/authz/Grant.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Grant()
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
:::

## Grant()

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

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

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"granter": "",
"grantee": "",
"grant": {}
}),
}

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

```

7 changes: 7 additions & 0 deletions src/broadcast/authz/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: authz
author: atmon3r
icon: sitemap
index: false
copyright: false
---
35 changes: 35 additions & 0 deletions src/broadcast/authz/Revoke.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Revoke()
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
:::

## Revoke()

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

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

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"granter": "",
"grantee": "",
"msgTypeUrl": ""
}),
}

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

```

13 changes: 0 additions & 13 deletions src/broadcast/bank.md

This file was deleted.

34 changes: 34 additions & 0 deletions src/broadcast/bank/MultiSend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: MultiSend()
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
:::

## MultiSend()

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

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

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"inputs": [],
"outputs": []
}),
}

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

```

7 changes: 7 additions & 0 deletions src/broadcast/bank/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: bank
author: atmon3r
icon: sitemap
index: false
copyright: false
---
35 changes: 35 additions & 0 deletions src/broadcast/bank/Send.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: Send()
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
:::

## Send()

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

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

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

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

```

35 changes: 35 additions & 0 deletions src/broadcast/bank/SetSendEnabled.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: SetSendEnabled()
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
:::

## SetSendEnabled()

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

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

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"authority": "",
"sendEnabled": [],
"useDefaultFor": []
}),
}

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

```

37 changes: 37 additions & 0 deletions src/broadcast/bank/UpdateParams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
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.bank.v1beta1.MsgUpdateParams"
)

const finalMsg = {
typeUrl: foundMsgType[0],
value: foundMsgType[1].fromPartial({
"authority": "",
"params": {
"sendEnabled": [],
"defaultSendEnabled": false
}
}),
}

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

```

35 changes: 35 additions & 0 deletions src/broadcast/distribution/CommunityPoolSpend.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: CommunityPoolSpend()
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
:::

## CommunityPoolSpend()

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

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

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

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

```

Loading

0 comments on commit 1e57025

Please sign in to comment.