code: func (txEnv *Envelope) Sign(signingAccounts ...acm.AddressableSigner) error {
  	// Clear any existing
  	txEnv.Signatories = nil
  	signBytes, err := txEnv.Tx.SignBytes()
  	if err != nil {
  		return err
  	}
  	signingAccountMap := make(map[crypto.Address]acm.AddressableSigner)
  	for _, sa := range signingAccounts {
  		signingAccountMap[sa.GetAddress()] = sa
  	}
  	// Sign in order of inputs
  	for i, in := range txEnv.Tx.GetInputs() {
  		sa, ok := signingAccountMap[in.Address]
  		if !ok {
  			return fmt.Errorf("account to sign %v (position %v) not passed to Sign, passed: %v", in, i, signingAccounts)
  		}
  		sig, err := sa.Sign(signBytes)
  		if err != nil {
  			return err
  		}
  		address := sa.GetAddress()
  		publicKey := sa.GetPublicKey()
  		txEnv.Signatories = append(txEnv.Signatories, Signatory{
  			Address:   &address,
  			PublicKey: &publicKey,
  			Signature: sig,
  		})
  	}
  	return nil
  }
docs: // Sign the Tx Envelope by adding Signatories containing the signatures for each TxInput.
  // signing accounts for each input must be provided (in any order).