-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
456 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
using System.Numerics; | ||
using Newtonsoft.Json; | ||
using OpenDive.BCS; | ||
|
||
namespace Sui.ZKLogin | ||
{ | ||
[JsonObject] | ||
public class ZkLoginSignature: ISerializable | ||
{ | ||
[JsonProperty("inputs")] | ||
public Inputs Inputs { get; set; } | ||
|
||
[JsonProperty("maxEpoch")] | ||
public BigInteger MaxEpoch { get; set; } | ||
|
||
[JsonProperty("userSignature")] | ||
public BigInteger UserSignature { get; set; } | ||
|
||
public void Serialize(Serialization serializer) | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
|
||
public static ISerializable Deserialize(Deserialization deserializer) | ||
{ | ||
throw new System.NotImplementedException(); | ||
} | ||
} | ||
|
||
[JsonObject] | ||
public class Inputs | ||
{ | ||
[JsonProperty("proofPoints")] | ||
public ProofPoints proofPoints { get; set; } | ||
|
||
[JsonProperty("issBase64Details")] | ||
public ZkLoginSignatureInputsClaim IssBase64Details { get; set; } | ||
|
||
[JsonProperty("headerBase64")] | ||
public BigInteger HeaderBase64 { get; set; } | ||
|
||
[JsonProperty("addressSeed")] | ||
public BigInteger AddressSeed { get; set; } | ||
} | ||
|
||
[JsonObject] | ||
public class ProofPoints | ||
{ | ||
// Sequence input = new Sequence(new string[] { "a", "abc", "def", "ghi" }.ToList().Select(str => new BString(str)).ToArray()); | ||
[JsonProperty("a")] | ||
public Sequence A { get; set; } // a: bcs.vector(bcs.string()) | ||
|
||
[JsonProperty("b")] | ||
public Sequence B { get; set; } // b: bcs.vector(bcs.vector(bcs.string())), | ||
|
||
[JsonProperty("c")] | ||
public Sequence C { get; set; } // c: bcs.vector(bcs.string()), | ||
} | ||
|
||
[JsonObject] | ||
public class ZkLoginSignatureInputsClaim | ||
{ | ||
[JsonProperty("value")] | ||
public BigInteger Value { get; set; } | ||
|
||
[JsonProperty("indexMod4")] | ||
public BigInteger IndexMod4 { get; set; } | ||
} | ||
|
||
public static class Bcs | ||
{ | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.