Transaction from internal wallet

Hi,
I’m working on algorand network where an account can be rekeyed, so the public address stay the same but the transactions must be signed with the private key of another account. In this situation I would make a transaction from an internal wallet that has been rekeyed to one vault wallet, so the “from” of the transaction must be the internal but must be signed by the vault. I tried forcing the from on transaction api to be the internal wallet but the response is just:

{
    "message": "Source type is invalid",
    "code": 1427
}

Is there a way to perform these transactions?

Hi @RobertoPW

Alec from Fireblocks Support here. We don’t natively support this functionality. The internal designation for whitelisted wallets exists to allow you to monitor the balance of and transfer to addresses you own outside of Fireblocks. Since those addresses are not typically controlled by your workspace keys, internal wallets are not a valid source type. It would, however, be possible to achieve this functionality via raw signing, which is a premium feature that can be used by Fireblocks customers at additional cost: Raw Message Signing

Hi,
I tried to use raw message signing from javascript sdk but unfortunately all transactions I tried fails with message “Internal error while processing the transaction”. I think because of the content of rawMessageData but not sure because the message is not clear enough. I tried to use the transaction created by the algorand sdk, its json object, the raw bytes but the error is always the same. The documentation on raw message signing page is not so clear because it use a simple string, but I need to sign a transaction.

Example of how I create algorand transaction:

const algod = new algosdk.Algodv2(algorandToken, algorandServer, algorandPort);
const params = await algod.getTransactionParams().do();
const tx = algosdk.makePaymentTxnWithSuggestedParams(from, to, amount, undefined, undefined, params);

Then the fireblocks transaction:

const { status, id } = await fireblocks.createTransaction({
    operation: TransactionOperation.RAW,
    assetId: "PLANETS_ALGO_TEST",
    source: {
      type: PeerType.VAULT_ACCOUNT,
      id: "1"
    },
    note: 'note',
    extraParameters: {
      rawMessageData: {
        messages: [{
          content
        }]
      }
    }
  });

What I should use as content variable?

Details added by Robert

Just to summarize what I want to do is:

  • I created a vault on fireblocks with the asset wallet PLANETS, it give me the address wallet1

  • I rekeyed the account wallet2 to this wallet1

  • Now I want to transfer planets (asset id 408947) from wallet2 to another account, for example wallet3

  • The transaction is then this “message”:
    {“name”:“Transaction”,“tag”:“TX”,“type”:“axfer”,“from”:“wallet2”,“to”:“wallet3”,“amount”:1000000,“assetIndex”:408947,“note”:{},“flatFee”:false,“genesisHash”:“SGO1GKSzyE7IEPItTxCByw9x8FmnrCDexi9/cOUJOiI=”,“fee”:1000,“firstRound”:36951134,“lastRound”:36952134,“genesisID”:“testnet-v1.0”,“appArgs”:,“lease”:{}}

  • This transaction must be signed by the private key of wallet1 and then sent to the blockchain

I tried to put inside content all of these things without success:

  • content of output file generated by the command line “goal asset send --from wallet2 --to wallet3 --amount 1000000 --assetid 27165954 --out rekeytest.txn”

  • output of tx generated by sdk “const tx = algosdk.makeAssetTransferTxnWithSuggestedParams(“wallet2”,“wallet3”, undefined, undefined, 1000000, undefined, 408947, params);”

  • tx.bytesToSign() object

  • tx.get_obj_for_encoding() object

  • manually created json message

All was encoded in hex format (if not I receive a bad format error).