Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ If you want to get a cosmjs stargate or cosmwasm signer, [here are docs for our
| [@cosmos-kit/keplr-mobile/](packages/keplr-mobile/) | WalletConnect | Keplr Mobile Wallet integration. |
| [@cosmos-kit/leap](packages/leap) | Root Wallet | Leap Wallet integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
| [@cosmos-kit/omni](packages/omni) | Root Wallet | Omni Wallet integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
| [@cosmos-kit/terra-extension](packages/terra-extension) | Root Wallet | Terra Station Wallet integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
| [@cosmos-kit/trust](packages/trust) | Root Wallet | Trust Wallet integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
| [@cosmos-kit/vectis](packages/vectis) | Root Wallet | Vectis Wallet integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
| [@cosmos-kit/xdefi-extension](packages/xdefi-extension) | Root Wallet | XDEFI Wallet (Extension) integration. Use this if you want to integrate the extension, no mobile wallet connect support yet. |
Expand Down
92 changes: 92 additions & 0 deletions packages/example/config/terra2testnet.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
/**
* remark: This is an example config file for a terra testnet chain and it should be deleted before merging.
*/
import type { Chain, AssetList } from "@chain-registry/types";

export const terra2testnet: Chain = {
$schema: "../../chain.schema.json",
chain_name: "terra2testnet",
status: "live",
network_type: "testnet",
pretty_name: "Terra Testnet",
chain_id: "pisco-1",
bech32_prefix: "terra",
daemon_name: "terrad",
node_home: "$HOME/.terrad",
slip44: 330,
fees: {
fee_tokens: [
{
denom: "uluna",
fixed_min_gas_price: 0,
low_gas_price: 0.15,
average_gas_price: 0.15,
high_gas_price: 0.15,
},
],
},
staking: {
staking_tokens: [
{
denom: "uluna",
},
],
},
codebase: {
git_repo: "https://github.com/terra-money/core",
recommended_version: "v2.2.0",
compatible_versions: ["v2.2.0"],
cosmos_sdk_version: "0.45.10",
tendermint_version: "0.34.22",
cosmwasm_version: "0.27",
cosmwasm_enabled: true,
},
apis: {
rpc: [
{
address: "https://terra-testnet-rpc.polkachu.com/",
},
],
rest: [
{
address: "https://pisco-lcd.terra.dev/",
},
],
grpc: [],
},
logo_URIs: {
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/terra2/images/luna.png",
},
keywords: ["testnet"],
};

export const terra2testnetAssets: AssetList = {
$schema: "../../assetlist.schema.json",
chain_name: "terra2testnet",
assets: [
{
description: "The native token of Terra",
denom_units: [
{
denom: "uluna",
exponent: 0,
aliases: [],
},
{
denom: "luna",
exponent: 6,
aliases: [],
},
],
base: "uluna",
name: "Luna",
display: "luna",
symbol: "LUNA",
logo_URIs: {
png: "https://raw.githubusercontent.com/cosmos/chain-registry/master/terra2/images/luna.png",
},
coingecko_id: "terra",
keywords: ["staking"],
},
],
};
3 changes: 2 additions & 1 deletion packages/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"@cosmos-kit/keplr": "^0.33.22",
"@cosmos-kit/leap": "^0.14.19",
"@cosmos-kit/react": "^1.3.18",
"@cosmos-kit/terrastation": "^0.1.7",
"@cosmos-kit/terrastation": "^0.1.6",
"@cosmos-kit/terra-extension": "^0.0.1",
"@cosmos-kit/vectis": "^0.15.19",
"@emotion/react": "^11.10.6",
"@emotion/styled": "^11.10.6",
Expand Down
15 changes: 13 additions & 2 deletions packages/example/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,21 @@ import { wallets as trustWallets } from "@cosmos-kit/trust";
import { wallets as vectisWallets } from "@cosmos-kit/vectis";
import { wallets as frontierWallets } from "@cosmos-kit/frontier";
import { wallets as terrastationWallets } from "@cosmos-kit/terrastation";
import { wallets as terraExtensionWallets } from "@cosmos-kit/terra-extension";
import { wallets as web3authWallets } from "@cosmos-kit/web3auth";
import { ChainProvider, defaultTheme } from "@cosmos-kit/react";
import { assets, chains } from "chain-registry";
import type { AppProps } from "next/app";
import { ThemeProvider } from "@cosmology-ui/react";
import { terra2testnet, terra2testnetAssets } from "../config/terra2testnet";

function MyApp({ Component, pageProps }: AppProps) {
return (
<ThemeProvider>
<ChakraProvider theme={defaultTheme}>
<ChainProvider
chains={chains}
assetLists={assets}
chains={[...chains, terra2testnet]}
assetLists={[...assets, terra2testnetAssets]}
wallets={[
...keplrWallets,
...web3authWallets,
Expand All @@ -37,6 +39,7 @@ function MyApp({ Component, pageProps }: AppProps) {
// ...trustWallets,
// ...frontierWallets,
// ...terrastationWallets,
// ...terraExtensionWallets
]}
defaultNameService={"stargaze"}
walletConnectOptions={{
Expand Down Expand Up @@ -80,6 +83,14 @@ function MyApp({ Component, pageProps }: AppProps) {
},
],
},
terra2: {
rpc: ["https://terra-rpc.lavenderfive.com/"],
rest: ["https://phoenix-lcd.terra.dev/"],
},
terra2testnet: {
rpc: ["https://terra-testnet-rpc.polkachu.com/"],
rest: ["https://pisco-lcd.terra.dev/"],
},
},
}}
>
Expand Down
16 changes: 16 additions & 0 deletions wallets/terra-extension/.babelrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
const useESModules = !!process.env.MODULE;

module.exports = (api) => {
api.cache(() => process.env.MODULE);
return {
plugins: [
['@babel/transform-runtime', { useESModules }],
'@babel/proposal-object-rest-spread',
'@babel/proposal-class-properties',
'@babel/proposal-export-default-from'
],
presets: useESModules
? ["@babel/typescript", "@babel/react"]
: ["@babel/typescript", "@babel/env", "@babel/react"],
};
};
12 changes: 12 additions & 0 deletions wallets/terra-extension/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
7 changes: 7 additions & 0 deletions wallets/terra-extension/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
node_modules/
dist/
main/
module/
types/
coverage/
/index.ts
82 changes: 82 additions & 0 deletions wallets/terra-extension/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"plugins": [
"@typescript-eslint",
"simple-import-sort",
"unused-imports"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
// configures both eslint-plugin-prettier and eslint-config-prettier
"plugin:prettier/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 2020,
"sourceType": "module",
"project": "tsconfig.json"
},
"env": {
"es6": true,
"browser": true,
"node": true,
"jest": true
},
"rules": {
"simple-import-sort/imports": 2,
"simple-import-sort/exports": 2,
"prettier/prettier": 2,
"unused-imports/no-unused-imports": 2,
"no-console": 1,
"no-debugger": 2,
"no-alert": 2,
"no-await-in-loop": 0,
"no-prototype-builtins": 0,
"no-return-assign": [
"error",
"except-parens"
],
"no-restricted-syntax": [
2,
"ForInStatement",
"LabeledStatement",
"WithStatement"
],
"no-unused-vars": 0,
"@typescript-eslint/no-unused-vars": [
"warn",
{
"argsIgnorePattern": "React|res|next|^_"
}
],
"prefer-const": [
"error",
{
"destructuring": "all"
}
],
"no-unused-expressions": [
2,
{
"allowTaggedTemplates": true
}
],
"comma-dangle": 0,
"jsx-quotes": [
2,
"prefer-double"
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
2,
"single",
{
"avoidEscape": true,
"allowTemplateLiterals": true
}
]
}
}
48 changes: 48 additions & 0 deletions wallets/terra-extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# dist
main
module

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

# Editors
.idea

# Lib
lib

# npm package lock
package-lock.json
yarn.lock

# others
.DS_Store
32 changes: 32 additions & 0 deletions wallets/terra-extension/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
*.log
npm-debug.log*

# Coverage directory used by tools like istanbul
coverage
.nyc_output

# Dependency directories
node_modules

# npm package lock
package-lock.json
yarn.lock

# project files
__fixtures__
__tests__
.babelrc
.babelrc.js
.editorconfig
.eslintignore
.eslintrc
.eslintrc.js
.gitignore
.travis.yml
.vscode
CHANGELOG.md
examples
jest.config.js
package.json
src
test
1 change: 1 addition & 0 deletions wallets/terra-extension/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
scripts-prepend-node-path=true
7 changes: 7 additions & 0 deletions wallets/terra-extension/.prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"trailingComma": "es5",
"tabWidth": 2,
"semi": true,
"singleQuote": true,
"useTabs": false
}
8 changes: 8 additions & 0 deletions wallets/terra-extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 0.0.1 (2023-01-30)

**Note:** First release!
Loading