MCPcopy Create free account
hub / github.com/cardstack/cardstack / hubAuth

Function hubAuth

packages/cardpay-cli/hub-auth.ts:4–8  ·  view source on GitHub ↗
(hubRootUrl: string, network: string, mnemonic?: string)

Source from the content-addressed store, hash-verified

2import { getSDK } from '@cardstack/cardpay-sdk';
3
4export const hubAuth = async (hubRootUrl: string, network: string, mnemonic?: string): Promise<void> => {
5 let web3 = await getWeb3(network, mnemonic);
6 let authToken = await (await getSDK('HubAuth', web3, hubRootUrl)).authenticate();
7 console.log(`Authentication token: ${authToken}`);
8};

Callers 1

index.tsFile · 0.90

Calls 4

getWeb3Function · 0.90
getSDKFunction · 0.90
authenticateMethod · 0.65
logMethod · 0.45

Tested by

no test coverage detected