π½ Developed / Developing by Cosmostation
Keystation is a decentralized keychain-based authenticator that DOES NOT require any installation. User keys are securely stored in the web browser Keychain, allowing for users to conveniently sign transactions for networks and decentralized applications built with the Cosmos SDK. Keystation can be used as a secure and convenient authentication and key management tool for web login, decentralized exchanges, decentralized applications, and various services built with the Cosmos SDK.
<script src="https://keystation.cosmostation.io/lib/keystation.js"></script>
// initializing configuration
var keystation = new Keystation();
keystation.client = "YOUR_WEB_URL";
keystation.lcd = "https://lcd-do-not-abuse.cosmostation.io";
keystation.path = "44/118/0/0/0";
// open popup window for sign-in
var prefix = "cosmos";
var popup = keystation.openWindow("signin", prefix);
// generate a transaction
var txJson = {"account_number":"18012","chain_id":"cosmoshub-2","fee":{"amount":[{"amount":"5000","denom":"uatom"}],"gas":"200000"},"memo":"","msgs":[{"type":"cosmos-sdk/MsgSend","value":{"amount":[{"amount":"10000","denom":"uatom"}],"from_address":"cosmos1z67fshyr48pa9a6htdz4qd0zullfk6y0fgvxv7","to_address":"cosmos10nv3yj0jdxf02vxyc0tavf97fdvppdth6wmcn3"}}],"sequence":"24"};
var txJsonStr = JSON.stringify(txJson);
var popup = keystation.openWindow("transaction", txJsonStr);
// add an EventListener
window.addEventListener("message", function(e) {
if (e.origin != "https://keystation.cosmostation.io") return;
console.log(e.data);
} , false);
You can find currently supporting meesage types in our CosmosJS library
// CosmosJS supports to create tx for Cosmos
cosmos.getAccounts(address).then(data => {
let stdSignMsg = cosmos.NewStdMsg({
type: "cosmos-sdk/MsgSend",
from_address: address,
to_address: "cosmos18vhdczjut44gpsy804crfhnd5nq003nz0nf20v",
amountDenom: "uatom",
amount: 100000, // 6 decimal places
feeDenom: "uatom",
fee: 5000,
gas: 200000,
memo: "",
account_number: data.value.account_number,
sequence: data.value.sequence
});
console.log(stdSignMsg.json); // txJson
})
Keystation stores user mnemonic phrase on a key management system, Keychain in Chrome and Safari. A user is the only one who can access the keychain, and no third party is granted access. User mnemonic phrase is encrypted with AES algorithm for higher security before being stored. A PIN set by the user is required in order to access the encrypted mnemonic phrase.
We welcome any type of issues. Please provide information in detail when you post issues or bugs.
We welcome any contributions, suggestions, improvements, or feature requests.
There will be CONTRIBUTING.md
that describes rules and procedure.
It will be updated soon.