Skip to content

Commit b487927

Browse files
committed
chore: update with ic-cdk v0.18
1 parent fbb9e58 commit b487927

File tree

7 files changed

+51
-34
lines changed

7 files changed

+51
-34
lines changed

Cargo.lock

Lines changed: 32 additions & 27 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ strip = true
1414
opt-level = 's'
1515

1616
[workspace.package]
17-
version = "0.8.4"
17+
version = "0.8.5"
1818
edition = "2021"
1919
repository = "https://github.com/ldclabs/ic-cose"
2020
keywords = ["config", "cbor", "canister", "icp", "encryption"]
@@ -47,6 +47,7 @@ ic-canister-sig-creation = "1.3"
4747
ic-agent = "0.40"
4848
ic_auth_types = "0.4"
4949
ic_auth_verifier = { version = "0.4" }
50+
# ic-vetkeys = "0.1"
5051
rand = "0.9"
5152
coset = "0.3"
5253
aes-gcm = "0.10"

examples/vetkeys/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import assert from 'assert'
55
import { EncryptedVetKey, DerivedPublicKey, TransportSecretKey, IbeCiphertext, IbeIdentity, IbeSeed } from '@dfinity/vetkeys'
66
import { randomBytes } from 'node:crypto'
77

8-
const IS_LOCAL = true
8+
const IS_LOCAL = false
99
const apiHost = IS_LOCAL ? 'http://127.0.0.1:4943' : 'https://icp-api.io'
1010
const canisterId = "53cyg-yyaaa-aaaap-ahpua-cai"
1111
// The principal is generated by generateIdentity()

src/ic_cose/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,12 @@ categories.workspace = true
1010
license.workspace = true
1111

1212
[dependencies]
13+
ic_cose_types = { path = "../ic_cose_types", version = "0.8" }
1314
async-trait = { workspace = true }
1415
candid = { workspace = true }
1516
serde_bytes = { workspace = true }
1617
rand = { workspace = true }
1718
ic-agent = { workspace = true }
1819
x25519-dalek = { workspace = true }
1920
ic_auth_types = { workspace = true }
20-
ic_cose_types = { path = "../ic_cose_types", version = "0.8" }
21+
# ic-vetkeys = { workspace = true }

src/ic_cose/src/client.rs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,15 @@ pub trait CoseSDK: CanisterCaller + Sized {
250250
async fn vetkd_encrypted_key(
251251
&self,
252252
path: &SettingPath,
253-
public_key: &ByteArray<48>,
253+
transport_public_key: &ByteArray<48>,
254254
) -> Result<ByteBuf, String> {
255-
self.canister_update(self.canister(), "vetkd_encrypted_key", (path, public_key))
256-
.await
257-
.map_err(format_error)?
255+
self.canister_update(
256+
self.canister(),
257+
"vetkd_encrypted_key",
258+
(path, transport_public_key),
259+
)
260+
.await
261+
.map_err(format_error)?
258262
}
259263

260264
async fn namespace_get_fixed_identity(

src/ic_cose/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use rand::RngCore;
22

33
pub mod agent;
44
pub mod client;
5+
// pub mod vetkeys;
56

67
pub fn rand_bytes<const N: usize>() -> [u8; N] {
78
let mut rng = rand::rng();

src/ic_cose/src/vetkeys.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pub use ic_vetkeys::{
2+
is_valid_transport_public_key_encoding, verify_bls_signature, DerivedPublicKey,
3+
EncryptedVetKey, IbeCiphertext, IbeIdentity, IbeSeed, MasterPublicKey, TransportSecretKey,
4+
VetKey,
5+
};

0 commit comments

Comments
 (0)