Skip to content
Open
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
39 changes: 39 additions & 0 deletions docs/integrating-wallets/oko.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# How to Add Oko Wallet to CosmosKit

Oko makes onboarding to your application easy, fast, and secure. Users can sign up with familiar login methods (email, social, or SSO) while enjoying the benefits of true crypto ownership.

## install the package

```
yarn add @cosmos-kit/oko
```

## import makeOkoWallets

```js
import { makeOkoWallets } from "@cosmos-kit/oko";
```

## add to your provider

```js
function MyCosmosApp({ Component, pageProps }: AppProps) {
return (
<ChainProvider
chains={chains}
assetLists={assets}
wallets={[
...makeOkoWallets({
apiKey: "your-oko-api-key",
}),
]}
>
<Component {...pageProps} />
</ChainProvider>
);
}

export default MyCosmosApp;
```

> Note: By default, all available login providers (Google, Email, etc) are enabled. You can optionally specify `loginMethods` to select specific providers.
12 changes: 12 additions & 0 deletions wallets/oko/.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/oko/.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/oko/.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/oko/.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/oko/.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/oko/.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/oko/.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
}
6 changes: 6 additions & 0 deletions wallets/oko/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Change Log

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

**Note:** First release!
33 changes: 33 additions & 0 deletions wallets/oko/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
The Clear BSD License

Copyright (c) 2024 Cosmos Kit Contributors
Copyright (c) 2024 Interweb, Inc. <developers@interweb.co>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted (subject to the limitations in the disclaimer
below) provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from this
software without specific prior written permission.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
49 changes: 49 additions & 0 deletions wallets/oko/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# @cosmos-kit/oko

<p align="center" width="100%">
<img height="90" src="https://user-images.githubusercontent.com/545047/190171432-5526db8f-9952-45ce-a745-bea4302f912b.svg" />
</p>

<p align="center" width="100%">
<a href="https://github.com/hyperweb-io/cosmos-kit/actions/workflows/run-tests.yml">
<img height="20" src="https://github.com/hyperweb-io/cosmos-kit/actions/workflows/run-tests.yml/badge.svg" />
</a>
<a href="https://github.com/hyperweb-io/cosmos-kit/blob/main/wallets/oko/LICENSE"><img height="20" src="https://img.shields.io/badge/license-BSD%203--Clause%20Clear-blue.svg"></a>
<a href="https://www.npmjs.com/package/@cosmos-kit/oko"><img height="20" src="https://img.shields.io/github/package-json/v/hyperweb-io/cosmos-kit?filename=wallets%2Foko%2Fpackage.json"></a>
</p>

Cosmos Kit is a universal wallet adapter for developers to build apps that quickly and easily interact with Cosmos blockchains and wallets.

> **⚠️ UPGRADE to 3.0**
>
> **Cosmos Kit 3.0 and Create Cosmos App 2.0 is here!**
>
> Please use [**interchain-kit**](https://github.com/hyperweb-io/interchain-kit), the official successor with improved tooling, broader compatibility, and full Interchain ecosystem support.
> You can also see [**create-interchain-app**](https://github.com/hyperweb-io/create-interchain-app) our official starter kit that supports Interchain Kit.

@cosmos-kit/oko is the Oko Wallet integration for CosmosKit.

## Interchain JavaScript Stack

A unified toolkit for building applications and smart contracts in the Interchain ecosystem ⚛️

| Category | Tools | Description |
|----------------------|------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------|
| **Chain Information** | [**Chain Registry**](https://github.com/hyperweb-io/chain-registry), [**Utils**](https://www.npmjs.com/package/@chain-registry/utils), [**Client**](https://www.npmjs.com/package/@chain-registry/client) | Everything from token symbols, logos, and IBC denominations for all assets you want to support in your application. |
| **Wallet Connectors**| [**Interchain Kit**](https://github.com/hyperweb-io/interchain-kit)<sup>beta</sup>, [**Cosmos Kit**](https://github.com/hyperweb-io/cosmos-kit) | Experience the convenience of connecting with a variety of web3 wallets through a single, streamlined interface. |
| **Signing Clients** | [**InterchainJS**](https://github.com/hyperweb-io/interchainjs)<sup>beta</sup>, [**CosmJS**](https://github.com/cosmos/cosmjs) | A single, universal signing interface for any network |
| **SDK Clients** | [**Telescope**](https://github.com/hyperweb-io/telescope) | Your Frontend Companion for Building with TypeScript with Cosmos SDK Modules. |
| **Starter Kits** | [**Create Interchain App**](https://github.com/hyperweb-io/create-interchain-app)<sup>beta</sup>, [**Create Cosmos App**](https://github.com/hyperweb-io/create-cosmos-app) | Set up a modern Interchain app by running one command. |
| **UI Kits** | [**Interchain UI**](https://github.com/hyperweb-io/interchain-ui) | The Interchain Design System, empowering developers with a flexible, easy-to-use UI kit. |
| **Testing Frameworks** | [**Starship**](https://github.com/hyperweb-io/starship) | Unified Testing and Development for the Interchain. |
| **TypeScript Smart Contracts** | [**Create Hyperweb App**](https://github.com/hyperweb-io/create-hyperweb-app) | Build and deploy full-stack blockchain applications with TypeScript |
| **CosmWasm Contracts** | [**CosmWasm TS Codegen**](https://github.com/CosmWasm/ts-codegen) | Convert your CosmWasm smart contracts into dev-friendly TypeScript classes. |

## Credits

🛠 Built by [Interweb](https://interweb.co) — if you like our tools, please checkout and contribute [https://interweb.co](https://interweb.co)
## Disclaimer

AS DESCRIBED IN THE LICENSES, THE SOFTWARE IS PROVIDED "AS IS", AT YOUR OWN RISK, AND WITHOUT WARRANTIES OF ANY KIND.

No developer or entity involved in creating this software will be liable for any claims or damages whatsoever associated with your use, inability to use, or your interaction with other users of the code, including any direct, indirect, incidental, special, exemplary, punitive or consequential damages, or loss of profits, cryptocurrencies, tokens, or anything else of value.
2 changes: 2 additions & 0 deletions wallets/oko/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// not for module, but for local development.
export * from './src';
67 changes: 67 additions & 0 deletions wallets/oko/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
{
"name": "@cosmos-kit/oko",
"version": "0.1.0",
"description": "cosmos-kit wallet connector for Oko Wallet",
"author": "oko-wallet",
"homepage": "https://github.com/hyperweb-io/cosmos-kit#readme",
"license": "SEE LICENSE IN LICENSE",
"main": "cjs/index.js",
"module": "esm/index.js",
"types": "cjs/index.d.ts",
"directories": {
"lib": "src",
"test": "__tests__"
},
"files": [
"cjs",
"esm",
"!CHANGELOG.md",
"!LICENSE"
],
"scripts": {
"build:cjs": "yarn tsc -p tsconfig.json --outDir cjs --module commonjs || true",
"build:esm": "yarn tsc -p tsconfig.json --outDir esm --module es2022 || true",
"clean:cjs": "rimraf cjs",
"clean:esm": "rimraf esm",
"clean": "npm run clean:cjs && npm run clean:esm",
"build": "npm run clean && npm run build:cjs && npm run build:esm",
"prepare": "npm run build",
"lint": "eslint --ext .tsx,.ts .",
"format": "eslint --ext .tsx,.ts --fix .",
"test": "jest",
"test:watch": "jest --watch",
"test:debug": "node --inspect node_modules/.bin/jest --runInBand"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/hyperweb-io/cosmos-kit"
},
"keywords": [
"cosmos-kit",
"cosmos",
"oko",
"wallet",
"embed"
],
"bugs": {
"url": "https://github.com/hyperweb-io/cosmos-kit/issues"
},
"jest": {
"testPathIgnorePatterns": [
"dist/"
]
},
"dependencies": {
"@cosmos-kit/core": "^2.16.7",
"@keplr-wallet/types": "^0.12.290",
"@oko-wallet/oko-sdk-cosmos": "^0.0.6-rc.136",
"@oko-wallet/oko-sdk-core": "^0.0.6-rc.113"
},
"peerDependencies": {
"@cosmjs/amino": ">= 0.28",
"@cosmjs/proto-signing": ">= 0.28"
}
}
Loading