@circle-fin/provider-fee-v1

中文文档
0.4.1发布于 2026/11/06TypeScriptESM + CJS近 30 天下载 4.7万

Client for Circle's Quote API that fetches signed fee quotes for the prepaid FORWARD fast-deposit path of a CCTP v2 USDC burn.

原始使用文档

@circle-fin/provider-fee-v1

[!IMPORTANT] This package is published for use within Circle's SDK packages. Its exports are marked @internal and are not currently a supported public API. They may change between releases without compatibility guarantees.

Applications should not import this package directly.

The package contains Circle Quote API integration used by Unified Balance Kit for FAST cross-chain deposits, including signed fee-quote retrieval and validation. The client wraps POST /v2/quote/burn/usdc/{sourceDomain}/{destinationDomain}. The endpoint is permissionless (no auth) and edge rate-limited, and is feature-flagged per source chain (a disabled chain returns 503 SERVICE_NOT_ENABLED, surfaced as a fatal, non-retryable error).

Use @circle-fin/unified-balance-kit to estimate and execute deposits:

const estimate = await kit.estimateDeposit({
  from,
  amount: '10',
  token: 'USDC',
  to: { chain: 'Arc_Testnet' },
  config: { transferSpeed: 'FAST' },
})

const result = await kit.deposit({
  ...estimate,
  from,
})

Validating a signed quote

A signed quote is short-lived and bound to the exact on-chain call it will be submitted with. Before you burn, re-check it against the complete contract call via POST /v2/quote/validate/usdc/{sourceDomain}. validateQuote returns whether the quote is still claimable, the failedChecks blocking it (see QUOTE_REJECTION_REASONS), and the authoritative expiry status at the current source-chain tip.

import { validateQuote } from '@circle-fin/provider-fee-v1'

const result = await validateQuote({
  sourceDomain: 3, // Arbitrum CCTP domain
  // The exact function and arguments you will submit on-chain.
  abiSignature:
    'depositForBurnWithHookAndFees(uint256,uint32,bytes32,address,bytes32,bytes,(bytes,address))',
  args: [
    '1000000',
    '26',
    '0x0000000000000000000000001111111111111111111111111111111111111111',
    '0x2222222222222222222222222222222222222222',
    '0x0000000000000000000000000000000000000000000000000000000000000000',
    '0x636374702d666f72776172640000000000000000000000000000000000000000',
    ['0x01abcd', '0x3333333333333333333333333333333333333333'],
  ],
  isTestnet: false,
})

if (result.claimable) {
  console.log('safe to submit', result.expiry.secondsRemaining)
} else {
  console.warn('do not submit', result.failedChecks)
}

Notes

  • amount is a decimal string in token minor units.
  • feeToken defaults to the zero address (native); pass a USDC address to pay fees in USDC.
  • The quote is short-lived (expiry.expiresAt or expiry.expiresAtBlock); fetch a fresh quote immediately before submitting on-chain rather than caching it.
  • signedQuote is opaque bytes returned verbatim; do not decode it.
  • The client makes a single attempt (no transport retry/backoff). The endpoint is edge rate-limited, so on a 429 the caller should back off and re-request rather than expecting the client to retry.

版本与发布记录

@circle-fin/provider-fee-v1 共发布 12 个版本,首次发布于 2026/07/16;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.4.1latest2026/11/063 天前
0.4.02026/10/3110 天前
0.3.52026/10/2317 天前
0.3.42026/10/2119 天前
0.3.32026/10/1624 天前
0.3.22026/09/301 个月前

关于 @circle-fin/provider-fee-v1 的常见问题

@circle-fin/provider-fee-v1 是什么?

Client for Circle's Quote API that fetches signed fee quotes for the prepaid FORWARD fast-deposit path of a CCTP v2 USDC burn.

如何安装 @circle-fin/provider-fee-v1?

在项目目录运行 npm install @circle-fin/provider-fee-v1,或使用 pnpm add / yarn add / bun add。

@circle-fin/provider-fee-v1 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@circle-fin/provider-fee-v1 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@circle-fin/provider-fee-v1 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20.0.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@circle-fin/provider-fee-v1 可以商用吗?

@circle-fin/provider-fee-v1 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@circle-fin/provider-fee-v1 的下载量有多少?

根据 npm 官方下载统计,@circle-fin/provider-fee-v1 在 2026/10/10 – 2026/11/08 这 30 天内被下载 46,879 次,日均约 1,563 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@circle-fin/provider-fee-v1 还在维护吗?

最新版本 0.4.1 发布于 2026/11/06(3 天前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/07/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。