public static Asset FromXDR(Generated.Asset asset) { switch (asset.Discriminant.InnerValue) { case Generated.AssetType.AssetTypeEnum.ASSET_TYPE_NATIVE: return(new Asset()); case Generated.AssetType.AssetTypeEnum.ASSET_TYPE_CREDIT_ALPHANUM4: return(new Asset(Encoding.ASCII.GetString(asset.AlphaNum4.AssetCode), KeyPair.FromXdrPublicKey(asset.AlphaNum4.Issuer.InnerValue))); case Generated.AssetType.AssetTypeEnum.ASSET_TYPE_CREDIT_ALPHANUM12: return(new Asset(Encoding.ASCII.GetString(asset.AlphaNum12.AssetCode), KeyPair.FromXdrPublicKey(asset.AlphaNum12.Issuer.InnerValue))); default: throw new ArgumentException("Invalid asset."); } }
public Builder SetSourceAccount(KeyPair sourceAccount) { SourceAccount = CheckNotNull(sourceAccount, "sourceAccount cannot be null."); return(this); }
public Builder(Generated.Operation op) { Destination = KeyPair.FromXdrPublicKey(op.Body.Destination.InnerValue); }
public Builder(KeyPair destination) { Destination = CheckNotNull(destination, "destination cannot be null."); }
private AccountMergeOperation(KeyPair destination) { Destination = CheckNotNull(destination, "destination cannot be null."); }