@v3finance/core-sdk 0.13.0 → 0.14.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 +36 -0
- package/dist/cjs/generated/operations.js +1 -1
- package/dist/cjs/generated/types.d.ts +57 -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 +57 -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 +57 -1
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,42 @@
|
|
|
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.1 — 2026-11-25
|
|
7
|
+
|
|
8
|
+
Spec snapshot from the live API (commit `7dfeb05`,
|
|
9
|
+
[v3-finance/policy-engine#60](https://github.com/v3-finance/policy-engine/pull/60)). No operations added or
|
|
10
|
+
removed (250).
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- `steps[].policyName` and `steps[].trigger` on an approval request — whose requirement the step is. A trigger
|
|
15
|
+
starting with `aml:` is an AML officer's signature.
|
|
16
|
+
|
|
17
|
+
## 0.14.0 — 2026-11-25
|
|
18
|
+
|
|
19
|
+
Payments, balances and reports read from the ledger, so they cannot disagree. Spec snapshot from the live
|
|
20
|
+
API (commit `15d4ed2`, [v3-finance/policy-engine#58](https://github.com/v3-finance/policy-engine/pull/58)).
|
|
21
|
+
No operations added or removed (250).
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
|
|
25
|
+
- Payment history has a new event, `spent` — the reserve went to a transfer of the payment. Exhaustive
|
|
26
|
+
`switch` statements will stop compiling. `released` without an actor means the system took the reserve
|
|
27
|
+
back (an AML hold among others); the reason is not disclosed.
|
|
28
|
+
- `paymentId` on ledger postings and on ledger accounts of `balances.list` — which payment the reserve is for.
|
|
29
|
+
- `account_statement` has `balanceParts`: how each part of the balance (available, reserved for transfers,
|
|
30
|
+
reserved for payments, held, blocked) got from opening to closing. `opening + movements = closing`.
|
|
31
|
+
- `payments_*` reports carry `reserved` and `held`; `payments_calendar` — `held` per asset.
|
|
32
|
+
- Push "Резерв платежа снят" (`data.type: "payment"`) to the author when the system takes the reserve.
|
|
33
|
+
|
|
34
|
+
### Changed
|
|
35
|
+
|
|
36
|
+
- A payment is settled, in progress or held by the ledger, not by statuses. `held` counts only the part of
|
|
37
|
+
a deposit that is actually held.
|
|
38
|
+
- Figures of a report for a past moment never change. A moment younger than 5 seconds counts as now.
|
|
39
|
+
- `account_statement` places an operation by the time of its ledger entry (`dateBasis` has no effect) and
|
|
40
|
+
includes addresses without operations in the period.
|
|
41
|
+
|
|
6
42
|
## 0.13.0 — 2026-11-25
|
|
7
43
|
|
|
8
44
|
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: 991c8ad810a7f9775ac01deb3d3323af879c3293b69553bd126c51d9dae8d979
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OPERATIONS = void 0;
|
|
16
16
|
exports.isAdminOperation = isAdminOperation;
|
|
@@ -852,6 +852,10 @@ export interface ApprovalRequestStep {
|
|
|
852
852
|
satisfied: boolean;
|
|
853
853
|
resolvedResultId: string | null;
|
|
854
854
|
appliedAt: string | null;
|
|
855
|
+
/** Чьё это требование: имя политики или AML-правила. null — шаг без требования подписи */
|
|
856
|
+
policyName: string | null;
|
|
857
|
+
/** Чем вызвано требование: "policy" | "limit:<REASON>" | "aml:<код>@vN" — подпись AML-офицера. Подпись офицера узнают по префиксу `aml:` здесь, а у заявки без шагов — по `decisionTrigger` */
|
|
858
|
+
trigger: string | null;
|
|
855
859
|
}
|
|
856
860
|
export interface RequestRisk {
|
|
857
861
|
role: "recipient" | "sender" | "counterparty";
|
|
@@ -2766,6 +2770,8 @@ export interface LedgerAccountItem {
|
|
|
2766
2770
|
address: string;
|
|
2767
2771
|
label: string | null;
|
|
2768
2772
|
} | null;
|
|
2773
|
+
/** Платёж, под который стоит резерв (purpose = reserved_payment); иначе null */
|
|
2774
|
+
paymentId: string | null;
|
|
2769
2775
|
}
|
|
2770
2776
|
export interface MagicLinkBody {
|
|
2771
2777
|
/** format: email */
|
|
@@ -4546,6 +4552,25 @@ export type WebhookResult = {
|
|
|
4546
4552
|
export interface AccountStatementReport {
|
|
4547
4553
|
report: ReportMeta;
|
|
4548
4554
|
balancesByAsset: StatementTokenRow[];
|
|
4555
|
+
/** Движение денег ВНУТРИ баланса по журналу: в резерв, из резерва, на проверку и обратно. Частей, где за период не было ни денег, ни движений, нет */
|
|
4556
|
+
balanceParts: Array<{
|
|
4557
|
+
tokenId: string;
|
|
4558
|
+
assetCode: string;
|
|
4559
|
+
assetSymbol: string;
|
|
4560
|
+
network: string;
|
|
4561
|
+
/** available — доступно; reserved_transfers и reserved_payments — в резерве под переводы и под платежи; held — на AML-проверке; blocked — отклонено */
|
|
4562
|
+
part: "available" | "reserved_transfers" | "reserved_payments" | "held" | "blocked";
|
|
4563
|
+
/** decimal */
|
|
4564
|
+
opening: string;
|
|
4565
|
+
/** decimal; всегда opening + сумма movements */
|
|
4566
|
+
closing: string;
|
|
4567
|
+
movements: Array<{
|
|
4568
|
+
/** Вид проводки, как в GET /ledger/entries */
|
|
4569
|
+
entryType: string;
|
|
4570
|
+
/** Со знаком, decimal */
|
|
4571
|
+
amount: string;
|
|
4572
|
+
}>;
|
|
4573
|
+
}>;
|
|
4549
4574
|
timeline: Array<{
|
|
4550
4575
|
/** Начало интервала (как periodStart у остальных) */
|
|
4551
4576
|
period: string;
|
|
@@ -5285,6 +5310,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5285
5310
|
outstanding: string;
|
|
5286
5311
|
/** Из них в пути, decimal */
|
|
5287
5312
|
inProgress: string;
|
|
5313
|
+
/** В резерве под эти платежи, decimal */
|
|
5314
|
+
reserved: string;
|
|
5288
5315
|
/** Из них просрочено, decimal */
|
|
5289
5316
|
overdue: string;
|
|
5290
5317
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5293,6 +5320,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5293
5320
|
amount: string;
|
|
5294
5321
|
/** Исполнено, decimal */
|
|
5295
5322
|
settled: string;
|
|
5323
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5324
|
+
held: string;
|
|
5296
5325
|
aging: Array<{
|
|
5297
5326
|
/** Сутки после срока: not_due — срок не наступил, no_due_date — срока нет */
|
|
5298
5327
|
bucket: "not_due" | "1_7" | "8_30" | "31_90" | "over_90" | "no_due_date";
|
|
@@ -5319,6 +5348,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5319
5348
|
outstanding: string;
|
|
5320
5349
|
/** Из них в пути, decimal */
|
|
5321
5350
|
inProgress: string;
|
|
5351
|
+
/** В резерве под эти платежи, decimal */
|
|
5352
|
+
reserved: string;
|
|
5322
5353
|
/** Из них просрочено, decimal */
|
|
5323
5354
|
overdue: string;
|
|
5324
5355
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5342,6 +5373,8 @@ export interface PaymentsOutstandingReport {
|
|
|
5342
5373
|
outstanding: string;
|
|
5343
5374
|
/** Из них в пути, decimal */
|
|
5344
5375
|
inProgress: string;
|
|
5376
|
+
/** В резерве под эти платежи, decimal */
|
|
5377
|
+
reserved: string;
|
|
5345
5378
|
/** Из них просрочено, decimal */
|
|
5346
5379
|
overdue: string;
|
|
5347
5380
|
/** range: -9007199254740991..9007199254740991 */
|
|
@@ -5366,6 +5399,10 @@ export interface PaymentsOutstandingReport {
|
|
|
5366
5399
|
settled: string;
|
|
5367
5400
|
/** В пути, decimal */
|
|
5368
5401
|
inProgress: string;
|
|
5402
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5403
|
+
held: string;
|
|
5404
|
+
/** В резерве под платёж, decimal */
|
|
5405
|
+
reserved: string;
|
|
5369
5406
|
/** Не исполнено: amount − settled, decimal */
|
|
5370
5407
|
outstanding: string;
|
|
5371
5408
|
dueAt: string | null;
|
|
@@ -5397,6 +5434,8 @@ export interface PaymentsCalendarReport {
|
|
|
5397
5434
|
network: string;
|
|
5398
5435
|
/** Свои деньги сейчас: доступно и резерв под платежи, decimal */
|
|
5399
5436
|
opening: string;
|
|
5437
|
+
/** На AML-проверке сейчас; в расчёт не входит, decimal */
|
|
5438
|
+
held: string;
|
|
5400
5439
|
/** Срок раньше начала периода; входит в расчёт сразу */
|
|
5401
5440
|
overdue: {
|
|
5402
5441
|
/** К получению, decimal */
|
|
@@ -5465,6 +5504,10 @@ export interface PaymentsCalendarReport {
|
|
|
5465
5504
|
settled: string;
|
|
5466
5505
|
/** В пути, decimal */
|
|
5467
5506
|
inProgress: string;
|
|
5507
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5508
|
+
held: string;
|
|
5509
|
+
/** В резерве под платёж, decimal */
|
|
5510
|
+
reserved: string;
|
|
5468
5511
|
/** Не исполнено: amount − settled, decimal */
|
|
5469
5512
|
outstanding: string;
|
|
5470
5513
|
dueAt: string | null;
|
|
@@ -5512,6 +5555,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5512
5555
|
settledOnTime: string;
|
|
5513
5556
|
/** Факт с опозданием, decimal */
|
|
5514
5557
|
settledLate: string;
|
|
5558
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5559
|
+
held: string;
|
|
5515
5560
|
/** Не исполнено, ещё ждём, decimal */
|
|
5516
5561
|
outstanding: string;
|
|
5517
5562
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5546,6 +5591,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5546
5591
|
settledOnTime: string;
|
|
5547
5592
|
/** Факт с опозданием, decimal */
|
|
5548
5593
|
settledLate: string;
|
|
5594
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5595
|
+
held: string;
|
|
5549
5596
|
/** Не исполнено, ещё ждём, decimal */
|
|
5550
5597
|
outstanding: string;
|
|
5551
5598
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5580,6 +5627,8 @@ export interface PaymentsPlanFactReport {
|
|
|
5580
5627
|
settledOnTime: string;
|
|
5581
5628
|
/** Факт с опозданием, decimal */
|
|
5582
5629
|
settledLate: string;
|
|
5630
|
+
/** Часть факта на AML-проверке или отклонённая, decimal */
|
|
5631
|
+
held: string;
|
|
5583
5632
|
/** Не исполнено, ещё ждём, decimal */
|
|
5584
5633
|
outstanding: string;
|
|
5585
5634
|
/** Не исполнено и закрыто, decimal */
|
|
@@ -5605,6 +5654,10 @@ export interface PaymentsPlanFactReport {
|
|
|
5605
5654
|
settled: string;
|
|
5606
5655
|
/** В пути, decimal */
|
|
5607
5656
|
inProgress: string;
|
|
5657
|
+
/** Часть settled на AML-проверке или отклонённая, decimal */
|
|
5658
|
+
held: string;
|
|
5659
|
+
/** В резерве под платёж, decimal */
|
|
5660
|
+
reserved: string;
|
|
5608
5661
|
/** Не исполнено: amount − settled, decimal */
|
|
5609
5662
|
outstanding: string;
|
|
5610
5663
|
dueAt: string | null;
|
|
@@ -5894,6 +5947,8 @@ export interface LedgerPosting {
|
|
|
5894
5947
|
ownerId: string;
|
|
5895
5948
|
/** null у vault-level счетов */
|
|
5896
5949
|
addressId: string | null;
|
|
5950
|
+
/** Платёж, под который стоит резерв (accountPurpose = reserved_payment); иначе null */
|
|
5951
|
+
paymentId: string | null;
|
|
5897
5952
|
/** Raw smallest units со знаком: "2500000" | "-2500000" */
|
|
5898
5953
|
amountRawSigned: string;
|
|
5899
5954
|
/** Та же сумма в единицах актива, со знаком: "-2.5". Если токена постинга нет в реестре (чего при живом FK быть не должно), сюда попадает raw — значение совпадёт с amountRawSigned */
|
|
@@ -7073,7 +7128,8 @@ export interface PaymentDetail {
|
|
|
7073
7128
|
}
|
|
7074
7129
|
export interface PaymentEvent {
|
|
7075
7130
|
id: string;
|
|
7076
|
-
|
|
7131
|
+
/** created … reopened — решения человека; allocated, deallocated — зачёты; reserved, released — резерв (released без автора — снят системой); spent — резерв ушёл на перевод по платежу */
|
|
7132
|
+
type: "created" | "updated" | "closed" | "cancelled" | "reopened" | "allocated" | "deallocated" | "reserved" | "released" | "spent";
|
|
7077
7133
|
/** null — автоматика */
|
|
7078
7134
|
actor: UserCard | null;
|
|
7079
7135
|
data: {
|