@tinyhumansai/tinyplace 0.1.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/dist/api/a2a.d.ts +28 -0
- package/dist/api/a2a.js +21 -0
- package/dist/api/admin.d.ts +38 -0
- package/dist/api/admin.js +49 -0
- package/dist/api/broadcasts.d.ts +32 -0
- package/dist/api/broadcasts.js +51 -0
- package/dist/api/channels.d.ts +43 -0
- package/dist/api/channels.js +57 -0
- package/dist/api/directory.d.ts +15 -0
- package/dist/api/directory.js +26 -0
- package/dist/api/escrow.d.ts +47 -0
- package/dist/api/escrow.js +76 -0
- package/dist/api/events.d.ts +45 -0
- package/dist/api/events.js +77 -0
- package/dist/api/explorer.d.ts +19 -0
- package/dist/api/explorer.js +21 -0
- package/dist/api/groups.d.ts +19 -0
- package/dist/api/groups.js +32 -0
- package/dist/api/inbox.d.ts +27 -0
- package/dist/api/inbox.js +48 -0
- package/dist/api/keys.d.ts +9 -0
- package/dist/api/keys.js +14 -0
- package/dist/api/ledger.d.ts +11 -0
- package/dist/api/ledger.js +14 -0
- package/dist/api/marketplace.d.ts +53 -0
- package/dist/api/marketplace.js +81 -0
- package/dist/api/messages.d.ts +11 -0
- package/dist/api/messages.js +17 -0
- package/dist/api/moderation.d.ts +30 -0
- package/dist/api/moderation.js +32 -0
- package/dist/api/payments.d.ts +15 -0
- package/dist/api/payments.js +26 -0
- package/dist/api/pricing.d.ts +69 -0
- package/dist/api/pricing.js +60 -0
- package/dist/api/profiles.d.ts +18 -0
- package/dist/api/profiles.js +23 -0
- package/dist/api/registry.d.ts +26 -0
- package/dist/api/registry.js +87 -0
- package/dist/api/reputation.d.ts +24 -0
- package/dist/api/reputation.js +29 -0
- package/dist/api/search.d.ts +46 -0
- package/dist/api/search.js +41 -0
- package/dist/api/stats.d.ts +11 -0
- package/dist/api/stats.js +20 -0
- package/dist/auth.d.ts +16 -0
- package/dist/auth.js +36 -0
- package/dist/client.d.ts +63 -0
- package/dist/client.js +73 -0
- package/dist/crypto.d.ts +12 -0
- package/dist/crypto.js +49 -0
- package/dist/http.d.ts +30 -0
- package/dist/http.js +101 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.js +32 -0
- package/dist/local-signer.d.ts +15 -0
- package/dist/local-signer.js +51 -0
- package/dist/signal/crypto.d.ts +29 -0
- package/dist/signal/crypto.js +156 -0
- package/dist/signal/index.d.ts +11 -0
- package/dist/signal/index.js +6 -0
- package/dist/signal/keys.d.ts +14 -0
- package/dist/signal/keys.js +36 -0
- package/dist/signal/memory-store.d.ts +21 -0
- package/dist/signal/memory-store.js +50 -0
- package/dist/signal/ratchet.d.ts +12 -0
- package/dist/signal/ratchet.js +106 -0
- package/dist/signal/session.d.ts +17 -0
- package/dist/signal/session.js +117 -0
- package/dist/signal/store.d.ts +36 -0
- package/dist/signal/store.js +6 -0
- package/dist/signal/x3dh.d.ts +18 -0
- package/dist/signal/x3dh.js +86 -0
- package/dist/signer.d.ts +13 -0
- package/dist/signer.js +9 -0
- package/dist/types/broadcasts.d.ts +74 -0
- package/dist/types/broadcasts.js +1 -0
- package/dist/types/commerce.d.ts +183 -0
- package/dist/types/commerce.js +1 -0
- package/dist/types/directory.d.ts +88 -0
- package/dist/types/directory.js +1 -0
- package/dist/types/escrow.d.ts +129 -0
- package/dist/types/escrow.js +1 -0
- package/dist/types/events.d.ts +137 -0
- package/dist/types/events.js +1 -0
- package/dist/types/explorer.d.ts +133 -0
- package/dist/types/explorer.js +1 -0
- package/dist/types/groups.d.ts +56 -0
- package/dist/types/groups.js +1 -0
- package/dist/types/identity.d.ts +94 -0
- package/dist/types/identity.js +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.js +16 -0
- package/dist/types/ledger.d.ts +57 -0
- package/dist/types/ledger.js +1 -0
- package/dist/types/marketplace.d.ts +141 -0
- package/dist/types/marketplace.js +1 -0
- package/dist/types/messaging.d.ts +67 -0
- package/dist/types/messaging.js +1 -0
- package/dist/types/payments.d.ts +88 -0
- package/dist/types/payments.js +1 -0
- package/dist/types/profile.d.ts +49 -0
- package/dist/types/profile.js +1 -0
- package/dist/types/reputation.d.ts +90 -0
- package/dist/types/reputation.js +1 -0
- package/dist/types/search.d.ts +56 -0
- package/dist/types/search.js +1 -0
- package/dist/types/social.d.ts +158 -0
- package/dist/types/social.js +1 -0
- package/dist/websocket.d.ts +26 -0
- package/dist/websocket.js +83 -0
- package/package.json +30 -0
- package/src/api/a2a.ts +50 -0
- package/src/api/admin.ts +95 -0
- package/src/api/broadcasts.ts +110 -0
- package/src/api/channels.ts +110 -0
- package/src/api/directory.ts +45 -0
- package/src/api/escrow.ts +163 -0
- package/src/api/events.ts +133 -0
- package/src/api/explorer.ts +48 -0
- package/src/api/groups.ts +64 -0
- package/src/api/inbox.ts +71 -0
- package/src/api/keys.ts +18 -0
- package/src/api/ledger.ts +28 -0
- package/src/api/marketplace.ts +165 -0
- package/src/api/messages.ts +23 -0
- package/src/api/moderation.ts +71 -0
- package/src/api/payments.ts +47 -0
- package/src/api/pricing.ts +122 -0
- package/src/api/profiles.ts +43 -0
- package/src/api/registry.ts +143 -0
- package/src/api/reputation.ts +60 -0
- package/src/api/search.ts +59 -0
- package/src/api/stats.ts +32 -0
- package/src/auth.ts +75 -0
- package/src/client.ts +120 -0
- package/src/crypto.ts +74 -0
- package/src/http.ts +147 -0
- package/src/index.ts +72 -0
- package/src/local-signer.ts +78 -0
- package/src/signal/crypto.ts +229 -0
- package/src/signal/index.ts +28 -0
- package/src/signal/keys.ts +54 -0
- package/src/signal/memory-store.ts +66 -0
- package/src/signal/ratchet.ts +162 -0
- package/src/signal/session.ts +189 -0
- package/src/signal/store.ts +49 -0
- package/src/signal/x3dh.ts +130 -0
- package/src/signer.ts +21 -0
- package/src/types/broadcasts.ts +81 -0
- package/src/types/commerce.ts +206 -0
- package/src/types/directory.ts +98 -0
- package/src/types/escrow.ts +163 -0
- package/src/types/events.ts +155 -0
- package/src/types/explorer.ts +152 -0
- package/src/types/groups.ts +62 -0
- package/src/types/identity.ts +113 -0
- package/src/types/index.ts +16 -0
- package/src/types/ledger.ts +78 -0
- package/src/types/marketplace.ts +166 -0
- package/src/types/messaging.ts +77 -0
- package/src/types/payments.ts +103 -0
- package/src/types/profile.ts +55 -0
- package/src/types/reputation.ts +98 -0
- package/src/types/search.ts +61 -0
- package/src/types/social.ts +186 -0
- package/src/websocket.ts +112 -0
- package/tests/signal.test.ts +353 -0
- package/tests/staging.test.ts +650 -0
- package/tsconfig.json +15 -0
- package/vitest.config.ts +7 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import type { LedgerReference, LedgerStatus, LedgerType, LedgerVisibility } from "./ledger.js";
|
|
2
|
+
|
|
3
|
+
export interface ExplorerFeeSummary {
|
|
4
|
+
txId: string;
|
|
5
|
+
amount: string;
|
|
6
|
+
rate?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ExplorerFeeDetail {
|
|
10
|
+
txId: string;
|
|
11
|
+
amount: string;
|
|
12
|
+
amountFormatted: string;
|
|
13
|
+
rate?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface ExplorerTransactionSummary {
|
|
17
|
+
txId: string;
|
|
18
|
+
visibility: LedgerVisibility;
|
|
19
|
+
type: LedgerType;
|
|
20
|
+
from?: string | null;
|
|
21
|
+
to?: string | null;
|
|
22
|
+
amount?: string | null;
|
|
23
|
+
asset?: string | null;
|
|
24
|
+
network: string;
|
|
25
|
+
timestamp: string;
|
|
26
|
+
onChainTx: string;
|
|
27
|
+
status: LedgerStatus;
|
|
28
|
+
fee?: ExplorerFeeSummary;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface ExplorerParty {
|
|
32
|
+
username?: string;
|
|
33
|
+
cryptoId?: string;
|
|
34
|
+
reputation: number;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ExplorerRelatedTransaction {
|
|
38
|
+
txId: string;
|
|
39
|
+
type: LedgerType;
|
|
40
|
+
relationship: string;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface ExplorerTransactionDetail {
|
|
44
|
+
txId: string;
|
|
45
|
+
visibility: LedgerVisibility;
|
|
46
|
+
type: LedgerType;
|
|
47
|
+
from?: ExplorerParty | null;
|
|
48
|
+
to?: ExplorerParty | null;
|
|
49
|
+
amount?: string | null;
|
|
50
|
+
amountFormatted?: string | null;
|
|
51
|
+
asset?: string | null;
|
|
52
|
+
network: string;
|
|
53
|
+
timestamp: string;
|
|
54
|
+
onChainTx: string;
|
|
55
|
+
onChainVerified: boolean;
|
|
56
|
+
blockNumber?: number;
|
|
57
|
+
confirmations?: number;
|
|
58
|
+
status: LedgerStatus;
|
|
59
|
+
reference?: LedgerReference | null;
|
|
60
|
+
fee?: ExplorerFeeDetail;
|
|
61
|
+
relatedTransactions: Array<ExplorerRelatedTransaction>;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface ExplorerVerification {
|
|
65
|
+
txId: string;
|
|
66
|
+
onChainTx: string;
|
|
67
|
+
network: string;
|
|
68
|
+
verified: boolean;
|
|
69
|
+
blockNumber?: number;
|
|
70
|
+
blockTimestamp?: string;
|
|
71
|
+
confirmations?: number;
|
|
72
|
+
explorerUrl?: string;
|
|
73
|
+
error?: string;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export interface ExplorerVolumeCount {
|
|
77
|
+
count: number;
|
|
78
|
+
volumeUsd: string;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface ExplorerFeeCount {
|
|
82
|
+
count: number;
|
|
83
|
+
totalUsd: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface ExplorerCounterparty {
|
|
87
|
+
username: string;
|
|
88
|
+
transactionCount: number;
|
|
89
|
+
volumeUsd: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface ExplorerNetworkActivity {
|
|
93
|
+
count: number;
|
|
94
|
+
volumeUsd: string;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface ExplorerAgentSummary {
|
|
98
|
+
totalTransactions: number;
|
|
99
|
+
totalVolumeUsd: string;
|
|
100
|
+
sent: ExplorerVolumeCount;
|
|
101
|
+
received: ExplorerVolumeCount;
|
|
102
|
+
feesPaid: ExplorerFeeCount;
|
|
103
|
+
topCounterparties: Array<ExplorerCounterparty>;
|
|
104
|
+
byType: Record<string, number>;
|
|
105
|
+
byNetwork: Record<string, ExplorerNetworkActivity>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export interface ExplorerAgentResponse {
|
|
109
|
+
agent: ExplorerParty;
|
|
110
|
+
summary: ExplorerAgentSummary;
|
|
111
|
+
recentTransactions: Array<ExplorerTransactionSummary>;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export interface ExplorerLedgerOverview {
|
|
115
|
+
totalEntries: number;
|
|
116
|
+
latestTxId?: string;
|
|
117
|
+
latestTimestamp?: string;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export interface ExplorerActivityWindow {
|
|
121
|
+
transactions: number;
|
|
122
|
+
volumeUsd: string;
|
|
123
|
+
feesUsd: string;
|
|
124
|
+
uniqueAgents: number;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export interface ExplorerAllTimeOverview {
|
|
128
|
+
volumeUsd: string;
|
|
129
|
+
feesUsd: string;
|
|
130
|
+
registeredAgents: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export interface ExplorerNetworkOverview {
|
|
134
|
+
transactions: number;
|
|
135
|
+
volumeUsd: string;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export interface ExplorerOverview {
|
|
139
|
+
timestamp: string;
|
|
140
|
+
ledger: ExplorerLedgerOverview;
|
|
141
|
+
last24h: ExplorerActivityWindow;
|
|
142
|
+
allTime: ExplorerAllTimeOverview;
|
|
143
|
+
byNetwork: Record<string, ExplorerNetworkOverview>;
|
|
144
|
+
recentTransactions: Array<ExplorerTransactionSummary>;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface ExplorerTransactionListResponse {
|
|
148
|
+
transactions: Array<ExplorerTransactionSummary>;
|
|
149
|
+
total: number;
|
|
150
|
+
page: number;
|
|
151
|
+
pageSize: number;
|
|
152
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
export type GroupMembershipPolicy = "open" | "approval" | "invite-only";
|
|
2
|
+
|
|
3
|
+
export interface PaymentPrice {
|
|
4
|
+
amount: string;
|
|
5
|
+
asset: string;
|
|
6
|
+
network: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface PaymentPolicy {
|
|
10
|
+
joinFee?: PaymentPrice;
|
|
11
|
+
subscriptionPrice?: PaymentPrice;
|
|
12
|
+
subscriptionInterval?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GroupMetadata {
|
|
16
|
+
groupId: string;
|
|
17
|
+
name: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
createdBy: string;
|
|
20
|
+
createdAt: string;
|
|
21
|
+
membershipPolicy: GroupMembershipPolicy;
|
|
22
|
+
membersPublic?: boolean;
|
|
23
|
+
membershipEpoch: number;
|
|
24
|
+
memberCount: number;
|
|
25
|
+
tags?: Array<string>;
|
|
26
|
+
paymentPolicy?: PaymentPolicy;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface GroupMember {
|
|
30
|
+
groupId: string;
|
|
31
|
+
agentId: string;
|
|
32
|
+
role: string;
|
|
33
|
+
status: string;
|
|
34
|
+
joinedAt: string;
|
|
35
|
+
updatedAt: string;
|
|
36
|
+
subscriptionInterval?: string;
|
|
37
|
+
subscriptionStatus?: string;
|
|
38
|
+
currentPeriodEnd?: string;
|
|
39
|
+
subscriptionGraceEnd?: string;
|
|
40
|
+
autoRenew?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export interface GroupQueryParams {
|
|
44
|
+
q?: string;
|
|
45
|
+
tag?: string;
|
|
46
|
+
tags?: Array<string>;
|
|
47
|
+
membershipPolicy?: GroupMembershipPolicy;
|
|
48
|
+
hasPaymentPolicy?: boolean;
|
|
49
|
+
minMembers?: number;
|
|
50
|
+
maxMembers?: number;
|
|
51
|
+
limit?: number;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface GroupCreateRequest {
|
|
55
|
+
name: string;
|
|
56
|
+
description?: string;
|
|
57
|
+
membershipPolicy: GroupMembershipPolicy;
|
|
58
|
+
membersPublic?: boolean;
|
|
59
|
+
tags?: Array<string>;
|
|
60
|
+
paymentPolicy?: PaymentPolicy;
|
|
61
|
+
signature?: string;
|
|
62
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
export type IdentityStatus =
|
|
2
|
+
| "active"
|
|
3
|
+
| "expiring"
|
|
4
|
+
| "auction"
|
|
5
|
+
| "expired"
|
|
6
|
+
| "released"
|
|
7
|
+
| "deleted";
|
|
8
|
+
|
|
9
|
+
export interface PaymentMethod {
|
|
10
|
+
network: string;
|
|
11
|
+
address: string;
|
|
12
|
+
assets: Array<string>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IdentityMetadata {
|
|
16
|
+
avatar?: string;
|
|
17
|
+
links?: Array<string>;
|
|
18
|
+
tags?: Array<string>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface Identity {
|
|
22
|
+
username: string;
|
|
23
|
+
bio: string;
|
|
24
|
+
cryptoId: string;
|
|
25
|
+
publicKey: string;
|
|
26
|
+
registeredAt: string;
|
|
27
|
+
expiresAt: string;
|
|
28
|
+
status: IdentityStatus;
|
|
29
|
+
registrationTx?: string;
|
|
30
|
+
paymentMethods?: Array<PaymentMethod>;
|
|
31
|
+
metadata?: IdentityMetadata;
|
|
32
|
+
subnames?: Array<Subname>;
|
|
33
|
+
signature?: string;
|
|
34
|
+
payment?: Record<string, string>;
|
|
35
|
+
lastRenewalTx?: string;
|
|
36
|
+
updatedAt: string;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface Subname {
|
|
40
|
+
subname: string;
|
|
41
|
+
target: string;
|
|
42
|
+
bio?: string;
|
|
43
|
+
createdAt: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface IdentityProfileUpdate {
|
|
47
|
+
bio?: string;
|
|
48
|
+
metadata?: IdentityMetadata;
|
|
49
|
+
signature?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface RenewalRequest {
|
|
53
|
+
payment?: Record<string, string>;
|
|
54
|
+
signature?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface IdentityClaimRequest {
|
|
58
|
+
cryptoId: string;
|
|
59
|
+
publicKey: string;
|
|
60
|
+
payment?: Record<string, string>;
|
|
61
|
+
signature?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface SubnameCreateRequest {
|
|
65
|
+
subname: string;
|
|
66
|
+
target: string;
|
|
67
|
+
bio?: string;
|
|
68
|
+
createdAt?: string;
|
|
69
|
+
signature?: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface AvailabilityResponse {
|
|
73
|
+
available: boolean;
|
|
74
|
+
name: string;
|
|
75
|
+
identity?: Identity;
|
|
76
|
+
lifecycle?: IdentityLifecycle;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export interface IdentityExport {
|
|
80
|
+
identity: Identity;
|
|
81
|
+
ledgerTransactions: Array<import("./ledger.js").LedgerTransaction>;
|
|
82
|
+
exportedAt: string;
|
|
83
|
+
verification: Record<string, string>;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface IdentityLifecycle {
|
|
87
|
+
phase: string;
|
|
88
|
+
annualFee: string;
|
|
89
|
+
graceEndsAt?: string;
|
|
90
|
+
auctionStartsAt?: string;
|
|
91
|
+
auctionEndsAt?: string;
|
|
92
|
+
availableAt?: string;
|
|
93
|
+
currentPrice?: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ProfileVisibility {
|
|
97
|
+
activity: boolean;
|
|
98
|
+
groups: boolean;
|
|
99
|
+
broadcasts: boolean;
|
|
100
|
+
attestations: boolean;
|
|
101
|
+
agentCard: boolean;
|
|
102
|
+
searchEngineIndexing: boolean;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export interface ProfileVisibilityUpdate {
|
|
106
|
+
activity?: boolean;
|
|
107
|
+
groups?: boolean;
|
|
108
|
+
broadcasts?: boolean;
|
|
109
|
+
attestations?: boolean;
|
|
110
|
+
agentCard?: boolean;
|
|
111
|
+
searchEngineIndexing?: boolean;
|
|
112
|
+
signature?: string;
|
|
113
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./identity.js";
|
|
2
|
+
export * from "./ledger.js";
|
|
3
|
+
export * from "./messaging.js";
|
|
4
|
+
export * from "./directory.js";
|
|
5
|
+
export * from "./payments.js";
|
|
6
|
+
export * from "./reputation.js";
|
|
7
|
+
export * from "./social.js";
|
|
8
|
+
export * from "./groups.js";
|
|
9
|
+
export * from "./marketplace.js";
|
|
10
|
+
export * from "./broadcasts.js";
|
|
11
|
+
export * from "./events.js";
|
|
12
|
+
export * from "./escrow.js";
|
|
13
|
+
export * from "./commerce.js";
|
|
14
|
+
export * from "./explorer.js";
|
|
15
|
+
export * from "./search.js";
|
|
16
|
+
export * from "./profile.js";
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
export type LedgerVisibility = "unshielded" | "shielded";
|
|
2
|
+
|
|
3
|
+
export type LedgerType =
|
|
4
|
+
| "REGISTRATION"
|
|
5
|
+
| "RENEWAL"
|
|
6
|
+
| "SALE"
|
|
7
|
+
| "PAYMENT"
|
|
8
|
+
| "SUBSCRIPTION"
|
|
9
|
+
| "GROUP_FEE"
|
|
10
|
+
| "EVENT_TICKET"
|
|
11
|
+
| "EVENT_REFUND"
|
|
12
|
+
| "REVENUE_SHARE"
|
|
13
|
+
| "ESCROW_FUND"
|
|
14
|
+
| "ESCROW_RELEASE"
|
|
15
|
+
| "ESCROW_REFUND"
|
|
16
|
+
| "ARBITRATION_FEE"
|
|
17
|
+
| "FEE";
|
|
18
|
+
|
|
19
|
+
export type LedgerStatus = "PENDING" | "SETTLED" | "FAILED";
|
|
20
|
+
|
|
21
|
+
export interface LedgerReference {
|
|
22
|
+
kind: string;
|
|
23
|
+
id?: string;
|
|
24
|
+
parentTxId?: string;
|
|
25
|
+
rate?: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface LedgerTransaction {
|
|
29
|
+
txId: string;
|
|
30
|
+
visibility: LedgerVisibility;
|
|
31
|
+
type: LedgerType;
|
|
32
|
+
from?: string | null;
|
|
33
|
+
to?: string | null;
|
|
34
|
+
amount?: string | null;
|
|
35
|
+
asset?: string | null;
|
|
36
|
+
network: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
reference?: LedgerReference | null;
|
|
39
|
+
onChainTx: string;
|
|
40
|
+
status: LedgerStatus;
|
|
41
|
+
metadata?: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface LedgerListParams {
|
|
45
|
+
limit?: number;
|
|
46
|
+
offset?: number;
|
|
47
|
+
agent?: string;
|
|
48
|
+
type?: LedgerType;
|
|
49
|
+
network?: string;
|
|
50
|
+
status?: LedgerStatus;
|
|
51
|
+
from?: string;
|
|
52
|
+
to?: string;
|
|
53
|
+
after?: string;
|
|
54
|
+
before?: string;
|
|
55
|
+
asset?: string;
|
|
56
|
+
visibility?: LedgerVisibility;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface LedgerVerifyRequest {
|
|
60
|
+
onChainTx: string;
|
|
61
|
+
network: string;
|
|
62
|
+
ledgerTxId?: string;
|
|
63
|
+
from?: string;
|
|
64
|
+
to?: string;
|
|
65
|
+
amount?: string;
|
|
66
|
+
asset?: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface LedgerVerifyResult {
|
|
70
|
+
verified: boolean;
|
|
71
|
+
network: string;
|
|
72
|
+
matchesLedger: boolean;
|
|
73
|
+
blockNumber?: number;
|
|
74
|
+
blockTimestamp?: string;
|
|
75
|
+
confirmations?: number;
|
|
76
|
+
ledgerTxId?: string;
|
|
77
|
+
error?: string;
|
|
78
|
+
}
|
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
export type ProductCategory =
|
|
2
|
+
| "dataset"
|
|
3
|
+
| "model"
|
|
4
|
+
| "api-key"
|
|
5
|
+
| "report"
|
|
6
|
+
| "template"
|
|
7
|
+
| "tool"
|
|
8
|
+
| "other";
|
|
9
|
+
|
|
10
|
+
export type ProductStatus = "active" | "sold-out" | "delisted";
|
|
11
|
+
|
|
12
|
+
export type DeliveryMethod =
|
|
13
|
+
| "download"
|
|
14
|
+
| "a2a-task"
|
|
15
|
+
| "encrypted-message";
|
|
16
|
+
|
|
17
|
+
export type IdentityListingType = "fixed" | "auction";
|
|
18
|
+
|
|
19
|
+
export interface MarketplacePrice {
|
|
20
|
+
amount: string;
|
|
21
|
+
asset: string;
|
|
22
|
+
network: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface Product {
|
|
26
|
+
productId: string;
|
|
27
|
+
seller: string;
|
|
28
|
+
sellerCryptoId: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
category: ProductCategory;
|
|
32
|
+
tags?: Array<string>;
|
|
33
|
+
price: MarketplacePrice;
|
|
34
|
+
deliveryMethod: DeliveryMethod;
|
|
35
|
+
deliveryDetails?: Record<string, unknown>;
|
|
36
|
+
status: ProductStatus;
|
|
37
|
+
stock?: number | null;
|
|
38
|
+
createdAt: string;
|
|
39
|
+
updatedAt: string;
|
|
40
|
+
salesCount: number;
|
|
41
|
+
rating: number;
|
|
42
|
+
signature?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface ProductCreateRequest {
|
|
46
|
+
name: string;
|
|
47
|
+
description: string;
|
|
48
|
+
category: ProductCategory;
|
|
49
|
+
tags?: Array<string>;
|
|
50
|
+
price: MarketplacePrice;
|
|
51
|
+
deliveryMethod: DeliveryMethod;
|
|
52
|
+
deliveryDetails?: Record<string, unknown>;
|
|
53
|
+
stock?: number;
|
|
54
|
+
signature?: string;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ProductQueryParams {
|
|
58
|
+
q?: string;
|
|
59
|
+
category?: string;
|
|
60
|
+
tags?: Array<string>;
|
|
61
|
+
seller?: string;
|
|
62
|
+
minPrice?: string;
|
|
63
|
+
maxPrice?: string;
|
|
64
|
+
sortBy?: string;
|
|
65
|
+
limit?: number;
|
|
66
|
+
offset?: number;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface ProductPurchase {
|
|
70
|
+
purchaseId: string;
|
|
71
|
+
productId: string;
|
|
72
|
+
buyer: string;
|
|
73
|
+
buyerCryptoId?: string;
|
|
74
|
+
seller: string;
|
|
75
|
+
price: MarketplacePrice;
|
|
76
|
+
payment?: Record<string, string>;
|
|
77
|
+
ledgerTxId?: string;
|
|
78
|
+
delivery?: Record<string, unknown>;
|
|
79
|
+
createdAt: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export interface ProductReview {
|
|
83
|
+
reviewId: string;
|
|
84
|
+
productId: string;
|
|
85
|
+
buyer: string;
|
|
86
|
+
rating: number;
|
|
87
|
+
comment?: string;
|
|
88
|
+
createdAt: string;
|
|
89
|
+
signature?: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface IdentityListing {
|
|
93
|
+
listingId: string;
|
|
94
|
+
type: string;
|
|
95
|
+
name: string;
|
|
96
|
+
seller: string;
|
|
97
|
+
sellerCryptoId: string;
|
|
98
|
+
description?: string;
|
|
99
|
+
category: string;
|
|
100
|
+
tags?: Array<string>;
|
|
101
|
+
price: MarketplacePrice;
|
|
102
|
+
listingType: IdentityListingType;
|
|
103
|
+
status: string;
|
|
104
|
+
createdAt: string;
|
|
105
|
+
updatedAt: string;
|
|
106
|
+
expiresAt?: string;
|
|
107
|
+
reservePrice?: MarketplacePrice;
|
|
108
|
+
highestBid?: IdentityBid;
|
|
109
|
+
winningBidId?: string;
|
|
110
|
+
paymentDueAt?: string;
|
|
111
|
+
settlementStatus?: string;
|
|
112
|
+
signature?: string;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface IdentityBid {
|
|
116
|
+
bidId: string;
|
|
117
|
+
listingId: string;
|
|
118
|
+
bidder: string;
|
|
119
|
+
bidderCryptoId?: string;
|
|
120
|
+
bidderPublicKey?: string;
|
|
121
|
+
price: MarketplacePrice;
|
|
122
|
+
payment?: Record<string, string>;
|
|
123
|
+
status: string;
|
|
124
|
+
createdAt: string;
|
|
125
|
+
signature?: string;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export interface IdentityOffer {
|
|
129
|
+
offerId: string;
|
|
130
|
+
listingId?: string;
|
|
131
|
+
name: string;
|
|
132
|
+
buyer: string;
|
|
133
|
+
buyerCryptoId?: string;
|
|
134
|
+
buyerPublicKey?: string;
|
|
135
|
+
price: MarketplacePrice;
|
|
136
|
+
payment?: Record<string, string>;
|
|
137
|
+
expiresAt?: string;
|
|
138
|
+
status: string;
|
|
139
|
+
createdAt: string;
|
|
140
|
+
updatedAt: string;
|
|
141
|
+
signature?: string;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface IdentitySale {
|
|
145
|
+
saleId: string;
|
|
146
|
+
listingId?: string;
|
|
147
|
+
offerId?: string;
|
|
148
|
+
name: string;
|
|
149
|
+
seller: string;
|
|
150
|
+
buyer: string;
|
|
151
|
+
buyerCryptoId?: string;
|
|
152
|
+
buyerPublicKey?: string;
|
|
153
|
+
price: MarketplacePrice;
|
|
154
|
+
ledgerTxId?: string;
|
|
155
|
+
createdAt: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
export interface MarketplaceCategory {
|
|
159
|
+
category: string;
|
|
160
|
+
count: number;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
export interface IdentityFloor {
|
|
164
|
+
length: number;
|
|
165
|
+
price?: MarketplacePrice;
|
|
166
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export type EnvelopeType = "CIPHERTEXT" | "PREKEY_BUNDLE";
|
|
2
|
+
|
|
3
|
+
export type ContentHint = "DEFAULT" | "RESENDABLE" | "IMPLICIT";
|
|
4
|
+
|
|
5
|
+
export interface SignalMetadata {
|
|
6
|
+
ephemeralKey?: string;
|
|
7
|
+
signedPreKeyId?: string;
|
|
8
|
+
oneTimePreKeyId?: string;
|
|
9
|
+
ratchetKey?: string;
|
|
10
|
+
messageNumber?: number;
|
|
11
|
+
previousChainLength?: number;
|
|
12
|
+
senderKeyId?: string;
|
|
13
|
+
senderKeyIteration?: number;
|
|
14
|
+
rotationRequired?: boolean;
|
|
15
|
+
rotationId?: string;
|
|
16
|
+
rotationEpoch?: number;
|
|
17
|
+
removedAgentId?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface MessageEnvelope {
|
|
21
|
+
id: string;
|
|
22
|
+
from: string;
|
|
23
|
+
to: string;
|
|
24
|
+
timestamp: string;
|
|
25
|
+
deviceId: number;
|
|
26
|
+
type: EnvelopeType;
|
|
27
|
+
body: string;
|
|
28
|
+
contentHint?: ContentHint;
|
|
29
|
+
signal?: SignalMetadata;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface MessageStats {
|
|
33
|
+
agentId: string;
|
|
34
|
+
messagesSent: number;
|
|
35
|
+
uniqueRecipients: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface MessageDeliveryReceipt {
|
|
39
|
+
messageId: string;
|
|
40
|
+
from: string;
|
|
41
|
+
to: string;
|
|
42
|
+
acknowledgedBy: string;
|
|
43
|
+
acknowledgedAt: string;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface SignedKey {
|
|
47
|
+
keyId: string;
|
|
48
|
+
publicKey: string;
|
|
49
|
+
signature?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface KeyBundle {
|
|
53
|
+
agentId: string;
|
|
54
|
+
identityKey: string;
|
|
55
|
+
signedPreKey: SignedKey;
|
|
56
|
+
oneTimePreKey?: SignedKey;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface KeyHealth {
|
|
61
|
+
agentId: string;
|
|
62
|
+
oneTimePreKeyCount: number;
|
|
63
|
+
lowOneTimePreKeys: boolean;
|
|
64
|
+
signedPreKeyKeyId?: string;
|
|
65
|
+
signedPreKeyUpdatedAt?: string;
|
|
66
|
+
updatedAt: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface PreKeysRequest {
|
|
70
|
+
identityKey?: string;
|
|
71
|
+
preKeys: Array<SignedKey>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface SignedPreKeyRequest {
|
|
75
|
+
identityKey?: string;
|
|
76
|
+
signedPreKey: SignedKey;
|
|
77
|
+
}
|