Skip to content

Commit

Permalink
Forward Identity methods
Browse files Browse the repository at this point in the history
  • Loading branch information
adamspofford-dfinity committed Sep 21, 2023
1 parent 0994cf2 commit 7924765
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/dfx-core/src/identity/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ use crate::identity::identity_file_locations::IdentityFileLocations;
use crate::json::{load_json_file, save_json_file};
use candid::Principal;
use ic_agent::agent::EnvelopeContent;
use ic_agent::identity::{AnonymousIdentity, BasicIdentity, Secp256k1Identity};
use ic_agent::identity::{
AnonymousIdentity, BasicIdentity, Delegation, Secp256k1Identity, SignedDelegation,
};
use ic_agent::Signature;
use ic_identity_hsm::HardwareIdentity;
pub use identity_manager::{
Expand Down Expand Up @@ -253,9 +255,21 @@ impl ic_agent::Identity for Identity {
self.inner.public_key()
}

fn delegation_chain(&self) -> Vec<SignedDelegation> {
self.inner.delegation_chain()
}

fn sign(&self, content: &EnvelopeContent) -> Result<Signature, String> {
self.inner.sign(content)
}

fn sign_arbitrary(&self, content: &[u8]) -> Result<Signature, String> {
self.inner.sign_arbitrary(content)
}

fn sign_delegation(&self, content: &Delegation) -> Result<Signature, String> {
self.inner.sign_delegation(content)
}
}

impl AsRef<Identity> for Identity {
Expand Down

0 comments on commit 7924765

Please sign in to comment.