@stacknet/keyutils 0.1.12 → 0.1.18

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.
@@ -1,5 +1,6 @@
1
1
  interface NodeKeyInfo {
2
2
  id: string;
3
+ keyIndex?: number | null;
3
4
  key: string;
4
5
  userId: string;
5
6
  status: 'active' | 'inactive' | 'expired' | 'closed' | 'listed';
@@ -45,6 +46,7 @@ type PaymentMethod = 'solana' | 'stripe';
45
46
  interface KeyListing {
46
47
  id: string;
47
48
  keyId: string;
49
+ keyIndex?: number | null;
48
50
  sellerId: string;
49
51
  askPriceCents: number;
50
52
  currency: string;
@@ -63,6 +65,12 @@ interface ListingResult {
63
65
  currency: string;
64
66
  status: string;
65
67
  }
68
+ interface DirectTransferResult {
69
+ keyId: string;
70
+ fromUserId: string;
71
+ toUserId: string;
72
+ transferredAt: number;
73
+ }
66
74
  type Platform = 'ios' | 'android' | 'windows' | 'mac' | 'linux';
67
75
  interface PlatformDownload {
68
76
  platform: Platform;
@@ -70,13 +78,15 @@ interface PlatformDownload {
70
78
  url: string;
71
79
  compatible: boolean;
72
80
  }
73
- type KeyWidgetTab = 'buy' | 'use' | 'sell';
81
+ type KeyWidgetTab = 'buy' | 'use' | 'sell' | 'transfer';
74
82
  interface KeyUtilsConfig {
75
83
  apiBaseUrl: string;
76
84
  stackId?: string;
77
85
  stackName?: string;
78
86
  paymentMethods?: PaymentMethod[];
79
87
  merchantWallet?: string;
88
+ protocolTreasuryWallet?: string;
89
+ protocolFeeBps?: number;
80
90
  stripePublicKey?: string;
81
91
  theme?: 'light' | 'dark' | 'system';
82
92
  maxQuantity?: number;
@@ -92,6 +102,7 @@ interface KeyUtilsCallbacks {
92
102
  onPaymentStart?: (method: PaymentMethod) => void;
93
103
  onPaymentComplete?: (method: PaymentMethod, transactionId: string) => void;
94
104
  onListingCreated?: (listing: ListingResult) => void;
105
+ onTransferComplete?: (result: DirectTransferResult) => void;
95
106
  }
96
107
 
97
- export type { KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, Platform, PlatformDownload, PricingInfo };
108
+ export type { DirectTransferResult, KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, Platform, PlatformDownload, PricingInfo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacknet/keyutils",
3
- "version": "0.1.12",
3
+ "version": "0.1.18",
4
4
  "description": "Reusable components for buying and managing StackNet node keys",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",