Last active
December 15, 2015 17:20
-
-
Save e1024kb/d06a8e9646f30a6713f6 to your computer and use it in GitHub Desktop.
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
public interface ICardsClient | |
{ | |
Task<VirgilCardDTO> Create( | |
string identityValue, | |
IdentityType identityType, | |
IDictionary<string, string> customData, | |
byte[] publicKey, | |
byte[] privateKey | |
); | |
Task<VirgilCardDTO> Create( | |
string identityValue, | |
IdentityType identityType, | |
IDictionary<string, string> customData, | |
Guid publicKey, | |
byte[] privateKey | |
); | |
Task<VirgilSignDTO> Sign( | |
Guid signedCardId, | |
string signedCardHash, | |
Guid signerCardId, | |
byte[] signerPrivateKey | |
); | |
Task Unsign( | |
Guid signedCardId, | |
Guid signerCardId, | |
byte[] privateKey | |
); | |
Task<IList<VirgilCardDTO>> Search( | |
string value, | |
VirgilIdentityType? type, | |
List<Guid> relations, | |
bool? includeUnconfirmed, | |
Guid signerVirgilCardId, | |
byte[] privateKey | |
); | |
} |
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
public enum IdentityType | |
{ | |
Email, | |
Application | |
} |
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
public class KeysClient | |
{ | |
public KeysClient(string accessToken) | |
{ | |
throw new NotImplementedException(); | |
} | |
public ICardsClient Cards { get; } | |
public IPublicKeysClient PublicKeys { get; } | |
} |
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
public interface IPublicKeysClient | |
{ | |
Task<PublicKeyDto> Get(Guid publicKeyId); | |
Task<GetPublicKeyExtendedResponse> GetExtended( | |
Guid publicKeyId, | |
Guid virgilCardId, | |
byte[] privateKey | |
); | |
} |
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
var keysClient = new KeysClient("{ACCESS_TOKEN}"); | |
keysClient.Cards.Create(...); | |
keysClient.Cards.Sign(...); | |
keysClient.Cards.Unsign(...); | |
keysClient.Cards.Search(...); | |
keysClient.PublicKeys.Get(...); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment