@integraledger/profile-facilitator 0.4.0 → 0.5.1
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 +107 -0
- package/README.md +781 -456
- package/dist/answers.d.ts +11 -4
- package/dist/answers.js +24 -0
- package/dist/core.d.ts +51 -0
- package/dist/core.js +758 -0
- package/dist/http.d.ts +20 -3
- package/dist/http.js +32 -7
- package/dist/index.d.ts +12 -36
- package/dist/index.js +9 -162
- package/dist/module.d.ts +372 -0
- package/dist/module.js +13 -0
- package/dist/modules/algorand/index.d.ts +22 -0
- package/dist/modules/algorand/index.js +247 -0
- package/dist/modules/algorand/own.d.ts +26 -0
- package/dist/modules/algorand/own.js +231 -0
- package/dist/modules/aptos/index.d.ts +23 -0
- package/dist/modules/aptos/index.js +232 -0
- package/dist/modules/cardano/index.d.ts +18 -0
- package/dist/modules/cardano/index.js +124 -0
- package/dist/modules/casper/index.d.ts +120 -0
- package/dist/modules/casper/index.js +442 -0
- package/dist/modules/concordium/index.d.ts +16 -0
- package/dist/modules/concordium/index.js +77 -0
- package/dist/modules/erc7710/index.d.ts +26 -0
- package/dist/modules/erc7710/index.js +220 -0
- package/dist/modules/evm/forms.d.ts +74 -0
- package/dist/modules/evm/forms.js +204 -0
- package/dist/modules/evm/index.d.ts +40 -0
- package/dist/modules/evm/index.js +154 -0
- package/dist/modules/evm/node.d.ts +29 -0
- package/dist/modules/evm/node.js +222 -0
- package/dist/modules/hedera/executor.d.ts +63 -0
- package/dist/modules/hedera/executor.js +343 -0
- package/dist/modules/hedera/index.d.ts +23 -0
- package/dist/modules/hedera/index.js +136 -0
- package/dist/modules/hedera/mirror.d.ts +32 -0
- package/dist/modules/hedera/mirror.js +111 -0
- package/dist/modules/index.d.ts +23 -0
- package/dist/modules/index.js +24 -0
- package/dist/modules/lnbtc/index.d.ts +10 -0
- package/dist/modules/lnbtc/index.js +112 -0
- package/dist/modules/near/index.d.ts +18 -0
- package/dist/modules/near/index.js +246 -0
- package/dist/modules/polkadot/index.d.ts +12 -0
- package/dist/modules/polkadot/index.js +149 -0
- package/dist/modules/polkadot/rail.d.ts +40 -0
- package/dist/{polkadot.js → modules/polkadot/rail.js} +214 -288
- package/dist/modules/solana/index.d.ts +60 -0
- package/dist/modules/solana/index.js +326 -0
- package/dist/modules/solana/reader.d.ts +25 -0
- package/dist/modules/solana/reader.js +194 -0
- package/dist/modules/solana/state.d.ts +6 -0
- package/dist/modules/solana/state.js +103 -0
- package/dist/modules/starknet/index.d.ts +35 -0
- package/dist/modules/starknet/index.js +548 -0
- package/dist/modules/starknet/node.d.ts +78 -0
- package/dist/modules/starknet/node.js +339 -0
- package/dist/modules/stellar/index.d.ts +44 -0
- package/dist/modules/stellar/index.js +481 -0
- package/dist/modules/stellar/node.d.ts +57 -0
- package/dist/modules/stellar/node.js +151 -0
- package/dist/modules/sui/index.d.ts +16 -0
- package/dist/modules/sui/index.js +310 -0
- package/dist/modules/sui/node.d.ts +49 -0
- package/dist/modules/sui/node.js +197 -0
- package/dist/modules/ton/index.d.ts +16 -0
- package/dist/modules/ton/index.js +73 -0
- package/dist/modules/tron/index.d.ts +12 -0
- package/dist/modules/tron/index.js +120 -0
- package/dist/modules/tron/rail.d.ts +32 -0
- package/dist/{tron.js → modules/tron/rail.js} +206 -195
- package/dist/modules/xrpl/index.d.ts +28 -0
- package/dist/modules/xrpl/index.js +299 -0
- package/dist/modules/xrpl/node.d.ts +52 -0
- package/dist/modules/xrpl/node.js +231 -0
- package/dist/modules/xrpl/upto.d.ts +5 -0
- package/dist/modules/xrpl/upto.js +269 -0
- package/dist/record.d.ts +131 -0
- package/dist/record.js +330 -0
- package/dist/unexpected.d.ts +3 -2
- package/dist/unexpected.js +2 -1
- package/dist/wrapper.d.ts +68 -0
- package/dist/wrapper.js +126 -0
- package/package.json +48 -12
- package/dist/polkadot.d.ts +0 -21
- package/dist/store.d.ts +0 -59
- package/dist/store.js +0 -103
- package/dist/tron.d.ts +0 -12
- /package/dist/{base58check.d.ts → modules/tron/base58check.d.ts} +0 -0
- /package/dist/{base58check.js → modules/tron/base58check.js} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Every release of `@integraledger/profile-facilitator`, the settler, with what an operator must act on. The format
|
|
4
|
+
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). The package is 0.x: a minor release may change the
|
|
5
|
+
configuration, the answers or the storage.
|
|
6
|
+
|
|
7
|
+
## [0.5.1] - 2026-11-20
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- The peer dependency is `@integraledger/lcp` `~0.6.3` (0.5.0: `~0.6.0`). Install `@integraledger/lcp@~0.6.3` beside
|
|
12
|
+
it: the `starknet` kind takes an amount of zero on Starknet Sepolia's STRK and USDC, as lcp does from 0.6.3.
|
|
13
|
+
- The README's module table gives each pairing's `confirmed` as `@integraledger/lcp`'s registry now states it: `yes`
|
|
14
|
+
on `x402/exact/cardano/lock`, `x402/exact/eip155/permit2`, `x402/upto/eip155/permit2`,
|
|
15
|
+
`x402/auth-capture/eip155/eip3009`, `x402/auth-capture/eip155/permit2`, `x402/batch-settlement/eip155`,
|
|
16
|
+
`x402/exact/eip155/erc7710`, `x402/exact/eip155/erc7710-salt` and `x402/upto/xrpl`, each shown end to end by a
|
|
17
|
+
recorded run on a test network. No module's behaviour changes.
|
|
18
|
+
- `GET /supported`: each kind's `extra.acceptsZero` is the list of its pairings that take an amount of zero, `[]`
|
|
19
|
+
where none does, where 0.5.0 stated a boolean for the kind. An option of amount zero is refused
|
|
20
|
+
`invalid_payment_requirements` where its pairing is not in the list. `exact` on an `eip155` network names
|
|
21
|
+
`x402/exact/eip155/eip3009`, whose transfer of zero Base Sepolia's USDC takes, and not `x402/exact/eip155/permit2`,
|
|
22
|
+
whose proxy reverts at zero; `sui` names `x402/exact/sui`, a transfer of zero having executed on Sui testnet where the
|
|
23
|
+
buyer pays gas; `starknet` names `x402/exact/starknet` on `starknet:SN_SEPOLIA`, where lcp takes an amount of zero on
|
|
24
|
+
STRK and USDC, each of whose `transfer` of 0 emits a `Transfer` of 0, and states `[]` on `starknet:SN_MAIN`.
|
|
25
|
+
`polkadot` states `[]`. Each module's list and its evidence are in [The modules](./README.md#the-modules).
|
|
26
|
+
|
|
27
|
+
### Fixed
|
|
28
|
+
|
|
29
|
+
- `x402/upto/eip155/permit2`: `/settle` of a charge below the maximum the payment accepted, the requirements x402's
|
|
30
|
+
`upto` resource server sends, was refused `invalid_payload`. Requirements that are the option the payment accepted in
|
|
31
|
+
every member but an `amount` at or below the accepted one are held as that option, and the check `/settle` makes
|
|
32
|
+
before it submits verifies the permit against the accepted maximum, as the class's own settle does
|
|
33
|
+
([The modules](./README.md#the-modules)).
|
|
34
|
+
- `x402/upto/solana`: `/settle` of the deposit and of the claim x402's `upto` resource server sends, each carrying the
|
|
35
|
+
`type` that server adds, was refused `invalid_upto_svm_payload_type` by the check `/settle` makes before it submits,
|
|
36
|
+
the class's `verify` of an opening. A deposit is checked as the buyer sent it, without the `type`, and a claim by the
|
|
37
|
+
class's own settle ([The modules](./README.md#the-modules)).
|
|
38
|
+
|
|
39
|
+
## [0.5.0] - 2026-11-18
|
|
40
|
+
|
|
41
|
+
The settler for the x402 pairings `@integraledger/lcp` 0.6.0 ships, on x402's own facilitator class (`@x402/core`
|
|
42
|
+
2.31.0) with one module per chain form. 0.4.0 served Tron and Polkadot alone.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- The package moved into this repository, in [`settler/`](https://github.com/IntegraLedger/integra-protocol/tree/main/settler):
|
|
47
|
+
its `repository`, `homepage` and `bugs` name `IntegraLedger/integra-protocol`. 0.4.0 and earlier were published from
|
|
48
|
+
another repository, and this file starts at 0.5.0.
|
|
49
|
+
- The peer dependency is `@integraledger/lcp` `~0.6.0` (0.4.0: `~0.5.0`). Install `@integraledger/lcp@~0.6.0` beside it.
|
|
50
|
+
- `engines.node` is `>=24.22.1` (0.4.0: `>=24`).
|
|
51
|
+
- Storage. The record moves from the table `settlement` to the table `instrument`, beside two new tables, `fee` and
|
|
52
|
+
`module_state`, all three created at start where they do not exist ([Storage](./README.md#storage)). 0.5.0 never
|
|
53
|
+
reads or writes `settlement`, and does not fill `instrument` from it. The role in `store.url` needs `CREATE` on the
|
|
54
|
+
schema and owns the tables ([The database](./README.md#the-database)).
|
|
55
|
+
- The record keys a payment by its instrument: a Tron payment by its transaction id, as before, and a Polkadot payment
|
|
56
|
+
by its signer and the account nonce it signed, no longer by the extrinsic's hash, so a payment signed again at the
|
|
57
|
+
same nonce is the same payment.
|
|
58
|
+
- A repeated `/settle` of a payment the record holds final is answered `invalid_transaction_state` naming the
|
|
59
|
+
transaction the row holds, whatever the first answer was. 0.4.0 answered a stored success so, and returned any other
|
|
60
|
+
stored final answer as first given.
|
|
61
|
+
- `GET /supported`: each kind's `extra` also states `pairings`, `key` and `acceptsZero`, and `feeBudget: true` on a
|
|
62
|
+
network with a fee budget; `signers` is keyed by CAIP family (`"tron:*": []`, `"polkadot:*": []`), where 0.4.0
|
|
63
|
+
answered `{}`.
|
|
64
|
+
- A request body may hold up to 132,096 bytes (0.4.0: 65,536); a larger one is answered `413`.
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- Sixteen modules, each started by its own member of the configuration: `algorand`, `aptos`, `cardano`, `casper`,
|
|
69
|
+
`concordium`, `erc7710`, `evm`, `hedera`, `lnbtc`, `near`, `solana`, `starknet`, `stellar`, `sui`, `ton` and `xrpl`,
|
|
70
|
+
beside `tron` and `polkadot`. Each module's networks, pairings, key and the registry's `confirmed` value for each
|
|
71
|
+
pairing are in [The modules](./README.md#the-modules). `casper` serves `casper:casper-test` alone and does not start
|
|
72
|
+
on `casper:casper`; `x402/exact/casper` and `x402/exact/ccd` are served with `confirmed` `no`. The `cardano`,
|
|
73
|
+
`concordium` and `ton` modules take an lcp reader the operator writes.
|
|
74
|
+
- `credential`: the bearer credential every call must then present. A deployment with a module whose key is not
|
|
75
|
+
`none` does not start without it; `tron` and `polkadot` hold no key, so a 0.4.0 configuration starts without one. A
|
|
76
|
+
call without it is answered `401` before its body is read.
|
|
77
|
+
- `feeBudgets`, at most one per network, which cap the fees a module's key pays; a spent budget is answered
|
|
78
|
+
`fee_budget_spent`.
|
|
79
|
+
- The export `FeeBudgetConfig`.
|
|
80
|
+
- `extra.acceptsZero`: a kind that states `false`, as Tron's and Polkadot's do, refuses an option of amount zero
|
|
81
|
+
`invalid_payment_requirements`.
|
|
82
|
+
- Start refusals for the new members (a credential's characters, fee budgets, the modules' own members, a keyed module
|
|
83
|
+
without `credential`), each listed with its message in [What stops the start](./README.md#what-stops-the-start).
|
|
84
|
+
|
|
85
|
+
### Unchanged
|
|
86
|
+
|
|
87
|
+
- The configuration members `listen`, `store`, `settleWaitMs`, `operatorLog`, `tron` and `polkadot`, with the same
|
|
88
|
+
shapes, and the server's request timeout of `settleWaitMs` plus 60 seconds.
|
|
89
|
+
|
|
90
|
+
### Upgrading from 0.4.0
|
|
91
|
+
|
|
92
|
+
0.5.0 does not know the payments 0.4.0 answered, and judges a repeated `/settle` of one afresh, by the module's checks
|
|
93
|
+
and lcp's read of the chain ([Upgrading from 0.4.0](./README.md#upgrading-from-040)):
|
|
94
|
+
|
|
95
|
+
- A payment 0.4.0 answered success is never answered success again: Tron's checks refuse a transaction id the node
|
|
96
|
+
holds in its blocks or pending pool, and an expiration passed; Polkadot's node no longer answers the extrinsic valid
|
|
97
|
+
once its nonce is used. The answer is `invalid_transaction_state` naming the transaction where lcp's read shows the
|
|
98
|
+
payment final, and otherwise the check's refusal.
|
|
99
|
+
- A payment 0.4.0 answered `settlement_pending` is answered the same way once its transaction is in a block, so 0.5.0
|
|
100
|
+
never answers it success, though it landed; a Polkadot extrinsic still in the node's pool when the repeat arrives is
|
|
101
|
+
claimed and answered success once final.
|
|
102
|
+
- Neither rail lets one signed payment land twice. Finish 0.4.0's pending payments on 0.4.0 before switching, or read
|
|
103
|
+
them with lcp's `status`, and do not run both versions at once for the same payments: each keeps its own record, and
|
|
104
|
+
each can answer one payment success.
|
|
105
|
+
|
|
106
|
+
[0.5.1]: https://github.com/IntegraLedger/integra-protocol/tree/settler-v0.5.1/settler
|
|
107
|
+
[0.5.0]: https://github.com/IntegraLedger/integra-protocol/tree/settler-v0.5.0/settler
|