From 2dc212753eebeb592bc4e9e328a4545464377a8d Mon Sep 17 00:00:00 2001 From: Ryan Vandersmith Date: Thu, 29 Sep 2022 11:50:31 -0600 Subject: [PATCH] feat: Add fetchCandid() function to @dfinity/agent (#630) * Add fetchCandid() helper function to @dfinity/agent * Update changelog * Remove extraneous file from tsconfig * Use canister metadata in fetchCandid() * Add 'isLocal()' method to 'HttpAgent' --- docs/generated/changelog.html | 4 +++ packages/agent/src/agent/http/index.ts | 5 ++++ packages/agent/src/fetch_candid.test.ts | 27 +++++++++++++++++ packages/agent/src/fetch_candid.ts | 39 +++++++++++++++++++++++++ packages/agent/src/index.ts | 1 + 5 files changed, 76 insertions(+) create mode 100644 packages/agent/src/fetch_candid.test.ts create mode 100644 packages/agent/src/fetch_candid.ts diff --git a/docs/generated/changelog.html b/docs/generated/changelog.html index aee071bf8..c23d4d2c0 100644 --- a/docs/generated/changelog.html +++ b/docs/generated/changelog.html @@ -16,6 +16,10 @@

Version 0.14.0

Adds retry logic to HttpAgent. By default, retries three times before throwing an error, to offer a more cohesive workflow +
  • + Adds a top-level fetchCandid() function which retrieves the Candid interface + for a given canister id. +
  • Version 0.13.4