MCPcopy Create free account
hub / github.com/ceramicnetwork/rust-ceramic / new

Method new

core/src/node_id.rs:177–183  ·  view source on GitHub ↗

Construct a new key with both private and public keys.

(id: NodeId, private_key_bytes: [u8; 32])

Source from the content-addressed store, hash-verified

175impl NodeKey {
176 /// Construct a new key with both private and public keys.
177 fn new(id: NodeId, private_key_bytes: [u8; 32]) -> Self {
178 Self {
179 id,
180 private_key_bytes,
181 did: id.did(),
182 }
183 }
184
185 /// Construct a [`JWK`] with both the private and public keys.
186 pub fn jwk(&self) -> JWK {

Callers

nothing calls this directly

Calls 1

didMethod · 0.80

Tested by

no test coverage detected