diff --git a/crypto/keys/ed25519.rs b/crypto/keys/ed25519.rs
index 0446123d96a381193f82b0b897b7e15716ebb720..3f60e0d59c8aec881e6984edb039436b59f3f003 100644
--- a/crypto/keys/ed25519.rs
+++ b/crypto/keys/ed25519.rs
@@ -19,6 +19,8 @@
 //!
 //! [`KeyPairGenerator`]: struct.KeyPairGenerator.html
 
+extern crate serde;
+
 use std::collections::hash_map::DefaultHasher;
 use std::fmt::Debug;
 use std::fmt::Display;
@@ -30,6 +32,7 @@ use base58::{FromBase58, FromBase58Error, ToBase58};
 use base64;
 use base64::DecodeError;
 use crypto;
+use self::serde::ser::{Serialize, Serializer};
 
 use super::{BaseConvertionError, PrivateKey as PrivateKeyMethods, PublicKey as PublicKeyMethods};
 
@@ -123,6 +126,15 @@ impl Debug for PublicKey {
     }
 }
 
+impl Serialize for PublicKey {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        serializer.serialize_str(&format!("{}", self))
+    }
+}
+
 impl super::PublicKey for PublicKey {
     type Signature = Signature;
 
diff --git a/documents/blockchain/v10/documents/certification.rs b/documents/blockchain/v10/documents/certification.rs
index 7579d2cc1f0e6570ae548350c465ac168cad708b..8a2f7955cc25155dae6a106a1ee8fc2f85c26d30 100644
--- a/documents/blockchain/v10/documents/certification.rs
+++ b/documents/blockchain/v10/documents/certification.rs
@@ -15,8 +15,11 @@
 
 //! Wrappers around Certification documents.
 
-use duniter_crypto::keys::{ed25519, PublicKey, Signature};
+extern crate serde;
+
+use duniter_crypto::keys::{PublicKey, Signature, ed25519};
 use regex::Regex;
+use self::serde::ser::{Serialize, Serializer};
 
 use blockchain::v10::documents::{StandardTextDocumentParser, TextDocument, TextDocumentBuilder,
                                  V10Document, V10DocumentParsingError};
@@ -115,6 +118,15 @@ impl TextDocument for CertificationDocument {
     }
 }
 
+impl Serialize for CertificationDocument {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        serializer.serialize_str(&self.generate_compact_text())
+    }
+}
+
 impl IntoSpecializedDocument<BlockchainProtocol> for CertificationDocument {
     fn into_specialized(self) -> BlockchainProtocol {
         BlockchainProtocol::V10(Box::new(V10Document::Certification(Box::new(self))))
diff --git a/documents/blockchain/v10/documents/identity.rs b/documents/blockchain/v10/documents/identity.rs
index 9eb9417791b6253f6e899807e8ad05e509b57919..8dccf472179f9c5355cfb17e5854e22d75a6d452 100644
--- a/documents/blockchain/v10/documents/identity.rs
+++ b/documents/blockchain/v10/documents/identity.rs
@@ -15,8 +15,11 @@
 
 //! Wrappers around Identity documents.
 
-use duniter_crypto::keys::{ed25519, PublicKey};
+extern crate serde;
+
+use duniter_crypto::keys::{PublicKey, ed25519};
 use regex::Regex;
+use self::serde::ser::{Serialize, Serializer};
 
 use blockchain::v10::documents::{StandardTextDocumentParser, TextDocument, TextDocumentBuilder,
                                  V10Document, V10DocumentParsingError};
@@ -100,6 +103,15 @@ impl TextDocument for IdentityDocument {
     }
 }
 
+impl Serialize for IdentityDocument {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        serializer.serialize_str(&self.generate_compact_text())
+    }
+}
+
 impl IntoSpecializedDocument<BlockchainProtocol> for IdentityDocument {
     fn into_specialized(self) -> BlockchainProtocol {
         BlockchainProtocol::V10(Box::new(V10Document::Identity(self)))
diff --git a/documents/blockchain/v10/documents/membership.rs b/documents/blockchain/v10/documents/membership.rs
index f56937b2055212295ebae95bcc0d03d66dce4089..c6f92fd793599def5ec2ae57000942ea4af515dc 100644
--- a/documents/blockchain/v10/documents/membership.rs
+++ b/documents/blockchain/v10/documents/membership.rs
@@ -15,8 +15,11 @@
 
 //! Wrappers around Membership documents.
 
-use duniter_crypto::keys::{ed25519, PublicKey};
+extern crate serde;
+
+use duniter_crypto::keys::{PublicKey, ed25519};
 use regex::Regex;
+use self::serde::ser::{Serialize, Serializer};
 
 use blockchain::v10::documents::{StandardTextDocumentParser, TextDocument, TextDocumentBuilder,
                                  V10Document, V10DocumentParsingError};
@@ -122,6 +125,15 @@ impl TextDocument for MembershipDocument {
     }
 }
 
+impl Serialize for MembershipDocument {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        serializer.serialize_str(&self.generate_compact_text())
+    }
+}
+
 impl IntoSpecializedDocument<BlockchainProtocol> for MembershipDocument {
     fn into_specialized(self) -> BlockchainProtocol {
         BlockchainProtocol::V10(Box::new(V10Document::Membership(self)))
diff --git a/documents/blockchain/v10/documents/revocation.rs b/documents/blockchain/v10/documents/revocation.rs
index 7568a35560420d73f0b8b6a9573274a3b2dd1ab9..fc2b347d3a906b37fed7a69d88d3c429d76d710d 100644
--- a/documents/blockchain/v10/documents/revocation.rs
+++ b/documents/blockchain/v10/documents/revocation.rs
@@ -15,8 +15,11 @@
 
 //! Wrappers around Revocation documents.
 
-use duniter_crypto::keys::{ed25519, PublicKey, Signature};
+extern crate serde;
+
+use duniter_crypto::keys::{PublicKey, Signature, ed25519};
 use regex::Regex;
+use self::serde::ser::{Serialize, Serializer};
 
 use blockchain::v10::documents::{StandardTextDocumentParser, TextDocument, TextDocumentBuilder,
                                  V10Document, V10DocumentParsingError};
@@ -102,6 +105,15 @@ impl TextDocument for RevocationDocument {
     }
 }
 
+impl Serialize for RevocationDocument {
+    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
+    where
+        S: Serializer,
+    {
+        serializer.serialize_str(&self.generate_compact_text())
+    }
+}
+
 impl IntoSpecializedDocument<BlockchainProtocol> for RevocationDocument {
     fn into_specialized(self) -> BlockchainProtocol {
         BlockchainProtocol::V10(Box::new(V10Document::Revocation(Box::new(self))))
diff --git a/documents/lib.rs b/documents/lib.rs
index 7b360c1bc061797119d80bb00c1d51e1200ab302..d0cd06724feef8216b1d990da4b019c8717c2d5d 100644
--- a/documents/lib.rs
+++ b/documents/lib.rs
@@ -120,7 +120,7 @@ impl Hash {
 
 /// Wrapper of a block hash.
 #[derive(Copy, Clone, PartialEq, Eq, Hash)]
-pub struct BlockHash(Hash);
+pub struct BlockHash(pub Hash);
 
 impl Display for BlockHash {
     fn fmt(&self, f: &mut Formatter) -> Result<(), Error> {