Sending custom parameters

Hello,

I am trying to invoke a contract method, I am using following method

connection.signAndSendTransaction(
account,
AccountTransactionType.Update,
contractUpdatePayload(new CcdAmount(BigInt(0)), contract, ‘smash’),
{‘parameters’: parameter, ‘schema’:‘’ }
);

parameter is valued

let parameter = {
    "credential_info": {
        "valid_from":       "2023-08-24T12:00:00+05:00",
        "valid_until":      {"None": []},
        "holder_revocable": true,
        "holder_id": "c9762a4d5ba0ac17e4190428e140d897f4012ed4c4d0780064ebb780a7a46abb",
        "metadata_url":{
            "url": "",
            "hash": {"None": []}
        }
    },
    "auxiliary_data":  [44]
    } ;

The error thrown are following:

ERROR in src/App.tsx:71:18
TS2322: Type ‘JSON’ is not assignable to type ‘SmartContractParameters’.
Type ‘JSON’ is not assignable to type ‘{ [key: string]: SmartContractParameters; }’.
Index signature for type ‘string’ is missing in type ‘JSON’.
69 | AccountTransactionType.Update,
70 | contractUpdatePayload(new CcdAmount(BigInt(0)), contract, ‘smash’),

71 | {‘parameters’: parameter, ‘schema’:‘’ }
| ^^^^^^^^^^^^
72 | );
73 | }

ERROR in src/App.tsx:71:43
TS2322: Type ‘string’ is not assignable to type ‘Schema’.
69 | AccountTransactionType.Update,
70 | contractUpdatePayload(new CcdAmount(BigInt(0)), contract, ‘smash’),

71 | {‘parameters’: parameter, ‘schema’:‘’ }
| ^^^^^^^^
72 | );
73 | }

I have couple of questions

  1. What is the correct way to use above method, or is there better way to accomplish it
  2. I am using react, how can we achieve the same in nodejs

Thx