Skip to content
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
db81dfc
crypto: add teddsa_interface package
Ryz0nd Dec 23, 2025
bc62335
crypto: add teddsa_core Rust library
Ryz0nd Dec 23, 2025
696c9ed
crypto: add teddsa_wasm WASM bindings
Ryz0nd Dec 23, 2025
1c1267a
crypto: add teddsa_hooks TypeScript wrappers
Ryz0nd Dec 23, 2025
e99fc49
crypto: add teddsa_hooks TypeScript wrappers
Ryz0nd Dec 23, 2025
1e5f8cb
common: add Ed25519 types to oko_types
Ryz0nd Dec 23, 2025
9c4a610
ksn: add Ed25519 curve support
Ryz0nd Dec 23, 2025
72cd000
tss_api: add Ed25519 keygen endpoint
Ryz0nd Dec 23, 2025
2c20099
tss_api: add Ed25519 presign/sign endpoints
Ryz0nd Dec 23, 2025
f964c88
tss_api: add wallet_ed25519 public info endpoint
Ryz0nd Dec 23, 2025
c571b95
tss_api: update JWT for Ed25519 wallet
Ryz0nd Dec 23, 2025
49ff05b
Merge branch 'main' into dan/teddsa
chemonoworld Dec 24, 2025
871db8d
teddsa: remove teddsa_core
Ryz0nd Dec 24, 2025
1b5b107
teddsa: use frost_ed25519_keplr directly
Ryz0nd Dec 24, 2025
1681238
o
chemonoworld Dec 24, 2025
6fa6f78
teddsa: refactor and implement keygen and signing for Ed25519(combine)
chemonoworld Dec 24, 2025
dfa1ccc
teddsa: remove unused teddsa_hooks
Ryz0nd Dec 24, 2025
7c5d4a9
Revert "teddsa: remove unused teddsa_hooks"
Ryz0nd Dec 24, 2025
be408b1
teddsa: implement Ed25519 key recovery
Ryz0nd Dec 27, 2025
8396967
teddsa: impl KeyPackageRaw & PublicKeyPackageRaw for JS Object or JS …
chemonoworld Dec 29, 2025
4c77f08
o
chemonoworld Dec 29, 2025
e9a48ff
o
chemonoworld Dec 29, 2025
2c216db
teddsa: impl IdentifierRaw
chemonoworld Dec 29, 2025
ba23b17
teddsa: impl from_key_package method
chemonoworld Dec 29, 2025
e423610
o
chemonoworld Dec 29, 2025
6d5a67d
teddsa: impl to_key_package and to_public_key_package methods
chemonoworld Dec 29, 2025
88120ed
teddsa: refactor CentralizedKeygenOutputRaw
chemonoworld Dec 29, 2025
99d6a19
o
chemonoworld Dec 29, 2025
c3072c5
o
chemonoworld Dec 29, 2025
b9168bd
teddsa: refactor split and combine
chemonoworld Dec 29, 2025
d375432
o
chemonoworld Dec 29, 2025
0e797c6
teddsa: refactor reshare
chemonoworld Dec 29, 2025
7859edd
Revert "teddsa: implement Ed25519 key recovery"
Ryz0nd Dec 30, 2025
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
6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ members = [
"crypto/teddsa/frost_core",
"crypto/teddsa/frost_ed25519_keplr",
"crypto/teddsa/frost_rerandomized",
"crypto/teddsa/teddsa_addon/addon",
"crypto/teddsa/teddsa_keplr_mock",
"crypto/teddsa/teddsa_wasm_mock/wasm",
"crypto/teddsa/teddsa_keplr_addon_mock/addon",
Expand All @@ -32,5 +33,8 @@ proptest = "1.0"
rand = "0.8"
rand_chacha = "0.3"
rand_core = "0.6"
serde = { version = "1.0", default-features = false, features = ["derive", "alloc"] }
serde = { version = "1.0", default-features = false, features = [
"derive",
"alloc",
] }
serde_json = "1.0"
1 change: 1 addition & 0 deletions backend/oko_api/error_codes/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ export const ErrorCodeMap: Record<ErrorCode, number> = {
KS_NODE_ALREADY_ACTIVE: 400,
IMAGE_UPLOAD_FAILED: 500,
INVALID_PUBLIC_KEY: 400,
INVALID_WALLET_TYPE: 400,
REFERRAL_NOT_FOUND: 404,
UNKNOWN_ERROR: 500,
};
1 change: 1 addition & 0 deletions backend/openapi/src/tss/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from "./keygen_ed25519";
export * from "./presign";
export * from "./request";
export * from "./sign";
Expand Down
30 changes: 30 additions & 0 deletions backend/openapi/src/tss/keygen_ed25519.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { z } from "zod";

import { registry } from "../registry";

const TeddsaKeygenOutputSchema = registry.register(
"TeddsaKeygenOutput",
z.object({
key_package: z
.array(z.number())
.openapi({ description: "FROST KeyPackage bytes (contains secret share)" }),
public_key_package: z
.array(z.number())
.openapi({ description: "Public key package bytes (shared by all participants)" }),
identifier: z
.array(z.number())
.openapi({ description: "Participant identifier bytes" }),
public_key: z
.array(z.number())
.openapi({ description: "Ed25519 public key bytes (32 bytes)" }),
}),
);

export const KeygenEd25519RequestSchema = registry.register(
"TssKeygenEd25519Request",
z.object({
keygen_2: TeddsaKeygenOutputSchema.openapi({
description: "Server's keygen output from centralized key generation",
}),
}),
);
2 changes: 2 additions & 0 deletions backend/tss_api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
"@oko-wallet/social-login-api": "workspace:*",
"@oko-wallet/stdlib-js": "^0.0.2-rc.44",
"@oko-wallet/tecdsa-interface": "0.0.2-alpha.22",
"@oko-wallet/teddsa-addon": "workspace:*",
"@oko-wallet/teddsa-interface": "workspace:*",
"cors": "^2.8.5",
"dayjs": "^1.11.18",
"dotenv": "^16.4.5",
Expand Down
1 change: 1 addition & 0 deletions backend/tss_api/src/api/keplr_auth/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function generateUserToken(
const payload: UserTokenPayload = {
email: args.email,
wallet_id: args.wallet_id,
wallet_id_ed25519: args.wallet_id_ed25519,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A separate wallet_id_ed25519 was required because each curve type is stored as a distinct wallet record in the database. Do you have a better suggestion?

Copy link
Contributor

@chemonoworld chemonoworld Dec 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It depends on a coding style. I think it would be better that wallet_id is replaced with object like this.

wallet_ids: {
    [curveType: "secp256k1" | "ed25519"]: string
}

type: "user",
};

Expand Down
1 change: 1 addition & 0 deletions backend/tss_api/src/api/keygen/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export async function runKeygen(
publicKeyBytes,
activeKSNodes,
auth_type,
"secp256k1",
);
if (checkKeyshareFromKSNodesRes.success === false) {
return checkKeyshareFromKSNodesRes;
Expand Down
Loading