@antseed/node 0.2.119 → 0.2.120
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.
|
@@ -6,13 +6,13 @@ import type { PeerInfo } from '../types/peer.js';
|
|
|
6
6
|
*
|
|
7
7
|
* Each part is a 0-1 value times its weight from `TRUST_WEIGHTS`:
|
|
8
8
|
*
|
|
9
|
-
* - history (
|
|
9
|
+
* - history (50): settled service history from `AntseedChannels`, combining
|
|
10
10
|
* channel count and USDC volume on bounded log curves.
|
|
11
|
-
* - usage (
|
|
11
|
+
* - usage (20): the seller pool's share of all pools' recognized-usage points
|
|
12
12
|
* in the last complete weekly epoch (`AntseedUsageAccounting`).
|
|
13
13
|
* Points only accrue for sellers with a pool and already pass
|
|
14
14
|
* the on-chain points policies.
|
|
15
|
-
* - power (
|
|
15
|
+
* - power (10): the pool's share of all pools' lock-weighted staking power in
|
|
16
16
|
* the current epoch (`AntseedSellerPools`): what a buyer's spend
|
|
17
17
|
* with this seller earns this week.
|
|
18
18
|
* - identity (20): public history of a verified identity (GitHub portfolio or
|
|
@@ -28,9 +28,9 @@ import type { PeerInfo } from '../types/peer.js';
|
|
|
28
28
|
*/
|
|
29
29
|
/** Maximum contribution of each part; the weights sum to 100. */
|
|
30
30
|
export declare const TRUST_WEIGHTS: {
|
|
31
|
-
readonly history:
|
|
32
|
-
readonly usage:
|
|
33
|
-
readonly power:
|
|
31
|
+
readonly history: 50;
|
|
32
|
+
readonly usage: 20;
|
|
33
|
+
readonly power: 10;
|
|
34
34
|
readonly identity: 20;
|
|
35
35
|
};
|
|
36
36
|
/** Settled sessions needed to saturate the channel-count half of service history. */
|
|
@@ -42,19 +42,19 @@ export declare const SHARE_CURVE_RANGE = 1000;
|
|
|
42
42
|
export interface TrustBreakdown {
|
|
43
43
|
/** Final trust score, 0-100. */
|
|
44
44
|
score: number;
|
|
45
|
-
/** Settled service history, weighted 0-
|
|
45
|
+
/** Settled service history, weighted 0-50; `null` when channel stats are unavailable. */
|
|
46
46
|
history: {
|
|
47
47
|
score: number;
|
|
48
48
|
channelCount: number;
|
|
49
49
|
totalVolumeUsdcMicros: number;
|
|
50
50
|
} | null;
|
|
51
|
-
/** Last epoch's usage-points share, weighted 0-
|
|
51
|
+
/** Last epoch's usage-points share, weighted 0-20; `null` when usage accounting data is unavailable. */
|
|
52
52
|
usage: {
|
|
53
53
|
score: number;
|
|
54
54
|
shareBps: number;
|
|
55
55
|
epoch: number;
|
|
56
56
|
} | null;
|
|
57
|
-
/** Current epoch's staking-power share, weighted 0-
|
|
57
|
+
/** Current epoch's staking-power share, weighted 0-10; `null` when pool data is unavailable. */
|
|
58
58
|
power: {
|
|
59
59
|
score: number;
|
|
60
60
|
shareBps: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-score.d.ts","sourceRoot":"","sources":["../../src/reputation/trust-score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iEAAiE;AACjE,eAAO,MAAM,aAAa;;;;;
|
|
1
|
+
{"version":3,"file":"trust-score.d.ts","sourceRoot":"","sources":["../../src/reputation/trust-score.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iEAAiE;AACjE,eAAO,MAAM,aAAa;;;;;CAA+D,CAAC;AAE1F,qFAAqF;AACrF,eAAO,MAAM,4BAA4B,MAAM,CAAC;AAEhD,4EAA4E;AAC5E,eAAO,MAAM,uCAAuC,YAAc,CAAC;AAEnE,mFAAmF;AACnF,eAAO,MAAM,iBAAiB,OAAQ,CAAC;AAEvC,MAAM,WAAW,cAAc;IAC7B,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,yFAAyF;IACzF,OAAO,EAAE;QA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|
9
|
+
* - history (50): settled service history from `AntseedChannels`, combining
|
|
10
10
|
* channel count and USDC volume on bounded log curves.
|
|
11
|
-
* - usage (
|
|
11
|
+
* - usage (20): the seller pool's share of all pools' recognized-usage points
|
|
12
12
|
* in the last complete weekly epoch (`AntseedUsageAccounting`).
|
|
13
13
|
* Points only accrue for sellers with a pool and already pass
|
|
14
14
|
* the on-chain points policies.
|
|
15
|
-
* - power (
|
|
15
|
+
* - power (10): the pool's share of all pools' lock-weighted staking power in
|
|
16
16
|
* the current epoch (`AntseedSellerPools`): what a buyer's spend
|
|
17
17
|
* with this seller earns this week.
|
|
18
18
|
* - identity (20): public history of a verified identity (GitHub portfolio or
|
|
@@ -27,7 +27,7 @@ import { IDENTITY_GITHUB_MAX_POINTS as IDENTITY_MAX_POINTS, scoreIdentityHistory
|
|
|
27
27
|
* allow/block lists stay separate router rules.
|
|
28
28
|
*/
|
|
29
29
|
/** Maximum contribution of each part; the weights sum to 100. */
|
|
30
|
-
export const TRUST_WEIGHTS = { history:
|
|
30
|
+
export const TRUST_WEIGHTS = { history: 50, usage: 20, power: 10, identity: 20 };
|
|
31
31
|
/** Settled sessions needed to saturate the channel-count half of service history. */
|
|
32
32
|
export const TRUST_HISTORY_CHANNEL_TARGET = 100;
|
|
33
33
|
/** Settled volume needed to saturate the volume half of service history. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trust-score.js","sourceRoot":"","sources":["../../src/reputation/trust-score.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,IAAI,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAEhH;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,iEAAiE;AACjE,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"trust-score.js","sourceRoot":"","sources":["../../src/reputation/trust-score.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OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AACjE,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,UAAU,CAAC,IAAc,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE;IAC3D,OAAO,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC;AACvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@antseed/node",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.120",
|
|
4
4
|
"description": "Antseed Network protocol SDK — P2P inference marketplace",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -70,8 +70,8 @@
|
|
|
70
70
|
"node-datachannel": "^0.7.0",
|
|
71
71
|
"tokenx": "^1.3.0",
|
|
72
72
|
"@antseed/api-adapter": "0.1.47",
|
|
73
|
-
"@antseed/
|
|
74
|
-
"@antseed/
|
|
73
|
+
"@antseed/buyer-core": "0.1.10",
|
|
74
|
+
"@antseed/protocol": "0.1.4"
|
|
75
75
|
},
|
|
76
76
|
"optionalDependencies": {
|
|
77
77
|
"keytar": "^7.9.0"
|