@v3finance/core-sdk 0.13.0 → 0.14.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 +25 -0
- package/dist/cjs/generated/operations.js +1 -1
- package/dist/cjs/generated/types.d.ts +53 -1
- package/dist/cjs/generated/types.d.ts.map +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/generated/operations.js +1 -1
- package/dist/esm/generated/types.d.ts +53 -1
- package/dist/esm/generated/types.d.ts.map +1 -1
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
- package/src/generated/operations.ts +1 -1
- package/src/generated/types.ts +53 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this package are documented in this file. The format is based on
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).
|
|
5
5
|
|
|
6
|
+
## 0.14.0 — 2026-11-25
|
|
7
|
+
|
|
8
|
+
Payments, balances and reports read from the ledger, so they cannot disagree. Spec snapshot from the live
|
|
9
|
+
API (commit `15d4ed2`, [v3-finance/policy-engine#58](https://github.com/v3-finance/policy-engine/pull/58)).
|
|
10
|
+
No operations added or removed (250).
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Payment history has a new event, `spent` — the reserve went to a transfer of the payment. Exhaustive
|
|
15
|
+
`switch` statements will stop compiling. `released` without an actor means the system took the reserve
|
|
16
|
+
back (an AML hold among others); the reason is not disclosed.
|
|
17
|
+
- `paymentId` on ledger postings and on ledger accounts of `balances.list` — which payment the reserve is for.
|
|
18
|
+
- `account_statement` has `balanceParts`: how each part of the balance (available, reserved for transfers,
|
|
19
|
+
reserved for payments, held, blocked) got from opening to closing. `opening + movements = closing`.
|
|
20
|
+
- `payments_*` reports carry `reserved` and `held`; `payments_calendar` — `held` per asset.
|
|
21
|
+
- Push "Резерв платежа снят" (`data.type: "payment"`) to the author when the system takes the reserve.
|
|
22
|
+
|
|
23
|
+
### Changed
|
|
24
|
+
|
|
25
|
+
- A payment is settled, in progress or held by the ledger, not by statuses. `held` counts only the part of
|
|
26
|
+
a deposit that is actually held.
|
|
27
|
+
- Figures of a report for a past moment never change. A moment younger than 5 seconds counts as now.
|
|
28
|
+
- `account_statement` places an operation by the time of its ledger entry (`dateBasis` has no effect) and
|
|
29
|
+
includes addresses without operations in the period.
|
|
30
|
+
|
|
6
31
|
## 0.13.0 — 2026-11-25
|
|
7
32
|
|
|
8
33
|
Expected payments and deals. Spec snapshot from the live API (commit `9c687db`,
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// the API does not slip in unclassified.
|
|
11
11
|
//
|
|
12
12
|
// Operations: 250 · admin: 45 · both: 1 · member: 201 · service: 3
|
|
13
|
-
// Spec sha256:
|
|
13
|
+
// Spec sha256: 4b9e3ca9542cba7949fc7c43acfec18edd099e4db4524f85c0bd804ae4428e52
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OPERATIONS = void 0;
|
|
16
16
|
exports.isAdminOperation = isAdminOperation;
|
|
@@ -2766,6 +2766,8 @@ export interface LedgerAccountItem {
|
|
|
2766
2766
|
address: string;
|
|
2767
2767
|
label: string | null;
|
|
2768
2768
|
} | null;
|
|
2769
|
+
/** Платёж, под который стоит резерв (purpose = reserved_payment); иначе null */
|
|
2770
|
+
paymentId: string | null;
|
|
2769
2771
|
}
|
|
2770
2772
|
export interface MagicLinkBody {
|
|
2771
2773
|
/** format: email */
|
|
@@ -4546,6 +4548,25 @@ export type WebhookResult = {
|
|
|
4546
4548
|
export interface AccountStatementReport {
|
|
4547
4549
|
report: ReportMeta;
|
|
4548
4550
|
balancesByAsset: StatementTokenRow[];
|
|
4551
|
+
/** Движение денег ВНУТРИ баланса по журналу: в резерв, из резерва, на проверку и обратно. Частей, где за период не было ни денег, ни движений, нет */
|
|
4552
|
+
balanceParts: Array<{
|
|
4553
|
+
tokenId: string;
|
|
4554
|
+
assetCode: string;
|
|
4555
|
+
assetSymbol: string;
|
|
4556
|
+
network: string;
|
|
4557
|
+
/** available — доступно; reserved_transfers и reserved_payments — в резерве под переводы и под платежи; held — на AML-проверке; blocked — отклонено */
|
|
4558
|
+
part: "available" | "reserved_transfers" | "reserved_payments" | "held" | "blocked";
|
|
4559
|
+
/** decimal */
|
|
4560
|
+
opening: string;
|
|
4561
|
+
/** decimal; всегда opening + сумма movements */
|
|
4562
|
+
closing: string;
|
|
4563
|
+
movements: Array<{
|
|
4564
|
+
/** Вид проводки, как в GET /ledger/entries */
|
|
4565
|
+
entryType: string;
|
|
4566
|
+
/** Со знаком, decimal */
|
|
4567
|
+
amount: string;
|
|
4568
|
+
}>;
|
|
4569
|
+
}>;
|
|
4549
4570
|
timeline: Array<{
|
|
4550
4571
|
/** Начало интервала (как periodStart у остальных) */
|
|
4551
4572
|
period: string;
|
|
@@ -5285,6 +5306,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5285
5306
|
outstanding: string;
|
|
5286
5307
|
/** Из них в пути, decimal */
|
|
5287
5308
|
inProgress: string;
|
|
5309
|
+
/** В резерве под эти платежи, decimal */
|
|
5310
|
+
reserved: string;
|
|
5288
5311
|
/** Из них просрочено, decimal */
|
|
5289
5312
|
overdue: string;
|
|
5290
5313
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5293,6 +5316,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5293
5316
|
amount: string;
|
|
5294
5317
|
/** Исполнено, decimal */
|
|
5295
5318
|
settled: string;
|
|
5319
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5320
|
+
held: string;
|
|
5296
5321
|
aging: Array<{
|
|
5297
5322
|
/** Сутки после срока: not_due — срок не наступил, no_due_date — срока нет */
|
|
5298
5323
|
bucket: "not_due" | "1_7" | "8_30" | "31_90" | "over_90" | "no_due_date";
|
|
@@ -5319,6 +5344,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5319
5344
|
outstanding: string;
|
|
5320
5345
|
/** Из них в пути, decimal */
|
|
5321
5346
|
inProgress: string;
|
|
5347
|
+
/** В резерве под эти платежи, decimal */
|
|
5348
|
+
reserved: string;
|
|
5322
5349
|
/** Из них просрочено, decimal */
|
|
5323
5350
|
overdue: string;
|
|
5324
5351
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5342,6 +5369,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5342
5369
|
outstanding: string;
|
|
5343
5370
|
/** Из них в пути, decimal */
|
|
5344
5371
|
inProgress: string;
|
|
5372
|
+
/** В резерве под эти платежи, decimal */
|
|
5373
|
+
reserved: string;
|
|
5345
5374
|
/** Из них просрочено, decimal */
|
|
5346
5375
|
overdue: string;
|
|
5347
5376
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5366,6 +5395,10 @@ export interface PaymentsOutstandingReport {
|
|
|
5366
5395
|
settled: string;
|
|
5367
5396
|
/** В пути, decimal */
|
|
5368
5397
|
inProgress: string;
|
|
5398
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5399
|
+
held: string;
|
|
5400
|
+
/** В резерве под платёж, decimal */
|
|
5401
|
+
reserved: string;
|
|
5369
5402
|
/** Не исполнено: amount − settled, decimal */
|
|
5370
5403
|
outstanding: string;
|
|
5371
5404
|
dueAt: string | null;
|
|
@@ -5397,6 +5430,8 @@ export interface PaymentsCalendarReport {
|
|
|
5397
5430
|
network: string;
|
|
5398
5431
|
/** Свои деньги сейчас: доступно и резерв под платежи, decimal */
|
|
5399
5432
|
opening: string;
|
|
5433
|
+
/** На AML-проверке сейчас; в расчёт не входит, decimal */
|
|
5434
|
+
held: string;
|
|
5400
5435
|
/** Срок раньше начала периода; входит в расчёт сразу */
|
|
5401
5436
|
overdue: {
|
|
5402
5437
|
/** К получению, decimal */
|
|
@@ -5465,6 +5500,10 @@ export interface PaymentsCalendarReport {
|
|
|
5465
5500
|
settled: string;
|
|
5466
5501
|
/** В пути, decimal */
|
|
5467
5502
|
inProgress: string;
|
|
5503
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5504
|
+
held: string;
|
|
5505
|
+
/** В резерве под платёж, decimal */
|
|
5506
|
+
reserved: string;
|
|
5468
5507
|
/** Не исполнено: amount − settled, decimal */
|
|
5469
5508
|
outstanding: string;
|
|
5470
5509
|
dueAt: string | null;
|
|
@@ -5512,6 +5551,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5512
5551
|
settledOnTime: string;
|
|
5513
5552
|
/** Факт с опозданием, decimal */
|
|
5514
5553
|
settledLate: string;
|
|
5554
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5555
|
+
held: string;
|
|
5515
5556
|
/** Не исполнено, ещё ждём, decimal */
|
|
5516
5557
|
outstanding: string;
|
|
5517
5558
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5546,6 +5587,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5546
5587
|
settledOnTime: string;
|
|
5547
5588
|
/** Факт с опозданием, decimal */
|
|
5548
5589
|
settledLate: string;
|
|
5590
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5591
|
+
held: string;
|
|
5549
5592
|
/** Не исполнено, ещё ждём, decimal */
|
|
5550
5593
|
outstanding: string;
|
|
5551
5594
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5580,6 +5623,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5580
5623
|
settledOnTime: string;
|
|
5581
5624
|
/** Факт с опозданием, decimal */
|
|
5582
5625
|
settledLate: string;
|
|
5626
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5627
|
+
held: string;
|
|
5583
5628
|
/** Не исполнено, ещё ждём, decimal */
|
|
5584
5629
|
outstanding: string;
|
|
5585
5630
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5605,6 +5650,10 @@ export interface PaymentsPlanFactReport {
|
|
|
5605
5650
|
settled: string;
|
|
5606
5651
|
/** В пути, decimal */
|
|
5607
5652
|
inProgress: string;
|
|
5653
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5654
|
+
held: string;
|
|
5655
|
+
/** В резерве под платёж, decimal */
|
|
5656
|
+
reserved: string;
|
|
5608
5657
|
/** Не исполнено: amount − settled, decimal */
|
|
5609
5658
|
outstanding: string;
|
|
5610
5659
|
dueAt: string | null;
|
|
@@ -5894,6 +5943,8 @@ export interface LedgerPosting {
|
|
|
5894
5943
|
ownerId: string;
|
|
5895
5944
|
/** null у vault-level счетов */
|
|
5896
5945
|
addressId: string | null;
|
|
5946
|
+
/** Платёж, под который стоит резерв (accountPurpose = reserved_payment); иначе null */
|
|
5947
|
+
paymentId: string | null;
|
|
5897
5948
|
/** Raw smallest units со знаком: "2500000" | "-2500000" */
|
|
5898
5949
|
amountRawSigned: string;
|
|
5899
5950
|
/** Та же сумма в единицах актива, со знаком: "-2.5". Если токена постинга нет в реестре (чего при живом FK быть не должно), сюда попадает raw — значение совпадёт с amountRawSigned */
|
|
@@ -7073,7 +7124,8 @@ export interface PaymentDetail {
|
|
|
7073
7124
|
}
|
|
7074
7125
|
export interface PaymentEvent {
|
|
7075
7126
|
id: string;
|
|
7076
|
-
|
|
7127
|
+
/** created … reopened — решения человека; allocated, deallocated — зачёты; reserved, released — резерв (released без автора — снят системой); spent — резерв ушёл на перевод по платежу */
|
|
7128
|
+
type: "created" | "updated" | "closed" | "cancelled" | "reopened" | "allocated" | "deallocated" | "reserved" | "released" | "spent";
|
|
7077
7129
|
/** null — автоматика */
|
|
7078
7130
|
actor: UserCard | null;
|
|
7079
7131
|
data: {
|