<p>You should probably now use the ConfigBuilder to create a config for creating the TransactionBuilder.</p>
<p>This should do the trick:</p>
<pre><code>const cfg = TransactionBuilderConfigBuilder.new()
      .fee_algo(this.S.LinearFee.new(
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeA),
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeB)
      ))
      .pool_deposit(this.S.BigNum.from_str(protocolParameters.poolDeposit))
      .key_deposit(this.S.BigNum.from_str(protocolParameters.keyDeposit))
      .max_tx_size(protocolParameters.maxTxSize)
      .max_value_size(protocolParameters.maxValSize)
      .coins_per_utxo_word(this.S.BigNum.from_str(protocolParameters.coinsPerUtxoWord))
      .build()

const txBuilder = this.S.TransactionBuilder.new(cfg);
</code></pre>

CC BY-SA 4.0
2022-02-08T10:00:46.770Z
It worked out. Thank you.
Mantas Andriuška
CC BY-SA 4.0
2022-06-07T15:38:59.557Z
the TransactionBuilderConfigBuilder is not part of @cardano/serialization-lib-asmjs .. does anyone know why ?
LKBH Pools
CC BY-SA 4.0
2022-06-07T16:57:46.643Z
Just checked and it should be there. Maybe double check the version you have installed. It must be one above 10.0.0 - try installing the latest (which is currently 10.2.0) via: npm i @emurgo/cardano-serialization-lib-asmjs@latest
sean
CC BY-SA 4.0
2022-02-07T17:22:16.510Z
2022-02-07T17:22:16.510Z
sean
<p>With the new version of library TranasctionBuilder.new() arguments have changed.</p>
<p>When running:</p>
<pre><code>    const txBuilder = this.S.TransactionBuilder.new(
      this.S.LinearFee.new(
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeA),
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeB)
      ),
      this.S.BigNum.from_str(protocolParameters.minUtxo),
      this.S.BigNum.from_str(protocolParameters.poolDeposit),
      this.S.BigNum.from_str(protocolParameters.keyDeposit),
      this.S.BigNum.from_str(protocolParameters.coinsPerUtxoWord),
      protocolParameters.maxValSize,
      protocolParameters.maxTxSize,
      protocolParameters.priceMem,
      protocolParameters.priceStep,
      this.S.LanguageViews.new(Buffer.from(languageViews, &quot;hex&quot;))
    );
</code></pre>
<p>It throws an error</p>
<pre><code>Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'new')
</code></pre>
<p>What do I do wrong here?</p>

<cardano-serialization-lib>
TransctionBuilder.new() in cardano-serialization-lib 10.0.0
# TransctionBuilder.new() in cardano-serialization-lib 10.0.0

(Asked by: username_0 on 2022-02-07)

With the new version of library TranasctionBuilder.new() arguments have changed.
When running:
    const txBuilder = this.S.TransactionBuilder.new(
      this.S.LinearFee.new(
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeA),
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeB)
      ),
      this.S.BigNum.from_str(protocolParameters.minUtxo),
      this.S.BigNum.from_str(protocolParameters.poolDeposit),
      this.S.BigNum.from_str(protocolParameters.keyDeposit),
      this.S.BigNum.from_str(protocolParameters.coinsPerUtxoWord),
      protocolParameters.maxValSize,
      protocolParameters.maxTxSize,
      protocolParameters.priceMem,
      protocolParameters.priceStep,
      this.S.LanguageViews.new(Buffer.from(languageViews, "hex"))
    );

It throws an error
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'new')

What do I do wrong here?

**Tags:** cardano-serialization-lib

---

## 1 answers

### Answer by username_1 on 2022-02-07. Score: 1 | Accepted answer

You should probably now use the ConfigBuilder to create a config for creating the TransactionBuilder.
This should do the trick:
const cfg = TransactionBuilderConfigBuilder.new()
      .fee_algo(this.S.LinearFee.new(
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeA),
        this.S.BigNum.from_str(protocolParameters.linearFee.minFeeB)
      ))
      .pool_deposit(this.S.BigNum.from_str(protocolParameters.poolDeposit))
      .key_deposit(this.S.BigNum.from_str(protocolParameters.keyDeposit))
      .max_tx_size(protocolParameters.maxTxSize)
      .max_value_size(protocolParameters.maxValSize)
      .coins_per_utxo_word(this.S.BigNum.from_str(protocolParameters.coinsPerUtxoWord))
      .build()

const txBuilder = this.S.TransactionBuilder.new(cfg);

> **Comments:**
> **username_0**: It worked out. Thank you.  
> **username_2**: the TransactionBuilderConfigBuilder is not part of @cardano/serialization-lib-asmjs .. does anyone know why ?  
> **username_1**: Just checked and it should be there. Maybe double check the version you have installed. It must be one above 10.0.0 - try installing the latest (which is currently 10.2.0) via: npm i @emurgo/cardano-serialization-lib-asmjs@latest  

---

