Skip to content

Arkd gRPC client to interact with Ark Labs `arkd` daemon.

Notifications You must be signed in to change notification settings

johnnyasantoss/arkd-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Description

Arkd gRPC client to interact with arkade-os arkd daemon.

Install

npm install @lightningpolar/arkd-api

Usage

import { ArkdClient } from "../src";

async function main() {
  const client = ArkdClient.create({
    socket: "127.0.0.1:10029",
    // macaroon: "<hex>", // from ~/.arkd/data/macaroons/admin.macaroon
    // cert: "<hex>", // from ~/.arkd/data/tls/cert.pem
  });

  // 30 secs in ms
  const deadline = 30_000;

  await Promise.all([
    client.admin.waitForReady(deadline),
    client.arkService.waitForReady(deadline),
    client.wallet.waitForReady(deadline),
  ]);

  // service is ready ...
  console.info("All services are up and running");

  console.info(await client.arkService.getInfo());
}

main().catch(console.error);

About

Arkd gRPC client to interact with Ark Labs `arkd` daemon.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •