Skip to content

Commit 2052a3b

Browse files
authored
Merge pull request #581 from Ryz0nd/oko
feat: add Oko wallet integration
2 parents 24a3a88 + f922c26 commit 2052a3b

22 files changed

+898
-0
lines changed

docs/integrating-wallets/oko.mdx

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# How to Add Oko Wallet to CosmosKit
2+
3+
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.
4+
5+
## install the package
6+
7+
```
8+
yarn add @cosmos-kit/oko
9+
```
10+
11+
## import makeOkoWallets
12+
13+
```js
14+
import { makeOkoWallets } from "@cosmos-kit/oko";
15+
```
16+
17+
## add to your provider
18+
19+
```js
20+
function MyCosmosApp({ Component, pageProps }: AppProps) {
21+
return (
22+
<ChainProvider
23+
chains={chains}
24+
assetLists={assets}
25+
wallets={[
26+
...makeOkoWallets({
27+
apiKey: "your-oko-api-key",
28+
}),
29+
]}
30+
>
31+
<Component {...pageProps} />
32+
</ChainProvider>
33+
);
34+
}
35+
36+
export default MyCosmosApp;
37+
```
38+
39+
> Note: By default, all available login providers (Google, Email, etc) are enabled. You can optionally specify `loginMethods` to select specific providers.

wallets/oko/.editorconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
root = true
2+
3+
[*]
4+
indent_style = space
5+
indent_size = 2
6+
end_of_line = lf
7+
charset = utf-8
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false

wallets/oko/.eslintignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules/
2+
dist/
3+
main/
4+
module/
5+
types/
6+
coverage/
7+
/index.ts

wallets/oko/.eslintrc.json

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{
2+
"plugins": [
3+
"@typescript-eslint",
4+
"simple-import-sort",
5+
"unused-imports"
6+
],
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/recommended",
10+
// configures both eslint-plugin-prettier and eslint-config-prettier
11+
"plugin:prettier/recommended"
12+
],
13+
"parser": "@typescript-eslint/parser",
14+
"parserOptions": {
15+
"ecmaVersion": 2020,
16+
"sourceType": "module",
17+
"project": "tsconfig.json"
18+
},
19+
"env": {
20+
"es6": true,
21+
"browser": true,
22+
"node": true,
23+
"jest": true
24+
},
25+
"rules": {
26+
"simple-import-sort/imports": 2,
27+
"simple-import-sort/exports": 2,
28+
"prettier/prettier": 2,
29+
"unused-imports/no-unused-imports": 2,
30+
"no-console": 1,
31+
"no-debugger": 2,
32+
"no-alert": 2,
33+
"no-await-in-loop": 0,
34+
"no-prototype-builtins": 0,
35+
"no-return-assign": [
36+
"error",
37+
"except-parens"
38+
],
39+
"no-restricted-syntax": [
40+
2,
41+
"ForInStatement",
42+
"LabeledStatement",
43+
"WithStatement"
44+
],
45+
"no-unused-vars": 0,
46+
"@typescript-eslint/no-unused-vars": [
47+
"warn",
48+
{
49+
"argsIgnorePattern": "React|res|next|^_"
50+
}
51+
],
52+
"prefer-const": [
53+
"error",
54+
{
55+
"destructuring": "all"
56+
}
57+
],
58+
"no-unused-expressions": [
59+
2,
60+
{
61+
"allowTaggedTemplates": true
62+
}
63+
],
64+
"comma-dangle": 0,
65+
"jsx-quotes": [
66+
2,
67+
"prefer-double"
68+
],
69+
"linebreak-style": [
70+
"error",
71+
"unix"
72+
],
73+
"quotes": [
74+
2,
75+
"single",
76+
{
77+
"avoidEscape": true,
78+
"allowTemplateLiterals": true
79+
}
80+
]
81+
}
82+
}

wallets/oko/.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
6+
# Runtime data
7+
pids
8+
*.pid
9+
*.seed
10+
11+
# dist
12+
main
13+
module
14+
15+
# Directory for instrumented libs generated by jscoverage/JSCover
16+
lib-cov
17+
18+
# Coverage directory used by tools like istanbul
19+
coverage
20+
21+
# nyc test coverage
22+
.nyc_output
23+
24+
# Compiled binary addons (http://nodejs.org/api/addons.html)
25+
build/Release
26+
27+
# Dependency directories
28+
node_modules
29+
jspm_packages
30+
31+
# Optional npm cache directory
32+
.npm
33+
34+
# Optional REPL history
35+
.node_repl_history
36+
37+
# Editors
38+
.idea
39+
40+
# Lib
41+
lib
42+
43+
# npm package lock
44+
package-lock.json
45+
yarn.lock
46+
47+
# others
48+
.DS_Store

wallets/oko/.npmignore

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
*.log
2+
npm-debug.log*
3+
4+
# Coverage directory used by tools like istanbul
5+
coverage
6+
.nyc_output
7+
8+
# Dependency directories
9+
node_modules
10+
11+
# npm package lock
12+
package-lock.json
13+
yarn.lock
14+
15+
# project files
16+
__fixtures__
17+
__tests__
18+
.babelrc
19+
.babelrc.js
20+
.editorconfig
21+
.eslintignore
22+
.eslintrc
23+
.eslintrc.js
24+
.gitignore
25+
.travis.yml
26+
.vscode
27+
CHANGELOG.md
28+
examples
29+
jest.config.js
30+
package.json
31+
src
32+
test

wallets/oko/.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scripts-prepend-node-path=true

wallets/oko/.prettierrc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"trailingComma": "es5",
3+
"tabWidth": 2,
4+
"semi": true,
5+
"singleQuote": true,
6+
"useTabs": false
7+
}

wallets/oko/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file.
4+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5+
6+
**Note:** First release!

wallets/oko/LICENSE

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
The Clear BSD License
2+
3+
Copyright (c) 2024 Cosmos Kit Contributors
4+
Copyright (c) 2024 Interweb, Inc. <developers@interweb.co>
5+
All rights reserved.
6+
7+
Redistribution and use in source and binary forms, with or without
8+
modification, are permitted (subject to the limitations in the disclaimer
9+
below) provided that the following conditions are met:
10+
11+
* Redistributions of source code must retain the above copyright notice,
12+
this list of conditions and the following disclaimer.
13+
14+
* Redistributions in binary form must reproduce the above copyright
15+
notice, this list of conditions and the following disclaimer in the
16+
documentation and/or other materials provided with the distribution.
17+
18+
* Neither the name of the copyright holder nor the names of its
19+
contributors may be used to endorse or promote products derived from this
20+
software without specific prior written permission.
21+
22+
NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY
23+
THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
24+
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
26+
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
27+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
28+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
29+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
30+
BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
31+
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33+
POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)