@usdctofiat/offramp 4.4.2 → 4.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/README.md +10 -3
- package/dist/{chunk-4DWGIXLS.js → chunk-NDVYCYUC.js} +10 -12
- package/dist/{chunk-4DWGIXLS.js.map → chunk-NDVYCYUC.js.map} +1 -1
- package/dist/index.cjs +34 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +26 -1
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +19 -7
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,23 @@ All notable changes to `@usdctofiat/offramp` will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/).
|
|
7
7
|
|
|
8
|
+
## [4.4.4] - 2026-06-27
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Prefer the branded `window.usdctofiatVerify` extension bridge when
|
|
13
|
+
USDCtoFiat Verify and PeerAuth are both installed, while preserving
|
|
14
|
+
`window.peer` as a compatibility fallback.
|
|
15
|
+
|
|
16
|
+
## [4.4.3] - 2026-06-26
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Add `OFFRAMP_DEVELOPER_RESOURCES.upstreamSourceTruths` and
|
|
21
|
+
`OFFRAMP_UPSTREAM_SOURCE_TRUTHS` so apps, bots, and coding agents can trace
|
|
22
|
+
protocol-sensitive fields to the current ZKP2P SDK, Curator API,
|
|
23
|
+
attestation service, and contracts before guessing.
|
|
24
|
+
|
|
8
25
|
## [4.4.2] - 2026-06-26
|
|
9
26
|
|
|
10
27
|
### Fixed
|
package/README.md
CHANGED
|
@@ -26,12 +26,19 @@ import { OFFRAMP_DEVELOPER_RESOURCES, getOfframpDeveloperResources } from "@usdc
|
|
|
26
26
|
OFFRAMP_DEVELOPER_RESOURCES.delegation.required; // true
|
|
27
27
|
OFFRAMP_DEVELOPER_RESOURCES.delegation.feeRateBps; // 10
|
|
28
28
|
OFFRAMP_DEVELOPER_RESOURCES.links.agentSkill; // https://usdctofiat.xyz/skills/usdctofiat.md
|
|
29
|
+
OFFRAMP_DEVELOPER_RESOURCES.upstreamSourceTruths.map((source) => source.label);
|
|
30
|
+
// ["@zkp2p/sdk 0.6.2", "Curator API", ...]
|
|
29
31
|
OFFRAMP_DEVELOPER_RESOURCES.checklist.map((item) => item.title); // integration doctor
|
|
30
32
|
|
|
31
33
|
const botPlaybook = getOfframpDeveloperResources("bot");
|
|
32
34
|
// profile-specific steps + canonical docs/starters/webhook resources
|
|
33
35
|
```
|
|
34
36
|
|
|
37
|
+
Use `upstreamSourceTruths` before generating protocol-sensitive code. It points
|
|
38
|
+
agents at the current ZKP2P SDK, Curator API, attestation service, and contracts
|
|
39
|
+
so they do not invent payment-method hashes, proof payload fields, or contract
|
|
40
|
+
addresses.
|
|
41
|
+
|
|
35
42
|
For agent-built integrations, copy the same prompt the developer console uses:
|
|
36
43
|
|
|
37
44
|
```typescript
|
|
@@ -376,12 +383,12 @@ There are **two separate webhook families** — different event vocabularies, di
|
|
|
376
383
|
| Family | Events | Emitted by | Register at |
|
|
377
384
|
| ----------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------- | ----------------------------- | -------------------------------------------------------------- |
|
|
378
385
|
| **Offramp** (this SDK) | `deposit.created`, `deposit.filled`, `deposit.partially_filled`, `deposit.closed`, `otc.taken` | usdctofiat offramp dispatcher | [usdctofiat.xyz/developers](https://usdctofiat.xyz/developers) |
|
|
379
|
-
| **Integrator** ([`@peerlytics/sdk`](https://www.npmjs.com/package/@peerlytics/sdk)) | `deposit.created`, `intent.signaled`, `intent.fulfilled
|
|
386
|
+
| **Integrator** ([`@peerlytics/sdk`](https://www.npmjs.com/package/@peerlytics/sdk)) | `deposit.created`, `intent.signaled`, `intent.fulfilled` | Peerlytics cron dispatcher | [peerlytics.xyz/developers](https://peerlytics.xyz/developers) |
|
|
380
387
|
|
|
381
|
-
One Peerlytics API key authenticates both. The integrator family also accepts the legacy aliases `intent.created
|
|
388
|
+
One Peerlytics API key authenticates both. The integrator family also accepts the legacy aliases `intent.created` and `intent.filled` on registration (normalized server-side). Rate updates are activity-feed events, not webhook fanout.
|
|
382
389
|
|
|
383
390
|
## Links
|
|
384
391
|
|
|
385
|
-
[usdctofiat.xyz](https://usdctofiat.xyz) · [
|
|
392
|
+
[usdctofiat.xyz](https://usdctofiat.xyz) · [usdctofiat.xyz/delegate](https://usdctofiat.xyz/delegate) · [peerlytics.xyz](https://peerlytics.xyz) · [peerlytics.xyz/orderbook](https://peerlytics.xyz/orderbook)
|
|
386
393
|
|
|
387
394
|
[Examples & agent skills](https://github.com/ADWilkinson/usdctofiat-peerlytics-starters) · [@usdctofiat](https://x.com/usdctofiat)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/config.ts
|
|
2
2
|
import { getContracts, getGatingServiceAddress } from "@zkp2p/sdk";
|
|
3
|
-
var SDK_VERSION = "4.4.
|
|
3
|
+
var SDK_VERSION = "4.4.4";
|
|
4
4
|
var BASE_CHAIN_ID = 8453;
|
|
5
5
|
var RUNTIME_ENV = "production";
|
|
6
6
|
var API_BASE_URL = "https://api.zkp2p.xyz";
|
|
@@ -1555,10 +1555,7 @@ function createOfframp(options) {
|
|
|
1555
1555
|
}
|
|
1556
1556
|
|
|
1557
1557
|
// src/extension.ts
|
|
1558
|
-
import {
|
|
1559
|
-
PEER_EXTENSION_CHROME_URL,
|
|
1560
|
-
createPeerExtensionSdk as createSdkPeerExtensionSdk
|
|
1561
|
-
} from "@zkp2p/sdk";
|
|
1558
|
+
import { PEER_EXTENSION_CHROME_URL } from "@zkp2p/sdk";
|
|
1562
1559
|
var DEFAULT_EXTENSION_INSTALL_URL = "https://chromewebstore.google.com/detail/usdctofiat-verify/lfkmdfifolhcfjmhklmckigfngghmpdf";
|
|
1563
1560
|
var resolveWindow = (options) => {
|
|
1564
1561
|
if (options?.window) {
|
|
@@ -1574,14 +1571,15 @@ var requirePeer = (options) => {
|
|
|
1574
1571
|
if (!resolvedWindow) {
|
|
1575
1572
|
throw new Error("Peer extension SDK requires a browser window.");
|
|
1576
1573
|
}
|
|
1577
|
-
|
|
1574
|
+
const peer = resolvedWindow.usdctofiatVerify ?? resolvedWindow.peer;
|
|
1575
|
+
if (!peer) {
|
|
1578
1576
|
throw new Error("Peer extension not available. Install or enable the Peer extension.");
|
|
1579
1577
|
}
|
|
1580
|
-
return
|
|
1578
|
+
return peer;
|
|
1581
1579
|
};
|
|
1582
1580
|
var isPeerExtensionAvailable = (options) => {
|
|
1583
1581
|
const resolvedWindow = resolveWindow(options);
|
|
1584
|
-
return Boolean(resolvedWindow?.peer);
|
|
1582
|
+
return Boolean(resolvedWindow?.usdctofiatVerify ?? resolvedWindow?.peer);
|
|
1585
1583
|
};
|
|
1586
1584
|
var hasHeadlessMetadataBridge = (peer) => typeof peer.authenticate === "function" && typeof peer.onMetadataMessage === "function";
|
|
1587
1585
|
var requirePeerMetadataBridge = (options) => {
|
|
@@ -1593,7 +1591,8 @@ var requirePeerMetadataBridge = (options) => {
|
|
|
1593
1591
|
};
|
|
1594
1592
|
var isPeerExtensionMetadataBridgeAvailable = (options) => {
|
|
1595
1593
|
const resolvedWindow = resolveWindow(options);
|
|
1596
|
-
|
|
1594
|
+
const peer = resolvedWindow?.usdctofiatVerify ?? resolvedWindow?.peer;
|
|
1595
|
+
return Boolean(peer && hasHeadlessMetadataBridge(peer));
|
|
1597
1596
|
};
|
|
1598
1597
|
var openPeerExtensionInstallPage = (options) => {
|
|
1599
1598
|
const resolvedWindow = resolveWindow(options);
|
|
@@ -1615,7 +1614,6 @@ var getPeerExtensionState = async (options) => {
|
|
|
1615
1614
|
}
|
|
1616
1615
|
};
|
|
1617
1616
|
var createPeerExtensionSdk = (options = {}) => {
|
|
1618
|
-
const sdk = createSdkPeerExtensionSdk(options);
|
|
1619
1617
|
return {
|
|
1620
1618
|
isAvailable: () => isPeerExtensionAvailable(options),
|
|
1621
1619
|
requestConnection: () => requirePeer(options).requestConnection(),
|
|
@@ -1624,7 +1622,7 @@ var createPeerExtensionSdk = (options = {}) => {
|
|
|
1624
1622
|
authenticate: (params) => requirePeerMetadataBridge(options).authenticate(params),
|
|
1625
1623
|
onMetadataMessage: (callback) => requirePeerMetadataBridge(options).onMetadataMessage(callback),
|
|
1626
1624
|
openInstallPage: () => openPeerExtensionInstallPage(options),
|
|
1627
|
-
getState: () =>
|
|
1625
|
+
getState: () => getPeerExtensionState(options)
|
|
1628
1626
|
};
|
|
1629
1627
|
};
|
|
1630
1628
|
var peerExtensionSdk = createPeerExtensionSdk();
|
|
@@ -1673,4 +1671,4 @@ export {
|
|
|
1673
1671
|
createPeerExtensionSdk,
|
|
1674
1672
|
peerExtensionSdk
|
|
1675
1673
|
};
|
|
1676
|
-
//# sourceMappingURL=chunk-
|
|
1674
|
+
//# sourceMappingURL=chunk-NDVYCYUC.js.map
|