@tinyhumansai/tinyplace 0.1.0 → 0.1.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.
Files changed (60) hide show
  1. package/package.json +2 -1
  2. package/src/api/a2a.ts +0 -50
  3. package/src/api/admin.ts +0 -95
  4. package/src/api/broadcasts.ts +0 -110
  5. package/src/api/channels.ts +0 -110
  6. package/src/api/directory.ts +0 -45
  7. package/src/api/escrow.ts +0 -163
  8. package/src/api/events.ts +0 -133
  9. package/src/api/explorer.ts +0 -48
  10. package/src/api/groups.ts +0 -64
  11. package/src/api/inbox.ts +0 -71
  12. package/src/api/keys.ts +0 -18
  13. package/src/api/ledger.ts +0 -28
  14. package/src/api/marketplace.ts +0 -165
  15. package/src/api/messages.ts +0 -23
  16. package/src/api/moderation.ts +0 -71
  17. package/src/api/payments.ts +0 -47
  18. package/src/api/pricing.ts +0 -122
  19. package/src/api/profiles.ts +0 -43
  20. package/src/api/registry.ts +0 -143
  21. package/src/api/reputation.ts +0 -60
  22. package/src/api/search.ts +0 -59
  23. package/src/api/stats.ts +0 -32
  24. package/src/auth.ts +0 -75
  25. package/src/client.ts +0 -120
  26. package/src/crypto.ts +0 -74
  27. package/src/http.ts +0 -147
  28. package/src/index.ts +0 -72
  29. package/src/local-signer.ts +0 -78
  30. package/src/signal/crypto.ts +0 -229
  31. package/src/signal/index.ts +0 -28
  32. package/src/signal/keys.ts +0 -54
  33. package/src/signal/memory-store.ts +0 -66
  34. package/src/signal/ratchet.ts +0 -162
  35. package/src/signal/session.ts +0 -189
  36. package/src/signal/store.ts +0 -49
  37. package/src/signal/x3dh.ts +0 -130
  38. package/src/signer.ts +0 -21
  39. package/src/types/broadcasts.ts +0 -81
  40. package/src/types/commerce.ts +0 -206
  41. package/src/types/directory.ts +0 -98
  42. package/src/types/escrow.ts +0 -163
  43. package/src/types/events.ts +0 -155
  44. package/src/types/explorer.ts +0 -152
  45. package/src/types/groups.ts +0 -62
  46. package/src/types/identity.ts +0 -113
  47. package/src/types/index.ts +0 -16
  48. package/src/types/ledger.ts +0 -78
  49. package/src/types/marketplace.ts +0 -166
  50. package/src/types/messaging.ts +0 -77
  51. package/src/types/payments.ts +0 -103
  52. package/src/types/profile.ts +0 -55
  53. package/src/types/reputation.ts +0 -98
  54. package/src/types/search.ts +0 -61
  55. package/src/types/social.ts +0 -186
  56. package/src/websocket.ts +0 -112
  57. package/tests/signal.test.ts +0 -353
  58. package/tests/staging.test.ts +0 -650
  59. package/tsconfig.json +0 -15
  60. package/vitest.config.ts +0 -7
@@ -1,152 +0,0 @@
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
- }
@@ -1,62 +0,0 @@
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
- }
@@ -1,113 +0,0 @@
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
- }
@@ -1,16 +0,0 @@
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";
@@ -1,78 +0,0 @@
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
- }
@@ -1,166 +0,0 @@
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
- }
@@ -1,77 +0,0 @@
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
- }