import { Hbar, TransferTransaction } from '@hashgraph/sdk'
const walletId = 'wa-172um-hgi5f-xxxxxxxxxxxxxxxx'
const wallet = await dfnsClient.wallets.getWallet({ walletId })
const recipient = '0x956fbb0c88b3c597d4afdbab3e26939051ff6725'
const client = Client.forMainnet()
const transaction = await new TransferTransaction()
  .addHbarTransfer(recipient, Hbar.fromTinybars(1))
  .addHbarTransfer(wallet.address!, Hbar.fromTinybars(-1))
  .freezeWith(client)
const res = await dfnsClient.wallets.generateSignature({
  walletId,
  body: {
    kind: 'Transaction',
    transaction: `0x${Buffer.from(transaction.toBytes()).toString('hex')}`,
  },
})