> For the complete documentation index, see [llms.txt](https://sdk.unlockd.finance/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sdk.unlockd.finance/getting-started/code-examples/borrowing-assets.md).

# Borrowing Assets

```typescript
import { UnlockdSDK } from '@unlockd/sdk';

const unlockd = new UnlockdSDK();

async function borrowAssets() {
  try {
    const token = await unlockd.authenticate();
    const amount = 1000000000000000000; // 1 ETH in wei
    const assets = [
      {
        collection: '0x1234567890123456789012345678901234567890',
        tokenId: '1',
      },
    ];
    const signature = {
      v: 28,
      r: '0x1234567890123456789012345678901234567890123456789012345678901234',
      s: '0x1234567890123456789012345678901234567890123456789012345678901234',
      deadline: 1649327432,
    };
    const result = await unlockd.action.borrow(token, amount, assets, signature);
    console.log('Borrow successful:', result);
  } catch (error) {
    console.error('Error:', error);
  }
}

borrowAssets();
```
