Skip to content

Commit 7a76797

Browse files
muXxerDaughterOfMars
authored andcommitted
rename: fix capitalization (Iota to IOTA) (#24)
1 parent fdf6d63 commit 7a76797

File tree

6 files changed

+10
-50
lines changed

6 files changed

+10
-50
lines changed

crates/iota-sdk-types/src/address.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ impl schemars::JsonSchema for Address {
207207
SchemaObject {
208208
metadata: Some(Box::new(Metadata {
209209
title: Some(Self::schema_name()),
210-
description: Some("A 32-byte Sui address, encoded as a hex string.".to_owned()),
210+
description: Some("A 32-byte IOTA address, encoded as a hex string.".to_owned()),
211211
examples: vec![serde_json::to_value(Address::TWO).unwrap()],
212212
..Default::default()
213213
})),

crates/iota-sdk-types/src/crypto/passkey.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ mod serialization {
295295
pub enum ClientDataType {
296296
/// Serializes to the string `"webauthn.get"`
297297
///
298-
/// Passkey's in Iota only support the value `"webauthn.get"`, other
298+
/// Passkey's in IOTA only support the value `"webauthn.get"`, other
299299
/// values will be rejected.
300300
#[serde(rename = "webauthn.get")]
301301
Get,

crates/iota-sdk-types/src/digest.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ impl std::fmt::LowerHex for Digest {
133133
}
134134
}
135135

136-
// Unfortunately iota's binary representation of digests is prefixed with its
136+
// Unfortunately IOTA's binary representation of digests is prefixed with its
137137
// length meaning its serialized binary form is 33 bytes long (in bcs) vs a more
138138
// compact 32 bytes.
139139
#[cfg(feature = "serde")]

crates/iota-sdk-types/src/execution_status.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub enum ExecutionError {
6464
/// The modules in the package must have their self-addresses set to zero.
6565
PublishErrorNonZeroAddress,
6666

67-
/// Iota Move Bytecode Verification Error.
67+
/// IOTA Move Bytecode Verification Error.
6868
IotaMoveVerificationError,
6969

7070
// MoveVm Errors
@@ -146,7 +146,7 @@ pub enum ExecutionError {
146146
/// Certificate is on the deny list
147147
CertificateDenied,
148148

149-
/// Iota Move Bytecode verification timed out.
149+
/// IOTA Move Bytecode verification timed out.
150150
IotaMoveVerificationTimeout,
151151

152152
/// The requested shared object operation is not allowed

crates/iota-sdk-types/src/hash.rs

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -225,47 +225,7 @@ mod type_digest {
225225
}
226226
}
227227

228-
#[cfg(feature = "serde")]
229-
#[cfg_attr(doc_cfg, doc(cfg(feature = "serde")))]
230-
mod signing_message {
231-
use crate::{
232-
Digest, Intent, IntentAppId, IntentScope, IntentVersion, PersonalMessage, SigningDigest,
233-
Transaction, hash::Hasher,
234-
};
235-
236-
impl Transaction {
237-
pub fn signing_digest(&self) -> SigningDigest {
238-
const INTENT: Intent = Intent {
239-
scope: IntentScope::TransactionData,
240-
version: IntentVersion::V0,
241-
app_id: IntentAppId::Iota,
242-
};
243-
let digest = signing_digest(INTENT, self);
244-
digest.into_inner()
245-
}
246-
}
247-
248-
fn signing_digest<T: serde::Serialize + ?Sized>(intent: Intent, ty: &T) -> Digest {
249-
let mut hasher = Hasher::new();
250-
hasher.update(intent.to_bytes());
251-
bcs::serialize_into(&mut hasher, ty).unwrap();
252-
hasher.finalize()
253-
}
254-
255-
impl PersonalMessage<'_> {
256-
pub fn signing_digest(&self) -> SigningDigest {
257-
const INTENT: Intent = Intent {
258-
scope: IntentScope::PersonalMessage,
259-
version: IntentVersion::V0,
260-
app_id: IntentAppId::Iota,
261-
};
262-
let digest = signing_digest(INTENT, &self.0);
263-
digest.into_inner()
264-
}
265-
}
266-
}
267-
268-
/// A 1-byte domain separator for hashing Object ID in Iota. It is starting from
228+
/// A 1-byte domain separator for hashing Object ID in IOTA. It is starting from
269229
/// 0xf0 to ensure no hashing collision for any ObjectId vs Address which is
270230
/// derived as the hash of `flag || pubkey`.
271231
#[derive(Copy, Clone, PartialEq, Eq, Debug, Hash)]

crates/iota-sdk-types/src/object.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub enum ObjectData {
9292
Struct(MoveStruct),
9393
/// Map from each module name to raw serialized Move module bytes
9494
Package(MovePackage),
95-
// ... Iota "native" types go here
95+
// ... IOTA "native" types go here
9696
}
9797

9898
// serde_bytes::ByteBuf is an analog of Vec<u8> with built-in fast
@@ -231,7 +231,7 @@ impl MoveStruct {
231231
}
232232
}
233233

234-
/// Type of a Iota object
234+
/// Type of an IOTA object
235235
#[derive(Clone, Ord, PartialOrd, Eq, PartialEq, Debug)]
236236
pub enum ObjectType {
237237
/// Move package containing one or more bytecode modules
@@ -417,7 +417,7 @@ mod serialization {
417417
enum MoveStructType {
418418
/// A type that is not `0x2::coin::Coin<T>`
419419
Other(StructTag),
420-
/// A IOTA coin (i.e., `0x2::coin::Coin<0x2::iota::IOTA>`)
420+
/// An IOTA coin (i.e., `0x2::coin::Coin<0x2::iota::IOTA>`)
421421
GasCoin,
422422
/// A record of a staked IOTA coin (i.e.,
423423
/// `0x3::staking_pool::StakedIota`)
@@ -435,7 +435,7 @@ mod serialization {
435435
enum MoveStructTypeRef<'a> {
436436
/// A type that is not `0x2::coin::Coin<T>`
437437
Other(&'a StructTag),
438-
/// A IOTA coin (i.e., `0x2::coin::Coin<0x2::iota::IOTA>`)
438+
/// An IOTA coin (i.e., `0x2::coin::Coin<0x2::iota::IOTA>`)
439439
GasCoin,
440440
/// A record of a staked IOTA coin (i.e.,
441441
/// `0x3::staking_pool::StakedIota`)

0 commit comments

Comments
 (0)