Skip to content

Commit

Permalink
Rc branch (#82)
Browse files Browse the repository at this point in the history
* fixed missing comments

* added comments and refactored to previous to il2cpp fix
  • Loading branch information
darkfriend77 authored May 23, 2024
1 parent 77089e2 commit bfdc2a5
Show file tree
Hide file tree
Showing 10 changed files with 60,960 additions and 60,975 deletions.
7 changes: 4 additions & 3 deletions Substrate.NetApi.Test/Keys/Ed25519Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,11 @@ public async Task AccountEd25519SignatureTestComparePolkadotJsAsync(string polka

Assert.IsTrue(signature1.SequenceEqual(signature2));

Assert.True(account.Verify(signature1, account.Bytes, messageBytes));
Assert.True(account.Verify(signature2, account.Bytes, messageBytes));
Assert.True(await account.VerifyAsync(signature1, account.Bytes, messageBytes));
Assert.True(await account.VerifyAsync(signature2, account.Bytes, messageBytes));

Assert.True(account.Verify(Utils.HexToByteArray(polkadotJsSignature), account.Bytes, messageBytes));
Assert.True(await account.VerifyAsync(Utils.HexToByteArray(polkadotJsSignature), account.Bytes, messageBytes));
}

}
}
2 changes: 2 additions & 0 deletions Substrate.NetApi/Mnemonic.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public static byte[] SeedFromEntropy(byte[] entropyBytes, string password)
/// 16, 20, 24, 28, 32 Bytes Entropy supported.
/// </summary>
/// <param name="entropyBytes"></param>
/// <param name="wordlistType"></param>
/// <returns></returns>
public static string[] MnemonicFromEntropy(byte[] entropyBytes, BIP39Wordlist wordlistType)
{
Expand Down Expand Up @@ -218,6 +219,7 @@ public static KeyPair GetKeyPairFromMnemonic(string mnemonic, string password, B
/// </summary>
/// <param name="mnemonic"></param>
/// <param name="password"></param>
/// <param name="keyType"></param>
/// <param name="bIP39Wordlist"></param>
/// <param name="expandMode"></param>
/// <returns></returns>
Expand Down
29 changes: 0 additions & 29 deletions Substrate.NetApi/Model/Rpc/StorageChangeSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,35 +28,6 @@ public override string ToString()
}
}

/// <summary>
/// TODO: This needs to be verified, if we can use it to convert straight
///
/// pub struct StorageChangeSet<Hash> {
/// pub block: Hash,
/// pub changes: Vec<(StorageKey, Option<StorageData>)>,
/// }
/// </summary>
public class NewStorageChangeSet
{
/// <summary>
/// Block Hash
/// </summary>
[JsonConverter(typeof(GenericTypeConverter<Hash>))]
public Hash Block { get; set; }

/// <summary>
/// Changes
/// </summary>
[JsonConverter(typeof(GenericTypeConverter<BaseVec<BaseTuple<StorageKey, StorageData>>>))]
public BaseVec<BaseTuple<StorageKey, StorageData>> Changes { get; set; }

/// <inheritdoc/>
public override string ToString()
{
return JsonConvert.SerializeObject(this);
}
}

/// <summary>
/// Storage Key
/// </summary>
Expand Down
Loading

0 comments on commit bfdc2a5

Please sign in to comment.