Skip to content

Commit 990fb79

Browse files
committed
chore: update dependencies
1 parent 044505c commit 990fb79

File tree

14 files changed

+174
-182
lines changed

14 files changed

+174
-182
lines changed

Cargo.lock

Lines changed: 146 additions & 145 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ strip = true
2020
opt-level = 's'
2121

2222
[workspace.package]
23-
version = "0.6.0"
23+
version = "0.6.1"
2424
edition = "2021"
2525
repository = "https://github.com/ldclabs/ic-tee"
2626
keywords = ["tee", "canister", "icp", "nitro"]
@@ -47,7 +47,7 @@ base64 = "0.22"
4747
clap = { version = "4.5", features = ["derive"] }
4848
candid = "0.10"
4949
ciborium = "0.2"
50-
const-hex = "1"
50+
hex = "0.4"
5151
lazy_static = "1.5"
5252
serde = "1"
5353
serde_json = "1"

src/declarations/ic_tee_identity_canister/ic_tee_identity_canister.did

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type ChainArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
1+
type CanArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
22
type Delegation = record {
33
pubkey : blob;
44
targets : opt vec principal;
@@ -23,7 +23,7 @@ type UpgradeArgs = record {
2323
session_expires_in_ms : opt nat64;
2424
name : opt text;
2525
};
26-
service : (opt ChainArgs) -> {
26+
service : (opt CanArgs) -> {
2727
get_delegation : (blob, blob, nat64) -> (Result) query;
2828
get_state : () -> (Result_1) query;
2929
sign_in : (text, blob) -> (Result_2);

src/declarations/ic_tee_identity_canister/ic_tee_identity_canister.did.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { Principal } from '@dfinity/principal';
22
import type { ActorMethod } from '@dfinity/agent';
33
import type { IDL } from '@dfinity/candid';
44

5-
export type ChainArgs = { 'Upgrade' : UpgradeArgs } |
5+
export type CanArgs = { 'Upgrade' : UpgradeArgs } |
66
{ 'Init' : InitArgs };
77
export interface Delegation {
88
'pubkey' : Uint8Array | number[],

src/declarations/ic_tee_identity_canister/ic_tee_identity_canister.did.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const idlFactory = ({ IDL }) => {
77
'session_expires_in_ms' : IDL.Nat64,
88
'name' : IDL.Text,
99
});
10-
const ChainArgs = IDL.Variant({ 'Upgrade' : UpgradeArgs, 'Init' : InitArgs });
10+
const CanArgs = IDL.Variant({ 'Upgrade' : UpgradeArgs, 'Init' : InitArgs });
1111
const Delegation = IDL.Record({
1212
'pubkey' : IDL.Vec(IDL.Nat8),
1313
'targets' : IDL.Opt(IDL.Vec(IDL.Principal)),
@@ -50,6 +50,6 @@ export const init = ({ IDL }) => {
5050
'session_expires_in_ms' : IDL.Nat64,
5151
'name' : IDL.Text,
5252
});
53-
const ChainArgs = IDL.Variant({ 'Upgrade' : UpgradeArgs, 'Init' : InitArgs });
54-
return [IDL.Opt(ChainArgs)];
53+
const CanArgs = IDL.Variant({ 'Upgrade' : UpgradeArgs, 'Init' : InitArgs });
54+
return [IDL.Opt(CanArgs)];
5555
};

src/ic_tee_cdk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ ic-canister-sig-creation = { workspace = true }
1818
ic_auth_types = { workspace = true }
1919

2020
[dev-dependencies]
21-
const-hex = { workspace = true }
21+
hex = { workspace = true }

src/ic_tee_cdk/src/identity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ mod tests {
3939
let kind = "NITRO";
4040
let seed = [8u8; 32];
4141
let user_key = canister_user_key(canister, kind, &seed, None).to_der();
42-
println!("{:?}", const_hex::encode(user_key.as_slice()));
42+
println!("{:?}", hex::encode(user_key.as_slice()));
4343
assert!(is_sub(&user_key, canister.as_slice()));
4444
assert!(is_sub(&user_key, kind.as_bytes()));
4545
assert!(!is_sub(&user_key, seed.as_slice()));

src/ic_tee_cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ ic_tee_nitro_attestation = { path = "../ic_tee_nitro_attestation", version = "0.
1616
candid = { workspace = true, features = ["value", "printer"] }
1717
serde_bytes = { workspace = true }
1818
tokio = { workspace = true }
19-
const-hex = { workspace = true }
19+
hex = { workspace = true }
2020
ic-agent = { workspace = true }
2121
ed25519-consensus = { workspace = true }
2222
ic_cose = { workspace = true }

src/ic_tee_cli/src/main.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ async fn main() -> Result<(), BoxError> {
230230
rng.fill_bytes(&mut bytes);
231231
match format.as_str() {
232232
"hex" => {
233-
println!("{}", const_hex::encode(&bytes));
233+
println!("{}", hex::encode(&bytes));
234234
}
235235
"base64" => {
236236
println!("{}", BASE64_URL_SAFE_NO_PAD.encode(&bytes));
@@ -291,21 +291,15 @@ async fn main() -> Result<(), BoxError> {
291291
if let Ok(doc) = String::from_utf8(payload.clone()) {
292292
println!("-----------:payload:-----------\n{}", doc);
293293
} else {
294-
println!(
295-
"-----------:payload:-----------\n{}",
296-
const_hex::encode(&payload)
297-
);
294+
println!("-----------:payload:-----------\n{}", hex::encode(&payload));
298295
}
299296
} else if *vetkey && res.payload.is_some() {
300297
let (vk, _dpk) = cose.vetkey(&path).await?;
301298
let payload = vetkey_decrypt_payload(&vk, &res.payload.unwrap())?;
302299
if let Ok(doc) = String::from_utf8(payload.clone()) {
303300
println!("-----------:payload:-----------\n{}", doc);
304301
} else {
305-
println!(
306-
"-----------:payload:-----------\n{}",
307-
const_hex::encode(&payload)
308-
);
302+
println!("-----------:payload:-----------\n{}", hex::encode(&payload));
309303
}
310304
} else {
311305
pretty_println(&res)?;
@@ -507,6 +501,6 @@ where
507501

508502
fn decode_hex(s: &str) -> Result<Vec<u8>, BoxError> {
509503
let s = s.replace("\\", "");
510-
let rt = const_hex::decode(s.strip_prefix("0x").unwrap_or(&s))?;
504+
let rt = hex::decode(s.strip_prefix("0x").unwrap_or(&s))?;
511505
Ok(rt)
512506
}

src/ic_tee_identity_canister/ic_tee_identity_canister.did

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type ChainArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
1+
type CanArgs = variant { Upgrade : UpgradeArgs; Init : InitArgs };
22
type Delegation = record {
33
pubkey : blob;
44
targets : opt vec principal;
@@ -23,7 +23,7 @@ type UpgradeArgs = record {
2323
session_expires_in_ms : opt nat64;
2424
name : opt text;
2525
};
26-
service : (opt ChainArgs) -> {
26+
service : (opt CanArgs) -> {
2727
get_delegation : (blob, blob, nat64) -> (Result) query;
2828
get_state : () -> (Result_1) query;
2929
sign_in : (text, blob) -> (Result_2);

0 commit comments

Comments
 (0)