Website dAPP. Algosigner.sign() method. Type: acfg. How do I add manager, reserve, freeze and clawback accounts

For algosigner.sign({}) and transaction type: acfg → creating asset
When I try to add:
manager:
reserve:
freeze:
clawback:

It throws error. Are these features supported in algosigner?
If they are can anyone kindly steer me in the right direction. My code is below:

function sign() {
let signCodeElem = document.getElementById(‘sign-code’);

AlgoSigner.sign({
from: document.getElementById(‘from’).value,
assetName: document.getElementById(‘name’).value,
assetUnitName: document.getElementById(‘unit-name’).value,
assetTotal: +document.getElementById(‘total’).value,
assetDecimals: +document.getElementById(‘decimals’).value,
note: document.getElementById(‘note’).value,
//manager: document.getElementById(‘manager’).value,
//reserve: document.getElementById(‘reserve’).value,
//freeze: document.getElementById(‘freeze’).value,
//clawback: document.getElementById(‘clawback’).value,
type: ‘acfg’,
fee: txParams[‘min-fee’],
firstRound: txParams[‘last-round’],
lastRound: txParams[‘last-round’] + 1000,
genesisID: txParams[‘genesis-id’],
genesisHash: txParams[‘genesis-hash’],
flatFee: true
})
.then((d) => {
signedTx = d;
signCodeElem.innerHTML = JSON.stringify(d, null, 2);
})
.catch((e) => {
console.error(e);
signCodeElem.innerHTML = JSON.stringify(e, null, 2);
})
.finally(() => {
hljs.highlightBlock(signCodeElem);
});
}

Greetings! I’ve asked one of our developers to stop by and help with an example.

Quickly, you can see in this test - algosigner/basic-e2e-dapp.test.js at develop · PureStake/algosigner · GitHub - the values for the fields have a particular naming style.

From there:

let txn = {
  from: testAccountAddress,
  fee: getParams['fee'],
  assetName: 'AutoTest',
  assetUnitName: 'AT',
  assetTotal: 1000 + Math.round(Math.floor(Math.random() * 30)),
  assetDecimals: 1,
  type: 'acfg',
  firstRound: getParams['last-round'],
  lastRound: getParams['last-round'] + 1000,
  genesisID: getParams['genesis-id'],
  genesisHash: getParams['genesis-hash'],
  assetManager: testAccountAddress,
  assetReserve: testAccountAddress,
  assetFreeze: testAccountAddress,
  assetClawback: testAccountAddress,
  note: 'Asset create',
};

I managed to produce a txID after signing. However, sending fails giving me this response:

{
“message”: “transaction {_struct:{} Sig:[176 161 137 216 66 41 1 22 137 127 202 11 227 31 180 99 146 172 18 11 144 95 212 207 181 120 145 194 139 139 42 97 52 97 203 223 88 150 94 253 111 45 223 201 128 225 156 74 108 53 231 112 198 22 19 105 237 4 250 12 225 236 45 12] Msig:{_struct:{} Version:0 Threshold:0 Subsigs:} Lsig:{_struct:{} Logic: Sig:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] Msig:{_struct:{} Version:0 Threshold:0 Subsigs:} Args:} Txn:{_struct:{} Type:acfg Header:{_struct:{} Sender:3DPPNZBBGUEIGN7KK4ZS3YYIATZ5GGL4R7G42FSRKQY7HHSCANCUIXEOE4 Fee:{Raw:1000} FirstValid:14428413 LastValid:14429413 Note:[87 65 75 84] GenesisID:testnet-v1.0 GenesisHash:JBR3KGFEWPEE5SAQ6IWU6EEBZMHXD4CZU6WCBXWGF57XBZIJHIRA Group:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA Lease:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] RekeyTo:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ} KeyregTxnFields:{_struct:{} VotePK:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SelectionPK:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] VoteFirst:0 VoteLast:0 VoteKeyDilution:0 Nonparticipation:false} PaymentTxnFields:{_struct:{} Receiver:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ Amount:{Raw:0} CloseRemainderTo:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ} AssetConfigTxnFields:{_struct:{} ConfigAsset:0 AssetParams:{_struct:{} Total:1 Decimals:0 DefaultFrozen:false UnitName:COVPAS AssetName:COV19:20000000009 URL:https://bit.ly/covpassno MetadataHash:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] Manager:3DPPNZBBGUEIGN7KK4ZS3YYIATZ5GGL4R7G42FSRKQY7HHSCANCUIXEOE4 Reserve:3N6HPMMA7ZK4UW5DRIDZOFSOYBSBBXUUXTDA5D7ZSLDJGRV4CPILDUN5AE Freeze:M2B4VW2U2MGYBLCV5ZC635JL72FU3YQWA7DUSBPVJK7OVQW6DWBDD3Y6S4 Clawback:N3G76L3A7U3RLTGDEDRAP5LU6OAESM6CP3YXJZ3GWVCCEQBG3ORTVYF6K4}} AssetTransferTxnFields:{_struct:{} XferAsset:0 AssetAmount:0 AssetSender:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ AssetReceiver:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ AssetCloseTo:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ} AssetFreezeTxnFields:{_struct:{} FreezeAccount:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ FreezeAsset:0 AssetFrozen:false} ApplicationCallTxnFields:{_struct:{} ApplicationID:0 OnCompletion:NoOpOC ApplicationArgs: Accounts: ForeignApps: ForeignAssets: LocalStateSchema:{_struct:{} NumUint:0 NumByteSlice:0} GlobalStateSchema:{_struct:{} NumUint:0 NumByteSlice:0} ApprovalProgram: ClearStateProgram:} CompactCertTxnFields:{_struct:{} CertRound:0 CertType:0 Cert:{_struct:{} SigCommit:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA SignedWeight:0 SigProofs: PartProofs: Reveals:map}}} AuthAddr:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ} invalid : signature validation failed”
}

What am I missing here? thanks in advance and your paitence

I have managed to add the accounts and other optional fields, however, trying to send give me this error: signature validation failed

For the additional management fields these values need to be valid public key address in string format. If one of them is not populated from the dropdown in your form, it will need to be removed from the set being sent.

All the additional management fields are valid public keys. I have also changed the fields to take strings. That is when the attempted sending action gave me error I have reported. Thanks in advance.

It appears that the signing step is not using the manager account of
3DPPNZBBGUEIGN7KK4ZS3YYIATZ5GGL4R7G42FSRKQY7HHSCANCUIXEOE4.
That account needs to be the one loaded into AlgoSigner and signing the transaction in addition to being the one sent to the extension. Can you verify that it is the one in the extension?

Hi Brent, yes I can confirm that it is one of many accounts in the extention. Now I am wondering if the extention is by default picking another account for the signing. Thanks in advance

I named the account as manager in the extention so its easy to identify its the right one