Open hylim-tech-lover opened 1 year ago
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
As additional knowledge for all, we are able to get this work with the following config mentioned in https://github.com/decentralized-identity/veramo/issues/1420:
networks: [
{
name: SEPOLIA_TESTNET_NAMESPACE,
provider: new JsonRpcProvider(
SEPOLIA_TESTNET_RPC_URL,
SEPOLIA_TESTNET_CHAINID,
+ { staticNetwork: Network.from(SEPOLIA_TESTNET_CHAINID) }, // <<<--- The important part.
),
rpcUrl: SEPOLIA_TESTNET_RPC_URL,
registry: '0x03d5003bf0e79c5f5223588f347eba39afbc3818',
chainId: SEPOLIA_TESTNET_CHAINID,
},
],
The information above could be a workaround on getting this to work.
Bug severity 3
Describe the bug It came to notice that we will need to use meta-transaction with
options: { metaIdentifierKeyId }
fordidManagerAddService
as it is encapsulated aseth_sendTransaction
RPC call under the hood.However, despite setting up the parameters accordingly in correspond to the discussion thread in Discord which will be elaborated in
To Reproduce
section, thedidManagerAddService
still failed with the error shown inObserved behaviour
section.The code example is derived from Veramo Node Tutorial Example
To Reproduce Steps to reproduce the behaviour (Linux OS):
Create empty folder with NodeJS installed (version stated below).
Create
.env
file with following:Obtain the following environment variable as followed:
INFURA_API_KEY
npx @veramo/cli config create-secret-key
and copy output toKMS_SECRET_KEY
WALLET_PRIVATE_KEY
. Take note to get testnet token from Linea Goerli faucet.The example of final
.env
file:Create
package.json
and insert the following:Run
npm install
to install all dependenciesCreate
tsconfig.json
and insert the following:Create
setup.ts
and insert the following:Create
add-service-endpoint.ts
and insert the following:Should have the similar file structure upon the steps above:
Run
npm run execute-with-env add-service-endpoint.ts
at project root directory and fails with error shown in Observed behaviourObserved behaviour
Expected behaviour It show success with
txHash
fromdidManagerAddService
Example of success behavior will be illustrated in Details section with further elaboration
Details
deprecated attributes
insetup.ts
:npm run execute-with-env add-service-endpoint.ts
at project root directory and it will success as shown below:To verify the updated DID, create
list-did.ts
and insert the following:npm run execute-with-env list-did.ts
and we could see that service is added as shown below:Additional context
didManagerAddService with options: { metaIdentifierKeyId }
function supported yet in CLI tooltestnet network
hence it is probably overlooked while doing the migration fromdeprecated attributes
tonetworks[]
.Versions:
5.5.3
N/A
v21.1.0