Create a nimiq cashlink using node.js

Hello, ive been searching for a lot of time and i havent found toturial/sample on how to make a cashlink using node.js
any suggestions?

The main magic happens in this function:

To fund the cashlink, you need to send a transaction to the cashlink’s address.

You can follow the tutorials to learn how to create a Nimiq client and send a transaction:

The script linked above also does these steps:

thats great! but how do i fund the cashlink?
the code itself dosent explain… im making an api that will make a cashlinks and that dosent work