Skip to content

Commit

Permalink
More docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adamspofford-dfinity committed Oct 2, 2023
1 parent fc0fa02 commit 16a305d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ic-transport-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl Delegation {
}
}

/// A [`Delegation`] that has been signed by an [`Identity`].
/// 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)]
pub struct SignedDelegation {
/// The signed delegation.
Expand Down
4 changes: 2 additions & 2 deletions ic-transport-types/src/request_id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
//!
//! A request ID is a SHA256 hash of the request's body. See
//! [Representation-independent Hashing of Structured Data](https://internetcomputer.org/docs/current/references/ic-interface-spec#hash-of-map)
/// from the IC spec for the method of calculation.
//! from the IC spec for the method of calculation.
use error::RequestIdFromStringError;
use serde::{
ser::{
Expand Down Expand Up @@ -60,7 +60,7 @@ impl RequestId {
}

/// Returns the signable form of the request ID, by prepending `"\x0Aic-request"` to it,
/// for use in [`Identity::sign`](crate::identity::Identity::sign).
/// for use in [`Identity::sign`](https://docs.rs/ic-agent/latest/ic_agent/trait.Identity.html#tymethod.sign).
pub fn signable(&self) -> Vec<u8> {
let mut signable = Vec::with_capacity(43);
signable.extend_from_slice(IC_REQUEST_DOMAIN_SEPARATOR);
Expand Down
9 changes: 6 additions & 3 deletions ic-transport-types/src/signed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ use crate::request_id::RequestId;
use candid::Principal;
use serde::{Deserialize, Serialize};

/// A signed query request message. Produced by [`QueryBuilder::sign`](super::QueryBuilder::sign).
/// A signed query request message. Produced by
/// [`QueryBuilder::sign`](https://docs.rs/ic-agent/latest/ic_agent/agent/struct.QueryBuilder.html#method.sign).
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SignedQuery {
/// The Unix timestamp that the request will expire at.
Expand All @@ -25,7 +26,8 @@ pub struct SignedQuery {
pub signed_query: Vec<u8>,
}

/// A signed update request message. Produced by [`UpdateBuilder::sign`](super::UpdateBuilder::sign).
/// A signed update request message. Produced by
/// [`UpdateBuilder::sign`](https://docs.rs/ic-agent/latest/ic_agent/agent/struct.UpdateBuilder.html#method.sign).
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SignedUpdate {
/// A nonce to uniquely identify this update call.
Expand Down Expand Up @@ -53,7 +55,8 @@ pub struct SignedUpdate {
pub request_id: RequestId,
}

/// A signed request-status request message. Produced by [`Agent::sign_request_status`](super::Agent::sign_request_status).
/// A signed request-status request message. Produced by
/// [`Agent::sign_request_status`](https://docs.rs/ic-agent/latest/ic_agent/agent/struct.Agent.html#method.sign_request_status).
#[derive(Debug, Clone, Deserialize, Serialize)]
pub struct SignedRequestStatus {
/// The Unix timestamp that the request will expire at.
Expand Down

0 comments on commit 16a305d

Please sign in to comment.