Receiving error: Class Action is missing in schema: actions.actions

Receiving error: Class Action is missing in schema: actions.actions

我正在尝试广播具有以下操作的交易:

actions: [
    transactions.createAccount(),
    transactions.transfer(new BN(swapParams.value.toFixed())),
    transactions.deployContract(new Uint8Array(bytecode)),
    transactions.functionCall(
      ABI.init.method,
      {
        secretHash: Buffer.from(swapParams.secretHash, 'hex').toString('base64'),
        expiration: `${toNearTimestampFormat(swapParams.expiration)}`,
        buyer: swapParams.recipientAddress
      },
      new BN(ABI.init.gas),
      new BN(0)
    )
  ]

但是当我调用

const tx = await from.signAndSendTransaction(addressToString(options.to), options.actions)

我收到以下调用堆栈:

知道可能是什么原因吗?

我正在使用:

near-js-api: 0.39.0

根据 documentation, source code, and defined types signAndSendTransaction 应该采用单个参数(具有 receiverIdactions 字段的对象):

const tx = await from.signAndSendTransaction({
  receiverId: addressToString(options.to),
  actions: options.actions
})

是不是有一个example/doc误导了你,所以你来到了这个函数调用接口?我们应该解决这个问题。