Exemple #1
0
 public async Task <IBlockchainOperation> CreateVASPContractAsync(
     Address from,
     VASPCode vaspCode,
     Address owner,
     Channels channels,
     TransportKey transportKey,
     MessageKey messageKey,
     SigningKey signingKey,
     ConfirmationLevel minimalConfirmationLevel = default)
 {
     return(await SendTransactionAsync
            (
                from,
                new CreateVASPContractTransaction
     {
         VASPCode = vaspCode,
         Owner = owner,
         Channels = channels,
         TransportKey = transportKey,
         MessageKey = messageKey,
         SigningKey = signingKey
     },
                minimalConfirmationLevel
            ));
 }
        public static async Task <bool> VASPIsRegisteredAsync(
            this IVASPIndexClient vaspIndex,
            VASPCode vaspCode,
            ConfirmationLevel minimalConfirmationLevel = default)
        {
            var vaspContractAddress = await vaspIndex.GetVASPContractAddressAsync(vaspCode, minimalConfirmationLevel);

            return(!Address.IsEmpty(vaspContractAddress));
        }
        public static async Task <(bool VASPIsRegistered, VASPCode VASPCode)> TryGetVASPCodeAsync(
            this IVASPIndexClient vaspIndex,
            Address vaspContractAddress,
            ConfirmationLevel minimalConfirmationLevel = default)
        {
            var vaspCode = await vaspIndex.GetVASPCodeAsync(vaspContractAddress, minimalConfirmationLevel);

            var vaspIsRegistered = !VASPCode.IsEmpty(vaspCode);

            return(vaspIsRegistered, vaspCode);
        }
Exemple #4
0
        public async Task <Address> GetVASPContractAddressAsync(
            VASPCode vaspCode,
            ConfirmationLevel minimalConfirmationLevel = default)
        {
            var callResult = await CallWithSimpleResultAsync
                             (
                new GetVASPAddressByCodeCall { VASPCode = vaspCode },
                minimalConfirmationLevel
                             );

            return(Address.Parse(callResult));
        }
Exemple #5
0
 public VASPInfo(
     Channels channels,
     VASPCode vaspCode,
     MessageKey messageKey,
     SigningKey signingKey,
     TransportKey transportKey)
 {
     Channels     = channels;
     VASPCode     = vaspCode;
     MessageKey   = messageKey;
     SigningKey   = signingKey;
     TransportKey = transportKey;
 }