code: func (dc *CDA) AsMagnetLink() (string, error) {
  	var expectedAmount uint64
  	if dc.ExpectedAmount != nil {
  		expectedAmount = *dc.ExpectedAmount
  	}
  	checksum, err := dc.Checksum()
  	if err != nil {
  		return "", err
  	}
  	var multiUse int
  	if dc.MultiUse {
  		multiUse = 1
  	}
  
  	return fmt.Sprintf(MagnetLinkFormat,
  		dc.Address[:consts.HashTrytesSize],
  		checksum[consts.HashTrytesSize-consts.AddressChecksumTrytesSize:consts.HashTrytesSize],
  		MagnetLinkTimeoutField, dc.TimeoutAt.Unix(),
  		MagnetLinkMultiUseField, multiUse,
  		MagnetLinkExpectedAmountField, expectedAmount), nil
  }
docs: // AsMagnetLink converts the conditions into a magnet link URL.