@piprail/sdk 3.1.1 → 3.1.2
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/dist/index.cjs +11 -2
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +11 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to `@piprail/sdk` are documented here. The format
|
|
|
4
4
|
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the
|
|
5
5
|
versions follow [Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [3.1.2] — 2026-09-09 — a balance says what it means
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **Three descriptions of a balance still said HOLDS after 3.1.0 made it SPENDABLE.** 3.1.0
|
|
12
|
+
changed the drivers to deduct a chain's retained minimum (Solana rent, XRPL/Stellar/Algorand
|
|
13
|
+
reserves) from the native figure, and documented that precisely on `WalletBalance.token` — but
|
|
14
|
+
every layer above it kept the old wording. `PipRailClient.balanceOf`'s TSDoc, the interface it
|
|
15
|
+
implements, and the `piprail_wallet` tool description a MODEL reads all still promised "what you
|
|
16
|
+
hold". They now say what they mean, and name the gap as locked rather than lost.
|
|
17
|
+
|
|
18
|
+
The wording mattered most in the tool description, because an agent comparing its own balance
|
|
19
|
+
against a block explorer sees a smaller number and has to decide whether it is being lied to. On
|
|
20
|
+
a live Stellar account holding 1.5398 XLM with three subentries, `balanceOf` reports 0.0398: the
|
|
21
|
+
1.5 XLM difference is the base reserve. Text only; no behaviour changes.
|
|
22
|
+
|
|
7
23
|
## [3.1.1] — 2026-09-09 — XRPL payments work again
|
|
8
24
|
|
|
9
25
|
### Fixed
|
|
@@ -2666,6 +2682,7 @@ straight into your wallet. The API is small and self-contained.
|
|
|
2666
2682
|
[1.5.0]: https://www.npmjs.com/package/@piprail/sdk
|
|
2667
2683
|
[1.4.0]: https://www.npmjs.com/package/@piprail/sdk
|
|
2668
2684
|
[1.3.1]: https://www.npmjs.com/package/@piprail/sdk
|
|
2685
|
+
[3.1.2]: https://www.npmjs.com/package/@piprail/sdk
|
|
2669
2686
|
[3.1.1]: https://www.npmjs.com/package/@piprail/sdk
|
|
2670
2687
|
[3.1.0]: https://www.npmjs.com/package/@piprail/sdk
|
|
2671
2688
|
[3.0.0]: https://www.npmjs.com/package/@piprail/sdk
|
package/dist/index.cjs
CHANGED
|
@@ -3800,7 +3800,16 @@ var PipRailClient = (_class2 = class {
|
|
|
3800
3800
|
return this.opts.chain;
|
|
3801
3801
|
}
|
|
3802
3802
|
/**
|
|
3803
|
-
* What this wallet actually
|
|
3803
|
+
* What this wallet can actually SPEND, per asset — the balance sheet, not the leash.
|
|
3804
|
+
*
|
|
3805
|
+
* 🔴 For a NATIVE asset this is not always what the chain says the account holds. Solana
|
|
3806
|
+
* (rent exemption), XRPL (base + owner reserve), Stellar (base reserve per subentry) and
|
|
3807
|
+
* Algorand (minimum balance) all require an account to retain a minimum it can never send,
|
|
3808
|
+
* and since 3.1.0 the drivers report that reserve DEDUCTED, because affordability measured
|
|
3809
|
+
* against the raw balance calls a payment affordable right up until the chain refuses it.
|
|
3810
|
+
* Live example: a Stellar account holding 1.5398 XLM with three subentries reports 0.0398,
|
|
3811
|
+
* the 1.5 XLM difference being the reserve. That is the number to spend against; it is not
|
|
3812
|
+
* missing money. `estimateCost()` judges gas against the TRUE balance separately.
|
|
3804
3813
|
*
|
|
3805
3814
|
* `budget()` answers "how much of my allowance is left", a different question and the only
|
|
3806
3815
|
* one an agent could previously ask. An agent that OWNS a wallet has to answer "what do I
|
|
@@ -8311,7 +8320,7 @@ function paymentTools(client) {
|
|
|
8311
8320
|
},
|
|
8312
8321
|
{
|
|
8313
8322
|
name: "piprail_wallet",
|
|
8314
|
-
description: "What YOU
|
|
8323
|
+
description: "What YOU can SPEND, and where you get paid \u2014 your balance sheet, which is a different question from piprail_budget (that is how much of your allowance is left). Returns your own address per chain plus the spendable amount of each asset. Use it before deciding to sell, swap or ask to be topped up, and give the address to anyone who needs to send you funds. On some chains a native amount is LOWER than the figure a block explorer shows, because the chain makes an account retain a minimum it can never send (Solana, XRPL, Stellar, Algorand). That gap is locked, not lost, and this number is the one you can actually pay with. A null amount means the read was UNAVAILABLE, not zero: do NOT treat it as being broke. Read-only; moves nothing and needs no approval.",
|
|
8315
8324
|
annotations: {
|
|
8316
8325
|
title: "Your wallet",
|
|
8317
8326
|
readOnlyHint: true,
|
package/dist/index.d.cts
CHANGED
|
@@ -5974,7 +5974,9 @@ interface PayingClient {
|
|
|
5974
5974
|
canAgentSell?(): boolean;
|
|
5975
5975
|
/** The chain this client is configured for — the default an offer is priced on. */
|
|
5976
5976
|
chain?(): ChainSelector;
|
|
5977
|
-
/** What this wallet
|
|
5977
|
+
/** What this wallet can SPEND, per asset — the balance sheet, distinct from the budget
|
|
5978
|
+
* leash. On a chain with a retained minimum (Solana rent, XRPL/Stellar/Algorand
|
|
5979
|
+
* reserves) a native balance reports the reserve DEDUCTED. See {@link WalletBalance}. */
|
|
5978
5980
|
balanceOf?(assets?: readonly string[]): Promise<WalletAssetBalance[]>;
|
|
5979
5981
|
}
|
|
5980
5982
|
/**
|
|
@@ -6214,7 +6216,16 @@ declare class PipRailClient {
|
|
|
6214
6216
|
* defaults to it, so an agent prices on the chain it actually holds funds on. */
|
|
6215
6217
|
chain(): ChainSelector;
|
|
6216
6218
|
/**
|
|
6217
|
-
* What this wallet actually
|
|
6219
|
+
* What this wallet can actually SPEND, per asset — the balance sheet, not the leash.
|
|
6220
|
+
*
|
|
6221
|
+
* 🔴 For a NATIVE asset this is not always what the chain says the account holds. Solana
|
|
6222
|
+
* (rent exemption), XRPL (base + owner reserve), Stellar (base reserve per subentry) and
|
|
6223
|
+
* Algorand (minimum balance) all require an account to retain a minimum it can never send,
|
|
6224
|
+
* and since 3.1.0 the drivers report that reserve DEDUCTED, because affordability measured
|
|
6225
|
+
* against the raw balance calls a payment affordable right up until the chain refuses it.
|
|
6226
|
+
* Live example: a Stellar account holding 1.5398 XLM with three subentries reports 0.0398,
|
|
6227
|
+
* the 1.5 XLM difference being the reserve. That is the number to spend against; it is not
|
|
6228
|
+
* missing money. `estimateCost()` judges gas against the TRUE balance separately.
|
|
6218
6229
|
*
|
|
6219
6230
|
* `budget()` answers "how much of my allowance is left", a different question and the only
|
|
6220
6231
|
* one an agent could previously ask. An agent that OWNS a wallet has to answer "what do I
|
package/dist/index.d.ts
CHANGED
|
@@ -5974,7 +5974,9 @@ interface PayingClient {
|
|
|
5974
5974
|
canAgentSell?(): boolean;
|
|
5975
5975
|
/** The chain this client is configured for — the default an offer is priced on. */
|
|
5976
5976
|
chain?(): ChainSelector;
|
|
5977
|
-
/** What this wallet
|
|
5977
|
+
/** What this wallet can SPEND, per asset — the balance sheet, distinct from the budget
|
|
5978
|
+
* leash. On a chain with a retained minimum (Solana rent, XRPL/Stellar/Algorand
|
|
5979
|
+
* reserves) a native balance reports the reserve DEDUCTED. See {@link WalletBalance}. */
|
|
5978
5980
|
balanceOf?(assets?: readonly string[]): Promise<WalletAssetBalance[]>;
|
|
5979
5981
|
}
|
|
5980
5982
|
/**
|
|
@@ -6214,7 +6216,16 @@ declare class PipRailClient {
|
|
|
6214
6216
|
* defaults to it, so an agent prices on the chain it actually holds funds on. */
|
|
6215
6217
|
chain(): ChainSelector;
|
|
6216
6218
|
/**
|
|
6217
|
-
* What this wallet actually
|
|
6219
|
+
* What this wallet can actually SPEND, per asset — the balance sheet, not the leash.
|
|
6220
|
+
*
|
|
6221
|
+
* 🔴 For a NATIVE asset this is not always what the chain says the account holds. Solana
|
|
6222
|
+
* (rent exemption), XRPL (base + owner reserve), Stellar (base reserve per subentry) and
|
|
6223
|
+
* Algorand (minimum balance) all require an account to retain a minimum it can never send,
|
|
6224
|
+
* and since 3.1.0 the drivers report that reserve DEDUCTED, because affordability measured
|
|
6225
|
+
* against the raw balance calls a payment affordable right up until the chain refuses it.
|
|
6226
|
+
* Live example: a Stellar account holding 1.5398 XLM with three subentries reports 0.0398,
|
|
6227
|
+
* the 1.5 XLM difference being the reserve. That is the number to spend against; it is not
|
|
6228
|
+
* missing money. `estimateCost()` judges gas against the TRUE balance separately.
|
|
6218
6229
|
*
|
|
6219
6230
|
* `budget()` answers "how much of my allowance is left", a different question and the only
|
|
6220
6231
|
* one an agent could previously ask. An agent that OWNS a wallet has to answer "what do I
|
package/dist/index.js
CHANGED
|
@@ -3800,7 +3800,16 @@ var PipRailClient = class {
|
|
|
3800
3800
|
return this.opts.chain;
|
|
3801
3801
|
}
|
|
3802
3802
|
/**
|
|
3803
|
-
* What this wallet actually
|
|
3803
|
+
* What this wallet can actually SPEND, per asset — the balance sheet, not the leash.
|
|
3804
|
+
*
|
|
3805
|
+
* 🔴 For a NATIVE asset this is not always what the chain says the account holds. Solana
|
|
3806
|
+
* (rent exemption), XRPL (base + owner reserve), Stellar (base reserve per subentry) and
|
|
3807
|
+
* Algorand (minimum balance) all require an account to retain a minimum it can never send,
|
|
3808
|
+
* and since 3.1.0 the drivers report that reserve DEDUCTED, because affordability measured
|
|
3809
|
+
* against the raw balance calls a payment affordable right up until the chain refuses it.
|
|
3810
|
+
* Live example: a Stellar account holding 1.5398 XLM with three subentries reports 0.0398,
|
|
3811
|
+
* the 1.5 XLM difference being the reserve. That is the number to spend against; it is not
|
|
3812
|
+
* missing money. `estimateCost()` judges gas against the TRUE balance separately.
|
|
3804
3813
|
*
|
|
3805
3814
|
* `budget()` answers "how much of my allowance is left", a different question and the only
|
|
3806
3815
|
* one an agent could previously ask. An agent that OWNS a wallet has to answer "what do I
|
|
@@ -8311,7 +8320,7 @@ function paymentTools(client) {
|
|
|
8311
8320
|
},
|
|
8312
8321
|
{
|
|
8313
8322
|
name: "piprail_wallet",
|
|
8314
|
-
description: "What YOU
|
|
8323
|
+
description: "What YOU can SPEND, and where you get paid \u2014 your balance sheet, which is a different question from piprail_budget (that is how much of your allowance is left). Returns your own address per chain plus the spendable amount of each asset. Use it before deciding to sell, swap or ask to be topped up, and give the address to anyone who needs to send you funds. On some chains a native amount is LOWER than the figure a block explorer shows, because the chain makes an account retain a minimum it can never send (Solana, XRPL, Stellar, Algorand). That gap is locked, not lost, and this number is the one you can actually pay with. A null amount means the read was UNAVAILABLE, not zero: do NOT treat it as being broke. Read-only; moves nothing and needs no approval.",
|
|
8315
8324
|
annotations: {
|
|
8316
8325
|
title: "Your wallet",
|
|
8317
8326
|
readOnlyHint: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@piprail/sdk",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"description": "Accept x402 crypto payments across 30 chains — every major EVM chain plus Solana, TON, Tron, NEAR, Sui, Aptos, Algorand, Stellar & XRPL — in a couple of lines. No backend, no database, no fee; payments settle straight to your wallet.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|