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
92 changes: 92 additions & 0 deletions .yarn/patches/gridplus-sdk-npm-4.0.0-0e9f598de2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
diff --git a/dist/index.cjs b/dist/index.cjs
index a78eb62001f784924eabc712b1e4234b5ee53c23..7086870ebf44cd239d86e02c23d9f52e9bc9a2f9 100644
--- a/dist/index.cjs
+++ b/dist/index.cjs
@@ -601,6 +601,7 @@ var EXTERNAL = {
ENCODINGS: {
NONE: 1 /* none */,
SOLANA: 2 /* solana */,
+ COSMOS: 3 /* cosmos */,
EVM: 4 /* evm */,
ETH_DEPOSIT: 5 /* eth_deposit */,
EIP7702_AUTH: 6 /* eip7702_auth */,
@@ -867,7 +868,8 @@ function getFwVersionConst(v) {
c.genericSigning.curveTypes = EXTERNAL.SIGNING.CURVES;
c.genericSigning.encodingTypes = {
NONE: EXTERNAL.SIGNING.ENCODINGS.NONE,
- SOLANA: EXTERNAL.SIGNING.ENCODINGS.SOLANA
+ SOLANA: EXTERNAL.SIGNING.ENCODINGS.SOLANA,
+ COSMOS: EXTERNAL.SIGNING.ENCODINGS.COSMOS
};
c.getAddressFlags = [
EXTERNAL.GET_ADDR_FLAGS.ED25519_PUB,
diff --git a/dist/index.d.cts b/dist/index.d.cts
index cb84cb787b10ac0cc86ee3fc2af42f68e79d9ad2..ace42ec7a680da40732e24fab73650b6c89f66f7 100644
--- a/dist/index.d.cts
+++ b/dist/index.d.cts
@@ -81,6 +81,7 @@ declare const EXTERNAL$1: {
readonly ENCODINGS: {
readonly NONE: LatticeSignEncoding.none;
readonly SOLANA: LatticeSignEncoding.solana;
+ readonly COSMOS: LatticeSignEncoding.cosmos;
readonly EVM: LatticeSignEncoding.evm;
readonly ETH_DEPOSIT: LatticeSignEncoding.eth_deposit;
readonly EIP7702_AUTH: LatticeSignEncoding.eip7702_auth;
@@ -205,6 +206,7 @@ interface GenericSigningData {
encodingTypes: {
NONE: typeof EXTERNAL$1.SIGNING.ENCODINGS.NONE;
SOLANA: typeof EXTERNAL$1.SIGNING.ENCODINGS.SOLANA;
+ COSMOS?: typeof EXTERNAL$1.SIGNING.ENCODINGS.COSMOS;
EVM?: typeof EXTERNAL$1.SIGNING.ENCODINGS.EVM;
};
}
diff --git a/dist/index.d.ts b/dist/index.d.ts
index cb84cb787b10ac0cc86ee3fc2af42f68e79d9ad2..7870e7670246edb0a16c03f6804e3e2f2964bc3e 100644
--- a/dist/index.d.ts
+++ b/dist/index.d.ts
@@ -43,6 +43,7 @@ declare enum LatticeSignCurve {
declare enum LatticeSignEncoding {
none = 1,
solana = 2,
+ cosmos = 3,
evm = 4,
eth_deposit = 5,
eip7702_auth = 6,
@@ -81,6 +82,7 @@ declare const EXTERNAL$1: {
readonly ENCODINGS: {
readonly NONE: LatticeSignEncoding.none;
readonly SOLANA: LatticeSignEncoding.solana;
+ readonly COSMOS: LatticeSignEncoding.cosmos;
readonly EVM: LatticeSignEncoding.evm;
readonly ETH_DEPOSIT: LatticeSignEncoding.eth_deposit;
readonly EIP7702_AUTH: LatticeSignEncoding.eip7702_auth;
@@ -205,6 +207,7 @@ interface GenericSigningData {
encodingTypes: {
NONE: typeof EXTERNAL$1.SIGNING.ENCODINGS.NONE;
SOLANA: typeof EXTERNAL$1.SIGNING.ENCODINGS.SOLANA;
+ COSMOS?: typeof EXTERNAL$1.SIGNING.ENCODINGS.COSMOS;
EVM?: typeof EXTERNAL$1.SIGNING.ENCODINGS.EVM;
};
}
diff --git a/dist/index.mjs b/dist/index.mjs
index 793949dd1f22aec3542aa667b267b02c7c670cb8..ad69e977479e14afa2d138a7fe7c835fe2df64e1 100644
--- a/dist/index.mjs
+++ b/dist/index.mjs
@@ -527,6 +527,7 @@ var EXTERNAL = {
ENCODINGS: {
NONE: 1 /* none */,
SOLANA: 2 /* solana */,
+ COSMOS: 3 /* cosmos */,
EVM: 4 /* evm */,
ETH_DEPOSIT: 5 /* eth_deposit */,
EIP7702_AUTH: 6 /* eip7702_auth */,
@@ -793,7 +794,8 @@ function getFwVersionConst(v) {
c.genericSigning.curveTypes = EXTERNAL.SIGNING.CURVES;
c.genericSigning.encodingTypes = {
NONE: EXTERNAL.SIGNING.ENCODINGS.NONE,
- SOLANA: EXTERNAL.SIGNING.ENCODINGS.SOLANA
+ SOLANA: EXTERNAL.SIGNING.ENCODINGS.SOLANA,
+ COSMOS: EXTERNAL.SIGNING.ENCODINGS.COSMOS
};
c.getAddressFlags = [
EXTERNAL.GET_ADDR_FLAGS.ED25519_PUB,
1 change: 1 addition & 0 deletions apps/extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"color": "^4.2.3",
"crypto-browserify": "^3.12.0",
"delay": "^4.4.0",
"gridplus-sdk": "patch:gridplus-sdk@npm:4.0.0#../../.yarn/patches/gridplus-sdk-npm-4.0.0-0e9f598de2.patch",
"https-browserify": "^1.0.0",
"joi": "^17.5.0",
"js-yaml": "^4.1.0",
Expand Down
38 changes: 38 additions & 0 deletions apps/extension/src/components/icon/lattice1.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import React, { FunctionComponent } from "react";
import { IconProps } from "./types";

export const Lattice1Icon: FunctionComponent<IconProps> = ({
width = "auto",
height = "0.875rem",
color,
}) => {
const colors: { [key: string]: { color1: string } } = {
dark: {
color1: "#f5f8ff",
},
light: {
color1: "#000000",
},
};

const colorValue = color && color in colors ? colors[color].color1 : color;

return (
<svg
width={width}
height={height}
viewBox="0 0 71 25"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
fill={colorValue || "currentColor"}
d="M70.815 5.016H66.46V.73h-3.64v4.285h-4.356v3.43h4.356v4.285h3.64V8.447h4.355zM14.195 20.616c-.9.436-2.1.735-3.544.735-3.629 0-6.568-2.616-6.568-6.432 0-3.815 2.806-6.323 6.595-6.323 2.645 0 4.252.981 4.743 1.308l1.662-2.999c-.708-.462-2.725-1.825-6.568-1.825-6.048 0-10.33 4.3-10.33 9.84 0 5.538 4.278 9.81 10.248 9.81 4.007 0 6.27-1.445 7.305-2.235v-7.549h-3.543zM36.613 12.133c0-4.403-3.199-7.123-7.994-7.123h-7.04v19.722h3.87v-5.638h3.395l3.842 5.638h4.57l-4.516-6.507c2.442-1.15 3.873-3.282 3.873-6.093m-8.332 3.562h-2.832V8.408h2.861c2.554 0 4.291 1.374 4.291 3.73 0 2.16-1.71 3.563-4.32 3.563zM44.512 5.015h-3.87v19.718h3.87z"
/>
<path
fill={colorValue || "currentColor"}
d="M66.441 15.038v-.593h-3.61v.593s-.039 1.436-.102 1.909c-.37 2.757-2.987 4.363-6.331 4.363h-3.563V8.435h3.582V5.01h-7.453v19.722h7.602c5.462 0 9.444-2.985 9.875-7.785.043-.475 0-1.909 0-1.909"
/>
</svg>
);
};
20 changes: 20 additions & 0 deletions apps/extension/src/hooks/key-info/use-key-info-sort.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const KEY_INFO_SORT_KEY = {
MNEMONIC: "sort-mnemonic",
PRIVATE_KEY: "sort-private-key",
LEDGER: "sort-ledger",
LATTICE1: "sort-lattice1",
KEYSTONE: "sort-keystone",
UNKNOWN: "sort-unknown",
};
Expand Down Expand Up @@ -85,6 +86,12 @@ export const useGetKeyInfosSeparatedByType = (keyInfos: KeyInfo[]) => {
});
}, [keyInfos]);

const lattice1Keys = useMemo(() => {
return keyInfos.filter((keyInfo) => {
return keyInfo.type === "lattice1";
});
}, [keyInfos]);

const keystoneKeys = useMemo(() => {
return keyInfos.filter((keyInfo) => {
return keyInfo.type === "keystone";
Expand All @@ -94,6 +101,7 @@ export const useGetKeyInfosSeparatedByType = (keyInfos: KeyInfo[]) => {
const unknownKeys = useMemo(() => {
const knownKeys = mnemonicKeys
.concat(ledgerKeys)
.concat(lattice1Keys)
.concat(privateKeyInfos)
.concat(socialPrivateKeyInfos)
.concat(keystoneKeys);
Expand All @@ -103,6 +111,7 @@ export const useGetKeyInfosSeparatedByType = (keyInfos: KeyInfo[]) => {
}, [
keyInfos,
ledgerKeys,
lattice1Keys,
mnemonicKeys,
privateKeyInfos,
socialPrivateKeyInfos,
Expand Down Expand Up @@ -161,6 +170,7 @@ export const useGetKeyInfosSeparatedByType = (keyInfos: KeyInfo[]) => {
socialPrivateKeyInfoByType,
privateKeyInfos,
ledgerKeys,
lattice1Keys,
keystoneKeys,
unknownKeys,
};
Expand All @@ -173,6 +183,7 @@ export const useGetAllSortedKeyInfos = (keyInfos: KeyInfo[]) => {
socialPrivateKeyInfoByType,
privateKeyInfos,
ledgerKeys,
lattice1Keys,
keystoneKeys,
unknownKeys,
} = useGetKeyInfosSeparatedByType(keyInfos);
Expand Down Expand Up @@ -222,6 +233,14 @@ export const useGetAllSortedKeyInfos = (keyInfos: KeyInfo[]) => {
res.push(...sortKeyInfos(ledgerKeys, indexMap));
}

if (lattice1Keys.length > 0) {
const indexMap =
uiConfigStore.selectWalletConfig.getKeyToSortVaultIdsMapIndex(
KEY_INFO_SORT_KEY.LATTICE1
);
res.push(...sortKeyInfos(lattice1Keys, indexMap));
}

if (keystoneKeys.length > 0) {
const indexMap =
uiConfigStore.selectWalletConfig.getKeyToSortVaultIdsMapIndex(
Expand All @@ -243,6 +262,7 @@ export const useGetAllSortedKeyInfos = (keyInfos: KeyInfo[]) => {
socialPrivateKeyInfoByType,
privateKeyInfos,
ledgerKeys,
lattice1Keys,
keystoneKeys,
unknownKeys,
uiConfigStore.selectWalletConfig,
Expand Down
14 changes: 14 additions & 0 deletions apps/extension/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"pages.register.connect-hardware.content.title": "Select a hardware wallet that you would like to use with Keplr",
"pages.register.connect-hardware.connect-ledger-button": "Connect Ledger",
"pages.register.connect-hardware.connect-keystone-button": "Connect Keystone",
"pages.register.connect-hardware.connect-lattice1-button": "Connect Lattice1",

"pages.register.new-mnemonic.title": "New Recovery Phrase",
"pages.register.new-mnemonic.12-words-tab": "12 words",
Expand Down Expand Up @@ -139,6 +140,14 @@
"pages.register.connect-ledger.use-hid-confirm-title": "Unable to use Web HID",
"pages.register.connect-ledger.use-hid-confirm-paragraph": "Please enable ‘experimental web platform features’ to use Web HID",

"pages.register.connect-lattice1.title": "Connect your Lattice1",
"pages.register.connect-lattice1.paragraph": "Pair your Lattice1 and confirm the connection.",
"pages.register.connect-lattice1.step-1": "Open Lattice Connect to pair your device.",
"pages.register.connect-lattice1.step-2": "Unlock your Lattice1 and confirm the connection.",
"pages.register.connect-lattice1.error-title": "Unable to connect to Lattice1",
"pages.register.connect-lattice1.error-permission": "Check your Lattice Manager permissions. If you removed this wallet in Keplr, remove the Keplr permission in Lattice Manager and try again.",
"pages.register.connect-lattice1.error-permission-link": "Lattice Manager troubleshooting guide",

"pages.register.connect-keystone.paragraph": "Please unlock your Keystone device and connect it to your computer via USB.",
"pages.register.connect-keystone.step-text": "Step {num}",
"pages.register.connect-keystone.step-1": "Tap “<span>Connect Software Wallet</span>” at the bottom left corner on the Keystone device.",
Expand Down Expand Up @@ -592,6 +601,11 @@
"page.sign.components.ledger-guide.box.sign-on-ledger-title": "Sign on Ledger",
"page.sign.components.ledger-guide.box.sign-on-ledger-paragraph": "To proceed, please review and approve the transaction on your Ledger device.",

"page.sign.components.lattice1-guide.box.error-title": "Error",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-title": "Sign on Lattice1",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-paragraph": "Review and approve the request on your Lattice1.",
"page.sign.components.lattice1-guide.box.connect-lattice1-paragraph": "Make sure your Lattice1 is unlocked and on the same network.",

"page.sign.keystone.title": "Scan the QR Code",
"page.sign.keystone.scan-qrcode": "Scan the QR code via your Keystone device",
"page.sign.keystone.click-get-signature": "Click on the 'Get Signature' button after signing the transaction with your Keystone device.",
Expand Down
14 changes: 14 additions & 0 deletions apps/extension/src/languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@
"pages.register.connect-hardware.content.title": "케플러와 연결하고 싶은 하드웨어 지갑을 선택해주세요.",
"pages.register.connect-hardware.connect-ledger-button": "렛저 계정 연결하기",
"pages.register.connect-hardware.connect-keystone-button": "키스톤 계정 연결하기",
"pages.register.connect-hardware.connect-lattice1-button": "Lattice1 연결하기",

"pages.register.new-mnemonic.title": "새로운 복구 문구",
"pages.register.new-mnemonic.12-words-tab": "12 단어",
Expand Down Expand Up @@ -140,6 +141,14 @@
"pages.register.connect-ledger.use-hid-confirm-title": "웹 HID를 사용할 수 없습니다.",
"pages.register.connect-ledger.use-hid-confirm-paragraph": "웹 HID를 사용하시려면, ‘실험적 웹 플랫폼 기능’을 활성화해야 합니다.",

"pages.register.connect-lattice1.title": "Lattice1을 연결하세요",
"pages.register.connect-lattice1.paragraph": "Lattice1을 페어링하고 연결을 승인하세요.",
"pages.register.connect-lattice1.step-1": "Lattice Connect를 열어 기기를 페어링하세요.",
"pages.register.connect-lattice1.step-2": "Lattice1을 잠금 해제하고 연결을 승인하세요.",
"pages.register.connect-lattice1.error-title": "Lattice1에 연결할 수 없습니다",
"pages.register.connect-lattice1.error-permission": "Lattice Manager 권한을 확인하세요. Keplr에서 이 지갑을 삭제했다면 Lattice Manager에서 Keplr 권한을 제거한 다음 다시 시도하세요.",
"pages.register.connect-lattice1.error-permission-link": "Lattice Manager 문제 해결 안내",

"pages.register.connect-keystone.title": "하드웨어 지갑을 연결해주세요.",
"pages.register.connect-keystone.step-text": "{num} 단계",
"pages.register.connect-keystone.step-1": "키스톤 장치 왼쪽 하단의 “<span>소프트웨어 지갑 연결</span>” 버튼을 누르세요.",
Expand Down Expand Up @@ -575,6 +584,11 @@
"page.sign.components.ledger-guide.box.sign-on-ledger-title": "렛저에서 서명하기",
"page.sign.components.ledger-guide.box.sign-on-ledger-paragraph": "계속 하시려면, 렛저에서 트랜잭션을 확인하고 승인해야 합니다.",

"page.sign.components.lattice1-guide.box.error-title": "오류",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-title": "Lattice1에서 서명하기",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-paragraph": "Lattice1에서 요청 내용을 확인하고 승인하세요.",
"page.sign.components.lattice1-guide.box.connect-lattice1-paragraph": "Lattice1이 잠금 해제되어 있고 동일한 네트워크에 있는지 확인하세요.",

"page.sign.keystone.title": "QR 코드를 스캔하세요",
"page.sign.keystone.scan-qrcode": "키스톤 장치로 QR 코드를 스캔하세요",
"page.sign.keystone.click-get-signature": "키스톤 장치에서 트랜잭션을 서명한 후, '서명정보 받아오기' 버튼을 누르세요.",
Expand Down
14 changes: 14 additions & 0 deletions apps/extension/src/languages/zh-cn.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
"pages.register.connect-hardware.content.title": "选择你想要与Keplr一起使用的硬件钱包",
"pages.register.connect-hardware.connect-ledger-button": "连接Ledger",
"pages.register.connect-hardware.connect-keystone-button": "连接Keystone",
"pages.register.connect-hardware.connect-lattice1-button": "连接Lattice1",

"pages.register.new-mnemonic.title": "新助记词",
"pages.register.new-mnemonic.12-words-tab": "12个词",
Expand Down Expand Up @@ -137,6 +138,14 @@
"pages.register.connect-ledger.use-hid-confirm-title": "无法使用Web HID",
"pages.register.connect-ledger.use-hid-confirm-paragraph": "请启用“实验性Web平台功能”以使用Web HID",

"pages.register.connect-lattice1.title": "连接你的Lattice1",
"pages.register.connect-lattice1.paragraph": "配对 Lattice1 并确认连接。",
"pages.register.connect-lattice1.step-1": "打开 Lattice Connect 以配对设备。",
"pages.register.connect-lattice1.step-2": "解锁你的 Lattice1 并确认连接。",
"pages.register.connect-lattice1.error-title": "无法连接到 Lattice1",
"pages.register.connect-lattice1.error-permission": "请检查 Lattice Manager 权限。如果你在 Keplr 中删除了此钱包,请在 Lattice Manager 中移除 Keplr 权限后重试。",
"pages.register.connect-lattice1.error-permission-link": "Lattice Manager 故障排除指南",

"pages.register.connect-keystone.title": "请连接你的硬件钱包",
"pages.register.connect-keystone.step-text": "步骤 {num}",
"pages.register.connect-keystone.step-1": "点击Keystone设备左下角的“<span>连接软件钱包</span>”。",
Expand Down Expand Up @@ -541,6 +550,11 @@
"page.sign.components.ledger-guide.box.sign-on-ledger-title": "Ledger签名",
"page.sign.components.ledger-guide.box.sign-on-ledger-paragraph": "要继续,请在你的Ledger设备上查看并确认交易。",

"page.sign.components.lattice1-guide.box.error-title": "错误",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-title": "在 Lattice1 上签名",
"page.sign.components.lattice1-guide.box.sign-on-lattice1-paragraph": "请在你的 Lattice1 上查看并批准请求。",
"page.sign.components.lattice1-guide.box.connect-lattice1-paragraph": "请确保你的 Lattice1 已解锁并连接到同一网络。",

"page.sign.keystone.title": "扫描二维码",
"page.sign.keystone.scan-qrcode": "通过你的Keystone设备扫描二维码",
"page.sign.keystone.click-get-signature": "使用Keystone设备签名交易后,点击“获取签名”按钮。",
Expand Down
Loading