Skip to content
This repository has been archived by the owner on Apr 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #76 from cosmostation/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Booyoun authored Nov 13, 2020
2 parents 288e8f8 + 1a2b1b0 commit 9b1ac3f
Show file tree
Hide file tree
Showing 6 changed files with 476 additions and 20 deletions.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ import cosmosjs from "@cosmostation/cosmosjs";
- You can see example file at [/example/browser-example.html](https://github.com/cosmostation/cosmosjs/tree/master/example/browser-example.html)

```js
<script src="https://cdn.jsdelivr.net/npm/@cosmostation/cosmosjs@0.6.8/dist/cosmos.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@cosmostation/cosmosjs@0.7.0/dist/cosmos.min.js"></script>
```

## Usage
Expand Down Expand Up @@ -114,6 +114,14 @@ const chainId = "secret-2";
const scrt = cosmosjs.network(lcdUrl, chainId);
scrt.setBech32MainPrefix("secret");
```
- Akash
```js
const cosmosjs = require("@cosmostation/cosmosjs");

const chainId = "akashnet-1";
const akash = cosmosjs.network(lcdUrl, chainId);
akash.setBech32MainPrefix("akash");
```

Generate ECPairPriv value that is needed for signing signatures
```js
Expand Down
30 changes: 15 additions & 15 deletions dist/cosmos.js
Original file line number Diff line number Diff line change
Expand Up @@ -34401,11 +34401,11 @@ Cosmos.prototype.newStdMsg = function(input) {
]
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
} else if (input.msgs[0].type == "irishub/stake/BeginUnbonding") {
stdSignMsg.jsonForSigningIrisTx =
Expand All @@ -34417,11 +34417,11 @@ Cosmos.prototype.newStdMsg = function(input) {
validator_addr: input.msgs[0].value.validator_addr
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
} else if (input.msgs[0].type == "irishub/stake/BeginRedelegate") {
stdSignMsg.jsonForSigningIrisTx =
Expand All @@ -34434,11 +34434,11 @@ Cosmos.prototype.newStdMsg = function(input) {
shares: String(input.msgs[0].value.shares_amount) + ".0000000000" // IRIS Exception) For signing, shares is correct.
}
],
chain_id: input.msgs[0].chain_id,
fee: { amount: [ { amount: input.msgs[0].fee.amount[0].amount, denom: input.msgs[0].fee.amount[0].denom } ], gas: input.msgs[0].fee.gas },
memo: input.msgs[0].memo,
account_number: input.msgs[0].account_number,
sequence: input.msgs[0].sequence
chain_id: input.chain_id,
fee: { amount: [ { amount: input.fee.amount[0].amount, denom: input.fee.amount[0].denom } ], gas: input.fee.gas },
memo: input.memo,
account_number: input.account_number,
sequence: input.sequence
}
}

Expand Down
Loading

0 comments on commit 9b1ac3f

Please sign in to comment.