MCPcopy Create free account
hub / github.com/api3dao/airnode / getUserWallet

Function getUserWallet

packages/airnode-examples/src/evm.ts:28–33  ·  view source on GitHub ↗
(chain = SameOrCrossChain.same)

Source from the content-addressed store, hash-verified

26 * @returns The connected wallet.
27 */
28export const getUserWallet = (chain = SameOrCrossChain.same) => {
29 const integrationInfo = readIntegrationInfo();
30 const provider = getProvider(chain);
31 const mnemonic = chain === SameOrCrossChain.cross ? integrationInfo.crossChainMnemonic! : integrationInfo.mnemonic;
32 return ethers.Wallet.fromMnemonic(mnemonic).connect(provider);
33};
34
35/**
36 * Reads the "secrets.env" of the particular integration to obtain the Airnode mnemonic of the Airnode wallet. This

Callers 4

deployContractFunction · 0.85
getDeployedContractFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 2

readIntegrationInfoFunction · 0.90
getProviderFunction · 0.85

Tested by

no test coverage detected