@notabene/javascript-sdk 2.15.0 → 2.16.0-next.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/README.md +10 -0
- package/dist/cjs/notabene.cjs +1 -1
- package/dist/cjs/notabene.d.ts +500 -3
- package/dist/cjs/package.json +3 -5
- package/dist/esm/notabene.d.ts +500 -3
- package/dist/esm/notabene.js +9 -7
- package/dist/esm/package.json +3 -5
- package/dist/notabene.d.ts +500 -3
- package/dist/notabene.js +9 -7
- package/package.json +3 -5
- package/src/types.ts +1 -0
- package/src/utils/arbitraries.ts +1 -0
package/dist/notabene.js
CHANGED
|
@@ -368,27 +368,29 @@ function Mn(e) {
|
|
|
368
368
|
return e.replace(/\s+/g, "").toUpperCase();
|
|
369
369
|
}
|
|
370
370
|
function kn(e) {
|
|
371
|
-
|
|
371
|
+
var l;
|
|
372
|
+
if (!((l = e.name) != null && l.nameIdentifier) || e.name.nameIdentifier.length === 0)
|
|
372
373
|
return "";
|
|
373
|
-
const d = e.name.find((
|
|
374
|
+
const d = e.name.nameIdentifier.find((s) => s.naturalPersonNameIdentifierType === "LEGL") || e.name.nameIdentifier[0], m = [];
|
|
374
375
|
return d.secondaryIdentifier && m.push(d.secondaryIdentifier), m.push(d.primaryIdentifier), m.join(" ");
|
|
375
376
|
}
|
|
376
377
|
function Cn(e) {
|
|
377
|
-
|
|
378
|
+
var m;
|
|
379
|
+
return !((m = e.name) != null && m.nameIdentifier) || e.name.nameIdentifier.length === 0 ? "" : (e.name.nameIdentifier.find((l) => l.legalPersonNameIdentifierType === "LEGL") || e.name.nameIdentifier[0]).legalPersonName;
|
|
378
380
|
}
|
|
379
381
|
function ai(e) {
|
|
380
|
-
return
|
|
382
|
+
return e.originatorPerson.map((d) => d.naturalPerson ? kn(d.naturalPerson) : d.legalPerson ? Cn(d.legalPerson) : "").filter((d) => d.length > 0);
|
|
381
383
|
}
|
|
382
384
|
function oi(e) {
|
|
383
|
-
return
|
|
385
|
+
return e.beneficiaryPerson.map((d) => d.naturalPerson ? kn(d.naturalPerson) : d.legalPerson ? Cn(d.legalPerson) : "").filter((d) => d.length > 0);
|
|
384
386
|
}
|
|
385
387
|
async function ui(e) {
|
|
386
388
|
let n;
|
|
387
389
|
if (typeof e == "string")
|
|
388
390
|
n = e;
|
|
389
|
-
else if ("
|
|
391
|
+
else if ("originatorPerson" in e)
|
|
390
392
|
n = ai(e).join(" ");
|
|
391
|
-
else if ("
|
|
393
|
+
else if ("beneficiaryPerson" in e)
|
|
392
394
|
n = oi(e).join(" ");
|
|
393
395
|
else
|
|
394
396
|
throw new Error("Invalid input type. Expected string, IVMS101 Originator, or IVMS101 Beneficiary");
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"author": "Notabene <developers@notabene.id>",
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"packageManager": "yarn@4.5.1",
|
|
13
|
-
"version": "2.
|
|
13
|
+
"version": "2.16.0-next.1",
|
|
14
14
|
"source": "src/notabene.ts",
|
|
15
15
|
"main": "dist/cjs/notabene.cjs",
|
|
16
16
|
"module": "dist/esm/notabene.js",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@semantic-release/git": "^10.0.1",
|
|
73
73
|
"@semantic-release/gitlab": "^13.2.1",
|
|
74
74
|
"@semantic-release/npm": "^12.0.1",
|
|
75
|
+
"@taprsvp/types": "^1.14.0",
|
|
75
76
|
"@vitest/coverage-v8": "^2.1.8",
|
|
76
77
|
"eslint": "^9.14.0",
|
|
77
78
|
"eslint-config-prettier": "^9.1.0",
|
|
@@ -79,6 +80,7 @@
|
|
|
79
80
|
"fast-check": "^3.23.1",
|
|
80
81
|
"globals": "^15.11.0",
|
|
81
82
|
"husky": "^9.1.6",
|
|
83
|
+
"jose": "^6.1.0",
|
|
82
84
|
"jsdom": "^25.0.1",
|
|
83
85
|
"lint-staged": "^15.2.10",
|
|
84
86
|
"prettier": "^3.3.3",
|
|
@@ -104,9 +106,5 @@
|
|
|
104
106
|
"extends": [
|
|
105
107
|
"@commitlint/config-conventional"
|
|
106
108
|
]
|
|
107
|
-
},
|
|
108
|
-
"dependencies": {
|
|
109
|
-
"@taprsvp/types": "^1.13.0",
|
|
110
|
-
"jose": "^6.1.0"
|
|
111
109
|
}
|
|
112
110
|
}
|
package/src/types.ts
CHANGED
|
@@ -920,6 +920,7 @@ export interface TransactionOptions {
|
|
|
920
920
|
microTransfer?: {
|
|
921
921
|
destination: BlockchainAddress;
|
|
922
922
|
amountSubunits: string;
|
|
923
|
+
requireHash?: boolean; // Defaults true
|
|
923
924
|
};
|
|
924
925
|
fallbacks?: ProofTypes[]; // Legacy — replaced by agentSections.fallback
|
|
925
926
|
deminimis?: ThresholdOptions;
|
package/src/utils/arbitraries.ts
CHANGED