@v3finance/core-sdk 0.8.0 → 0.9.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 +24 -0
- package/dist/cjs/generated/operations.js +1 -1
- package/dist/cjs/generated/types.d.ts +17 -6
- package/dist/cjs/generated/types.d.ts.map +1 -1
- package/dist/cjs/resources/aml.d.ts +4 -0
- package/dist/cjs/resources/aml.d.ts.map +1 -1
- package/dist/cjs/resources/aml.js +4 -0
- package/dist/cjs/resources/aml.js.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 +17 -6
- package/dist/esm/generated/types.d.ts.map +1 -1
- package/dist/esm/resources/aml.d.ts +4 -0
- package/dist/esm/resources/aml.d.ts.map +1 -1
- package/dist/esm/resources/aml.js +4 -0
- package/dist/esm/resources/aml.js.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 +17 -6
- package/src/resources/aml.ts +4 -0
- package/src/version.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.9.0 — 2026-11-24
|
|
7
|
+
|
|
8
|
+
AML v2, step A4: AML rules on counterparty-directory edits. Recipient whitelists are built on
|
|
9
|
+
counterparties, so adding an address to a counterparty, or a counterparty to a group, widens who can
|
|
10
|
+
be paid. Spec snapshot from the live API (commit `08c81ec`,
|
|
11
|
+
[v3-finance/policy-engine#46](https://github.com/v3-finance/policy-engine/pull/46) and [#47](https://github.com/v3-finance/policy-engine/pull/47)). No operations
|
|
12
|
+
added or removed. Additive; counterparty edits can now be refused with `AML_BLOCKED`, sent for an AML
|
|
13
|
+
officer's approval (202), or refused with `AML_NO_ELIGIBLE_OFFICER` (409).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- AML rule `appliesTo` accepts `counterparty_address_add` (a new address on a counterparty) and
|
|
18
|
+
`counterparty_group_add` (addresses entering a group: a counterparty added to a group, a new address
|
|
19
|
+
on a counterparty already in one, and unarchiving such a counterparty or the group itself). These
|
|
20
|
+
rules take `scope: null` and `subject: "counterparty"` only.
|
|
21
|
+
- `vault(code).aml.evaluateRules(input)` takes `action` and `network` to dry-run a rule on a
|
|
22
|
+
counterparty edit; `fromAddressId` is now optional (still required for transfers). Each item in
|
|
23
|
+
`rules[]` may carry the `address` it fired on.
|
|
24
|
+
|
|
25
|
+
### Notes
|
|
26
|
+
|
|
27
|
+
- Reminder from 0.8.0: the policy selector `aml` is deprecated. The server rejects new policies with
|
|
28
|
+
it (400); put the risk in the vault's AML rules.
|
|
29
|
+
|
|
6
30
|
## 0.8.0 — 2026-11-24
|
|
7
31
|
|
|
8
32
|
AML v2, step A3: the vault's AML rules for transfers, the stop list and the provenance of funds.
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// the API does not slip in unclassified.
|
|
11
11
|
//
|
|
12
12
|
// Operations: 225 · admin: 45 · both: 1 · member: 176 · service: 3
|
|
13
|
-
// Spec sha256:
|
|
13
|
+
// Spec sha256: 3b96e1515464c0531895a4f4588812587ad9f612236f81d990bbff16389e5dff
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.OPERATIONS = void 0;
|
|
16
16
|
exports.isAdminOperation = isAdminOperation;
|
|
@@ -1733,7 +1733,7 @@ export interface RuleInput {
|
|
|
1733
1733
|
* - create_address → senderPattern
|
|
1734
1734
|
* - counterparty_* / counterparty_group_* → actorRole
|
|
1735
1735
|
*
|
|
1736
|
-
*
|
|
1736
|
+
* Снят: aml (AML v2) — риск теперь условие AML-правил Vault'а (/vaults/{code}/aml/rules); в схеме остаётся, чтобы отказ (400) объяснял, куда он переехал. Ретайрнуты: actorType (был no-op — единственный фактический тип инициатора «user», миграция 0043), signers (мультиподписи нет, контекст не заполнялся и селектор никогда бы не совпал)
|
|
1737
1737
|
*/
|
|
1738
1738
|
export type SelectorInput = {
|
|
1739
1739
|
type: "senderPattern";
|
|
@@ -5795,18 +5795,26 @@ export type AmlRiskCondition = {
|
|
|
5795
5795
|
value?: unknown;
|
|
5796
5796
|
};
|
|
5797
5797
|
export interface AmlRuleEvaluateBody {
|
|
5798
|
+
/** Что прогоняем; по умолчанию transfer. Для правок справочника `address` — адрес контрагента, сеть — `network`, `fromAddressId`/`amount`/`asset` не нужны */
|
|
5799
|
+
action?: "transfer" | "counterparty_address_add" | "counterparty_group_add";
|
|
5798
5800
|
/**
|
|
5799
|
-
* Получатель
|
|
5801
|
+
* Получатель перевода или адрес контрагента
|
|
5800
5802
|
*
|
|
5801
5803
|
* length: 1..∞
|
|
5802
5804
|
*/
|
|
5803
5805
|
address: string;
|
|
5804
5806
|
/**
|
|
5805
|
-
* Наш адрес-отправитель (для senderPattern и сети)
|
|
5807
|
+
* Наш адрес-отправитель (для senderPattern и сети). Обязателен для transfer
|
|
5806
5808
|
*
|
|
5807
5809
|
* length: 1..∞
|
|
5808
5810
|
*/
|
|
5809
|
-
fromAddressId
|
|
5811
|
+
fromAddressId?: string;
|
|
5812
|
+
/**
|
|
5813
|
+
* Сеть адреса контрагента (Network.slug). Обязательна для правок справочника
|
|
5814
|
+
*
|
|
5815
|
+
* length: 1..∞
|
|
5816
|
+
*/
|
|
5817
|
+
network?: string;
|
|
5810
5818
|
/** DECIMAL строка, как в POST /transfers (для селектора amount) */
|
|
5811
5819
|
amount?: string;
|
|
5812
5820
|
/** Код токена; по умолчанию — токен адреса */
|
|
@@ -5833,6 +5841,8 @@ export interface AmlRuleEvaluation {
|
|
|
5833
5841
|
why?: "match" | "unknown";
|
|
5834
5842
|
outcome?: "block" | "officer";
|
|
5835
5843
|
detail?: string;
|
|
5844
|
+
/** Правки справочника: адрес, на котором сработало */
|
|
5845
|
+
address?: string;
|
|
5836
5846
|
}>;
|
|
5837
5847
|
}
|
|
5838
5848
|
export interface AmlRule {
|
|
@@ -5850,8 +5860,9 @@ export interface AmlRule {
|
|
|
5850
5860
|
*/
|
|
5851
5861
|
version: number;
|
|
5852
5862
|
provider: "scorechain";
|
|
5853
|
-
|
|
5854
|
-
|
|
5863
|
+
/** Где стоит правило: transfer — перевод; counterparty_address_add — новый адрес контрагента (создание с адресами, правка, отдельная ручка адреса); counterparty_group_add — контрагент в группу (проверяются ВСЕ его адреса). Белый список стоит на контрагенте, поэтому эти правки расширяют круг получателей */
|
|
5864
|
+
appliesTo: Array<"transfer" | "counterparty_address_add" | "counterparty_group_add">;
|
|
5865
|
+
/** К каким операциям: селекторы перевода (senderPattern, destination, counterparty, counterpartyGroup, amount perTx, token) и destinationPattern — путь деривации НАШЕГО адреса-получателя. null — ко всем. Только у переводов: правило на правках справочника обязано иметь null */
|
|
5855
5866
|
scope: PolicyCondition | null;
|
|
5856
5867
|
/** Чей риск: counterparty — получателя перевода; provenance — источников средств адреса-отправителя (внешние депозиты за всю историю, через внутренние переводы до provenance.depth); совпадение хотя бы одного источника — срабатывание */
|
|
5857
5868
|
subject: "counterparty" | "provenance";
|