Skip to content
Merged
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [0.48.1] - 2026-07-07

* `ic-transport-types`: `Delegation`, `SignedDelegation`, and `DelegationPermissions` now derive `candid::CandidType`, so they can be used directly in Candid interfaces (e.g. matching Internet Identity's `Delegation`/`SignedDelegation` types). The generated Candid maps the byte fields to `blob` and `DelegationPermissions` to `variant { queries; all }`; the added `permissions` field is `opt`, so the encoding stays subtype-compatible with delegation interfaces that omit it.

## [0.48.0] - 2026-07-04

* `ic-transport-types` / `ic-agent`: Added a `permissions` field to `Delegation` and a new `DelegationPermissions` enum (`Queries` | `All`) describing which request kinds a signed delegation authorizes, matching the IC interface-spec addition for read-only delegations. The field serializes as `"queries"`/`"all"` and is omitted when `None`, so existing delegations (which leave it `None`) hash and verify exactly as before. `DelegationPermissions` is re-exported from `ic_agent::identity` alongside `Delegation` and `SignedDelegation`.
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
]

[workspace.package]
version = "0.48.0"
version = "0.48.1"
authors = ["DFINITY Stiftung <sdk@dfinity.org>"]
edition = "2021"
repository = "https://github.com/dfinity/agent-rs"
Expand All @@ -30,10 +30,10 @@ license = "Apache-2.0"
# a comment listing those crates). Otherwise, features are declared in the individual crate Cargo.toml.
#
# The path dependencies below ensure all workspace members use the same version of internal crates.
ic-agent = { path = "ic-agent", version = "0.48.0", default-features = false }
ic-identity-hsm = { path = "ic-identity-hsm", version = "0.48.0" }
ic-transport-types = { path = "ic-transport-types", version = "0.48.0" }
ic-utils = { path = "ic-utils", version = "0.48.0" }
ic-agent = { path = "ic-agent", version = "0.48.1", default-features = false }
ic-identity-hsm = { path = "ic-identity-hsm", version = "0.48.1" }
ic-transport-types = { path = "ic-transport-types", version = "0.48.1" }
ic-utils = { path = "ic-utils", version = "0.48.1" }
ic-utils-bindgen = { path = "ic-utils-bindgen" }
ref-tests = { path = "ref-tests" }

Expand Down
8 changes: 4 additions & 4 deletions ic-transport-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

use std::borrow::Cow;

use candid::Principal;
use candid::{CandidType, Principal};
use ic_certification::Label;
pub use request_id::{to_request_id, RequestId, RequestIdError};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -381,7 +381,7 @@ pub struct ReplyResponse {
///
/// If key A signs a delegation containing key B, then key B may be used to
/// authenticate as key A's corresponding principal(s).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, CandidType, Serialize, Deserialize)]
pub struct Delegation {
/// The delegated-to key.
#[serde(with = "serde_bytes")]
Expand All @@ -397,7 +397,7 @@ pub struct Delegation {
}

/// The kinds of requests a [`Delegation`] permits.
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Serialize, Deserialize)]
#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, CandidType, Serialize, Deserialize)]
pub enum DelegationPermissions {
/// Only query calls and `read_state` requests are permitted.
#[serde(rename = "queries")]
Expand All @@ -422,7 +422,7 @@ impl Delegation {
}

/// A [`Delegation`] that has been signed by an [`Identity`](https://docs.rs/ic-agent/latest/ic_agent/trait.Identity.html).
#[derive(Debug, Clone, Serialize, Deserialize)]
#[derive(Debug, Clone, CandidType, Serialize, Deserialize)]
pub struct SignedDelegation {
/// The signed delegation.
pub delegation: Delegation,
Expand Down
Loading