code: func (api *API) PromoteTransaction(tailTxHash Hash, depth uint64, mwm uint64, spamTransfers bundle.Transfers, options PromoteTransactionOptions) (transaction.Transactions, error) {
  	if err := Validate(ValidateTransactionHashes(tailTxHash)); err != nil {
  		return nil, err
  	}
  
  	if spamTransfers != nil && len(spamTransfers) > 0 {
  		if err := Validate(ValidateTransfers(spamTransfers...)); err != nil {
  			return nil, err
  		}
  	} else {
  		spamTransfers = bundle.Transfers{bundle.EmptyTransfer}
  	}
  
  	options = getPromoteTransactionsDefaultOptions(options)
  
  	consistent, _, err := api.CheckConsistency(tailTxHash)
  	if err != nil {
  		return nil, err
  	}
  
  	if !consistent {
  		return nil, ErrInconsistentSubtangle
  	}
  
  	opts := SendTransfersOptions{Reference: &tailTxHash}
  	opts.PrepareTransfersOptions = getPrepareTransfersDefaultOptions(opts.PrepareTransfersOptions)
  	getPrepareTransfersDefaultOptions(PrepareTransfersOptions{})
  
  	bndl, err := api.SendTransfer(spamTransfers[0].Address, depth, mwm, spamTransfers, &opts)
  	if err != nil {
  		return nil, err
  	}
  
  	// one-off promotion
  	if options.Ctx == nil {
  		return bndl, nil
  	}
  
  	// check whether context is canceled
  	select {
  	case <-options.Ctx.Done():
  		return bndl, nil
  	default:
  	}
  
  	// wait specified delay before sending of another promotion transaction
  	if options.Delay != nil {
  		<-time.After(time.Duration(*options.Delay))
  	}
  
  	return api.PromoteTransaction(tailTxHash, depth, mwm, nil, options)
  }
docs: // PromoteTransaction promotes a transaction by adding other transactions (spam by default) on top of it.
  // If an optional Context is supplied, PromoteTransaction() will promote the given transaction until the
  // Context is done/cancelled. If no Context is provided, PromoteTransaction() will create one promote transaction.