@atumlabs/payment-gateway-client 1.0.1 → 2.0.0

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 ADDED
@@ -0,0 +1,40 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [2.0.0] - 2026-07-27
9
+
10
+ ### Breaking
11
+ - `request_id` is now required on `preparePaymentRequest` (the client no longer silently auto-generates one, which could turn a retry into a second payment). Callers must supply a stable `request_id` and reuse it on retry. The `send-payment` CLI generates a one-shot id when `--request-id` is omitted.
12
+ - An explicit `deadlineSeconds` that is shorter than the settlement window (`fulfillmentDeadlineSeconds`) is now rejected — the deposit permit must stay valid until settlement.
13
+ - Solana now honors an explicit `nonce` (it was ignored on Solana in 1.0.2) and validates it at build time: a caller-supplied nonce must fit an unsigned 64-bit integer and its low byte (the on-chain replay slot) must be `< 235`, otherwise the build throws instead of failing later on-chain. Omitting `nonce` still derives it deterministically as before.
14
+
15
+ ### Changed
16
+ - Deposits are now built and signed through the shared `@atum-labs/payment-request-sender-auth` library instead of the client's own copy of that logic (single source of truth across the payment stack). The public signing API (`createSenderSigner`, `signPaymentRequest`, `resolveTurnkeyAddresses`) is unchanged.
17
+ - The EVM/Tron deposit permit deadline now tracks the payment's settlement (`fulfillment_deadline`) instead of a fixed far-future date, so the authorization's validity window is meaningful.
18
+
19
+ ### Added
20
+ - The deposit's single-use nonce is now derived deterministically from `request_id` + depositor, so rebuilding the same payment (e.g. on retry) reproduces the same single-use nonce. The guarantee differs by chain: on EVM/Tron the Permit2 nonce is a permanent on-chain bitmap, so of any number of rebuilds only one deposit can ever settle; on Solana the escrow replay nonce protects only within a ~128s window (`issued_at` is re-read per build), and the gateway's `request_id` dedup is the durable backstop beyond it — pin `issued_at` via `solanaClockReader` to keep a rebuild inside the same window.
21
+ - The depositor address is canonicalized before it seeds the nonce: EVM `0x` addresses are lower-cased (so a checksummed and a lowercase address derive the same nonce), while case-sensitive base58 (Solana/Tron) is used verbatim.
22
+
23
+ ## [1.0.2] - 2026-07-17
24
+
25
+ ### Added
26
+ - Turnkey signing provider: sign payments with a Turnkey-managed wallet using `--provider turnkey` (CLI and SDK), as an alternative to a local private key. The sender address is resolved from and verified against the Turnkey wallet per source chain.
27
+
28
+ ### Changed
29
+ - README now targets npm consumers; the monorepo source setup moved to `CONTRIBUTING.md`.
30
+
31
+ ## [1.0.1] - 2024-12-04
32
+
33
+ ### Added
34
+ - Help documentation now includes instructions on how to check payment status
35
+
36
+ ### Changed
37
+ - Default payment gateway now points to prod-testnet instead of staging-testnet
38
+
39
+ ### Fixed
40
+ - CLI now properly respects the `/defaults` fulfillment verifier endpoint
package/README.md CHANGED
@@ -8,47 +8,15 @@ TypeScript client for Atum Payment Gateway API with CLI support.
8
8
 
9
9
  ## Installation
10
10
 
11
- The package can be published to npm or to GitHub Packages (same artifact). Install
12
- from whichever registry it was published to.
13
-
14
- ### From npm (public)
11
+ `@atumlabs/payment-gateway-client` is a private npm package. Once your npm account
12
+ has been granted access, install it with npm:
15
13
 
16
14
  ```bash
17
- npm install @atum-labs/payment-gateway-client
15
+ npm install @atumlabs/payment-gateway-client
18
16
  ```
19
17
 
20
- ### From GitHub Packages (private)
21
-
22
- Point the `@atum-labs` scope at GitHub's npm registry and authenticate with a
23
- classic personal access token that has the `read:packages` scope. Add an `.npmrc`
24
- in your project (or `~/.npmrc`):
25
-
26
- ```
27
- @atum-labs:registry=https://npm.pkg.github.com
28
- //npm.pkg.github.com/:_authToken=YOUR_GITHUB_TOKEN
29
- ```
30
-
31
- Then `npm install @atum-labs/payment-gateway-client`. Your GitHub account must
32
- have been granted read access to the package.
33
-
34
- Either way this also installs the `send-payment`, `request-quote`,
35
- `quote-status`, and `payment-status` CLI commands.
36
-
37
- ### From source (monorepo)
38
-
39
- payment-gateway-client lives inside the protocol monorepo. To work on it from source:
40
-
41
- ```bash
42
- git clone https://github.com/Atum-Labs/protocol.git
43
- cd protocol
44
-
45
- # Install the workspace with pnpm. This builds payment-gateway-client and its
46
- # in-repo deps (km-core, turnkey-signer, solana-escrow-encoding) via the workspace:
47
- pnpm install
48
-
49
- # (Optional) expose the CLI globally:
50
- cd payment-gateway-client && pnpm link --global
51
- ```
18
+ This also installs the `send-payment`, `request-quote`, `quote-status`, and
19
+ `payment-status` CLI commands.
52
20
 
53
21
  ## CLI Usage
54
22
 
@@ -142,7 +110,7 @@ PRIVATE_KEY=0xabc... send-payment \
142
110
  To remove the global CLI command:
143
111
 
144
112
  ```bash
145
- npm unlink -g @atum-labs/payment-gateway-client
113
+ npm unlink -g @atumlabs/payment-gateway-client
146
114
  ```
147
115
 
148
116
  ## SDK Usage
@@ -154,7 +122,7 @@ import {
154
122
  PaymentGatewayClient,
155
123
  type PaymentResponse,
156
124
  ApiError
157
- } from '@atum-labs/payment-gateway-client';
125
+ } from '@atumlabs/payment-gateway-client';
158
126
  import { ethers } from 'ethers';
159
127
 
160
128
  const client = new PaymentGatewayClient({