Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
5b80152
First pass
GTC6244 Feb 2, 2026
373303b
Add Csharp, kotlin, python & swift sdks.
GTC6244 Feb 2, 2026
00b7b1f
move files around.
GTC6244 Feb 2, 2026
a48db7a
sign & combine & move files.
GTC6244 Feb 2, 2026
2241b17
update sdk functions
GTC6244 Feb 2, 2026
29730c3
Updating signature handling.
GTC6244 Feb 4, 2026
e50fa20
Merge branch 'master' into feature/node-4963-lit-node-api
GTC6244 Feb 5, 2026
d46fe3f
Start with transfer EVM extensions
GTC6244 Feb 6, 2026
302f118
updated tests and signing request/responses. switched out wasm from …
GTC6244 Feb 6, 2026
9d23d48
Update SDK references from js_sdk.js to js_core_sdk.js across multipl…
GTC6244 Feb 6, 2026
9f6a86d
Remove obsolete transfer-related type definitions and methods from js…
GTC6244 Feb 6, 2026
162a624
Add transfer functionality to the API in index.html
GTC6244 Feb 6, 2026
5970b2c
Enhance transfer functionality in index.html
GTC6244 Feb 6, 2026
a111544
Refactor transfer API and enhance UI in index.html
GTC6244 Feb 6, 2026
3c0ef83
Enhance transfer API and UI in index.html
GTC6244 Feb 6, 2026
59b1725
Refine transfer API and UI in index.html
GTC6244 Feb 6, 2026
2988d2f
Remove outdated documentation and SDK files for the Lit Node Simple API
GTC6244 Feb 6, 2026
9cf34b9
Enhance SWPS app functionality and API integration
GTC6244 Feb 6, 2026
d06a621
Refactor API integration and enhance UI in index.html
GTC6244 Feb 6, 2026
3f23985
start on swaps
GTC6244 Feb 7, 2026
4b5b5f0
update actual intents
GTC6244 Feb 8, 2026
7b4bfec
updated contract genetaor and deployer.
GTC6244 Feb 8, 2026
d281a78
switch gwei to eth ( native ) for UI
GTC6244 Feb 9, 2026
d670a5d
move the lit-node-simple-api out of this repo
GTC6244 Feb 9, 2026
629e68f
cargo fmt / clippy!
GTC6244 Feb 9, 2026
6690221
Update rust/lit-node/lit-node-testnet/src/end_user/mod.rs
GTC6244 Feb 9, 2026
aa443a3
update cargo locks for lit-os
GTC6244 Feb 9, 2026
cbf5df2
code reduction!
GTC6244 Feb 10, 2026
6412d2d
add lit-api-server feature flag
GTC6244 Feb 10, 2026
2e83438
rename feature flag to lit-peer-api-server
GTC6244 Feb 10, 2026
88d79a7
Merge branch 'master' into feature/node-4963-lit-node-api
GTC6244 Feb 10, 2026
8c718b9
ack->> feature name should match.
GTC6244 Feb 10, 2026
cb40674
Update contracts for datil when in test mode.
GTC6244 Feb 11, 2026
ad09b3d
move nodeset code to actions ( helpful for api server )
GTC6244 Feb 11, 2026
814d3ec
build for API server ( only a testnet, nothing else )
GTC6244 Feb 11, 2026
8d87f76
wrap new_user from_secret in a result
GTC6244 Feb 11, 2026
0ae94a6
get curdir
GTC6244 Feb 12, 2026
5fbc9a3
debug
GTC6244 Feb 12, 2026
2215db1
build_for_api_server update.
GTC6244 Feb 12, 2026
532ab45
test
GTC6244 Feb 12, 2026
2390396
test to remove anvil for datil.
GTC6244 Feb 12, 2026
1e94f4a
feature flags
GTC6244 Feb 12, 2026
c01a0be
take 333
GTC6244 Feb 12, 2026
63d837e
minimize api server testnet setup
GTC6244 Feb 12, 2026
5a06a7e
exclude wallet top ups from peer-api-server
GTC6244 Feb 12, 2026
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
8 changes: 8 additions & 0 deletions rust/lit-node/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions rust/lit-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,12 @@ scc = "3"
sdd = "4"
sha2 = "0.10.9"
sha3 = "0.10.8"
siwe = "0.5.0"
siwe-recap = { git = "https://github.com/spruceid/siwe-recap" }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
soteria-rs = { version = "0.3.1", features = ["serde", "elements"] }
tracing = "0.1.40"
url = { version = "2", features = ["serde"] }
utoipa = { version = "5", features = ["chrono"] }
zeroize = { version = "1.8", features = ["derive"] }
Expand Down
4 changes: 4 additions & 0 deletions rust/lit-node/lit-node-core/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ mod endpoint_version;
mod invocation;
mod multiple_auth_sigs;
mod node_set;
mod payed_endpoint;
mod payment_delegation_resource;
mod peer_id;
mod pkp_nft_resource;
Expand All @@ -26,6 +27,7 @@ mod resource_ability_request;
mod resource_ability_request_resource;
mod resource_prefix;
mod resource_type;
mod session_key;
mod signable;
mod signed_data;
mod signing_scheme;
Expand All @@ -47,6 +49,7 @@ pub use endpoint_version::*;
pub use invocation::*;
pub use multiple_auth_sigs::*;
pub use node_set::*;
pub use payed_endpoint::*;
pub use payment_delegation_resource::*;
pub use peer_id::*;
pub use pkp_nft_resource::*;
Expand All @@ -55,6 +58,7 @@ pub use resource_ability_request::*;
pub use resource_ability_request_resource::*;
pub use resource_prefix::*;
pub use resource_type::*;
pub use session_key::*;
pub use signable::*;
pub use signed_data::*;
pub use signing_scheme::*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use ethers::types::U256;
use std::str::FromStr;

use crate::error::{EC, Error, Result, parser_err_code};
use crate::error::{Error, Result};

#[derive(Clone, Copy, PartialEq, Debug)]
pub enum PayedEndpoint {
Expand All @@ -19,11 +19,7 @@ impl FromStr for PayedEndpoint {
"lit_action" => Ok(PayedEndpoint::LitAction),
"pkp_sign" => Ok(PayedEndpoint::PkpSign),
"sign_session_key" => Ok(PayedEndpoint::SignSessionKey),
_ => Err(parser_err_code(
"",
EC::NodeSerializationError,
Some(format!("`{s}` is not a valid PayedEndpoint")),
)),
_ => Err(Error::Parse(format!("`{s}` is not a valid PayedEndpoint"))),
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use super::JsonAuthSig;
use crate::LitResourceAbilityRequest;
use ethers::types::U256;
use lit_node_core::LitResourceAbilityRequest;
use serde::{Deserialize, Deserializer, Serialize, de::Error};

#[derive(Debug, Clone, Serialize, Deserialize)]
Expand All @@ -21,16 +21,8 @@ where
D: Deserializer<'de>,
{
let s: &str = Deserialize::deserialize(deserializer)?;
let result = match s.starts_with("0x") {
true => U256::from_str_radix(&s[2..], 16).map_err(D::Error::custom),
false => U256::from_str_radix(s, 10).map_err(D::Error::custom),
};

if result.is_err() {
debug!(
"Deserializing max_price '{}' to U256 failed: {:?}",
s, result
);
match s.starts_with("0x") {
true => Ok(U256::from_str_radix(&s[2..], 16).map_err(D::Error::custom)?),
false => Ok(U256::from_str_radix(s, 10).map_err(D::Error::custom)?),
}
result
}
20 changes: 19 additions & 1 deletion rust/lit-node/lit-node-testnet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ lit-actions = []
proxy_chatter = []
lit-actions-server = ["lit-actions"] # start internal lit_actions server for testing
testing = [] # enables testing features

lit-peer-api-server = [] # disables certain functions not required for the api server


[build-dependencies]
Expand All @@ -26,12 +26,15 @@ async-trait.workspace = true
bs58 = "0.5.0"
command-group = "1.0.8"
chrono = "0.4.24"
data-encoding.workspace = true
ethers = { version = "2.0.8", features = [ "abigen", "legacy" ]}
fs_extra = "1.3.0"
futures = "0.3.17"
hex.workspace = true
hex-literal = "0.4.1"

ecdsa = { version = "0.16", features = ["arithmetic"] }
ed25519-dalek.workspace = true
k256 = { version = "0.13.0", features = ["sha256", "ecdsa", "serde", "ecdsa-core", "expose-field", "hash2curve", "schnorr"], optional = false }
once_cell = { version = "1" }
rand = { workspace = true, features = ["std_rng"]}
Expand All @@ -42,19 +45,34 @@ regex = "1.7.1"
# used to verify JWTs. must match the version in the crate overrides at the bottom of this file
sodalite = "0.4"
serde_json.workspace = true
siwe.workspace = true
siwe-recap.workspace = true
tokio = { version = "1.23.0", features = ["rt-multi-thread"] }
tracing = "0.1.40"
tracing-subscriber = { version = "0.3" }
url = { version = "2", features = ["serde"] }
#ECDSA
lit-ecdsa-wasm-combine = { git = "https://github.com/LIT-Protocol/lit-ecdsa-wasm-combine", branch = "0.2.0" }
lit-core = { path = "../../lit-core/lit-core", features = ["ipfs", "chrono"] }
lit-api-core = { path = "../../lit-core/lit-api-core" }
lit-logging = { path = "../../lit-core/lit-logging", features = ["service"] }
lit-blockchain = { path = "../../lit-core/lit-blockchain" }
lit-blockchain-lite = { git="https://github.com/LIT-Protocol/datil-lit-blockchain-lite.git" }
lit-attestation = { path = "../../lit-core/lit-attestation", features = ["generate-via-service", "kdf"] }
lit-node-common ={ path = "../lit-node-common" }
lit-node-core = { path = "../lit-node-core" }
lit-sdk = { path = "../lit-sdk" }
lit-rust-crypto = { workspace = true, features = [
"arithmetic",
"default",
"ecdsa",
"ecdsa-core",
"expose-field",
"hash2curve",
"schnorr",
"sha",
"serde"
] }
toml_edit = "0.22"
toxiproxy_rust = "*"
uuid = { version = "1.4", features = ["v4"] }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use ethers::abi::AbiEncode;
use std::collections::{BTreeMap, HashMap};
use std::ops::Add;
use std::str::FromStr;

use anyhow::Result;
use chrono::{Duration, SecondsFormat};
Expand All @@ -12,9 +11,10 @@ use ethers::types::{Address, H256, U256};
use lit_api_core::error::Unexpected;
use lit_blockchain::config::LitBlockchainConfig;
use lit_core::config::LitConfig;
use lit_node::models::auth::SessionKeySignedMessageV2;
use lit_node::payment::payed_endpoint::PayedEndpoint;
use lit_node::utils::encoding::{self, hex_to_bytes};
use lit_core::utils::binary::{bytes_to_hex, hex_to_bytes};
use lit_node_core::PayedEndpoint;
use lit_node_core::SessionKeySignedMessageV2;

use lit_node_core::{
AuthMethod, AuthSigItem, CurveType, JsonAuthSig, LitResourceAbilityRequest, LitResourcePrefix,
NodeSet,
Expand All @@ -37,7 +37,7 @@ use lit_node_core::response::GenericResponse;
use rand_core::RngCore;

use super::session_sigs::SessionSigAndNodeSet;
use lit_node_testnet::node_collection::NodeIdentityKey;
use crate::node_collection::NodeIdentityKey;
use lit_rust_crypto::k256;
use lit_sdk::UrlPrefix;

Expand Down Expand Up @@ -99,7 +99,8 @@ Expiration Time: {expiration_datetime}"

#[tokio::test]
async fn test_generate_authsig() {
super::setup_logging();
use std::str::FromStr;
use tracing::error;

unsafe {
std::env::set_var("LIT_CONFIG_FILE", "./config/test/lit_sig_cfg.toml");
Expand Down Expand Up @@ -193,7 +194,7 @@ pub fn get_auth_sig_with_payment_resources(
sig.to_string(),
"web3.eth.personal.sign".to_string(),
siwe_message.to_string(),
encoding::bytes_to_hex(delegator_wallet.address()),
bytes_to_hex(delegator_wallet.address()),
None,
)
}
Expand Down Expand Up @@ -253,7 +254,7 @@ pub fn get_auth_sig_for_session_sig(
sig.expect("Could not parse sig").to_string(),
"web3.eth.personal.sign".to_string(),
siwe_message.to_string(),
encoding::bytes_to_hex(wallet.address()),
bytes_to_hex(wallet.address()),
None,
)
}
Expand All @@ -269,7 +270,7 @@ pub fn get_session_sigs_for_auth(
// Generate ed25519 keypair for signing.
let signing_key = ed25519_dalek::SigningKey::generate(&mut rand::rngs::OsRng);
let verifying_key = signing_key.verifying_key();
let session_pub_key = encoding::bytes_to_hex(verifying_key.to_bytes());
let session_pub_key = bytes_to_hex(verifying_key.to_bytes());

// Sign SIWE first using the local wallet.
let auth_sig = get_auth_sig_for_session_sig(
Expand Down Expand Up @@ -409,7 +410,7 @@ pub async fn get_session_delegation_sig_for_pkp(
serialized_signature,
"lit.bls".to_string(),
one_response_with_share.siwe_message.clone(),
encoding::bytes_to_hex(eth_address),
bytes_to_hex(eth_address),
Some("LIT_BLS".to_string()),
))
}
Expand All @@ -430,7 +431,7 @@ pub async fn get_session_sigs_and_node_set_for_pkp(
// Generate ed25519 keypair for signing.
let signing_key = ed25519_dalek::SigningKey::generate(&mut rand::rngs::OsRng);
let verifying_key = signing_key.verifying_key();
let session_pub_key = encoding::bytes_to_hex(verifying_key.to_bytes());
let session_pub_key = bytes_to_hex(verifying_key.to_bytes());

let pkp_owner_auth_sig = generate_authsig(&auth_sig_wallet).await?;

Expand Down
Loading
Loading