@stacknet/keyutils 0.5.0 → 0.6.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.
@@ -94,10 +94,19 @@ type EligibleKey = NodeKeyInfo & {
94
94
  };
95
95
  type PayoutAccountMethod = 'stripe' | 'solana';
96
96
  /**
97
- * The user's saved payout account. One method per user, by design — switching
98
- * methods replaces the previous record. Stripe Connect uses Express accounts
99
- * driven by the stack's platform credentials; Solana uses a wallet address
100
- * the user proved control of by signing a server-issued nonce.
97
+ * The user's saved payout config in the context of one stack.
98
+ *
99
+ * Stripe Connect is per-(user, stack) each stack runs its own platform
100
+ * under its own secret, so a given user has independent connected accounts
101
+ * across stacks. The `stripe` field reflects the connection for the SCOPE
102
+ * stack only; query other stacks via `useUserStripeStacks()` or by passing
103
+ * a different `stackId` to `usePayoutAccount`.
104
+ *
105
+ * The Solana wallet is global (one verified address services every stack).
106
+ *
107
+ * `method` records the user's preferred rail. The active filing flow
108
+ * verifies the chosen rail is configured for the key's originating stack
109
+ * and falls back to a clear error if not.
101
110
  */
102
111
  interface PayoutAccount {
103
112
  /** Which method is currently configured. `null` when nothing is set up. */
@@ -123,6 +132,19 @@ interface PayoutAccount {
123
132
  verifiedAt: string;
124
133
  };
125
134
  }
135
+ /**
136
+ * One stack the user has a Stripe Connect account on. Returned by
137
+ * `useUserStripeStacks()` for the multi-stack settings view.
138
+ */
139
+ interface StripeStackPayout {
140
+ stackId: string;
141
+ accountIdMasked: string;
142
+ chargesEnabled: boolean;
143
+ payoutsEnabled: boolean;
144
+ detailsSubmitted: boolean;
145
+ pendingOnboardingUrl?: string | null;
146
+ updatedAt: string;
147
+ }
126
148
  interface CryptoNonceResponse {
127
149
  nonce: string;
128
150
  /** Canonical message the wallet must sign — includes the nonce. */
@@ -224,4 +246,4 @@ interface KeyUtilsCallbacks {
224
246
  onFilingError?: (error: Error) => void;
225
247
  }
226
248
 
227
- export type { CryptoNonceResponse, DirectTransferResult, EligibleKey, FilingDetail, FilingHistoryEntry, FilingResult, FilingStatus, FilingTrackerState, FilingTrackerStatus, FilingTrackerStep, KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, PayoutAccount, PayoutAccountMethod, PayoutMethod, Platform, PlatformDownload, PricingInfo, StackPayoutCapabilities, StripeConnectStartResponse };
249
+ export type { CryptoNonceResponse, DirectTransferResult, EligibleKey, FilingDetail, FilingHistoryEntry, FilingResult, FilingStatus, FilingTrackerState, FilingTrackerStatus, FilingTrackerStep, KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, PayoutAccount, PayoutAccountMethod, PayoutMethod, Platform, PlatformDownload, PricingInfo, StackPayoutCapabilities, StripeConnectStartResponse, StripeStackPayout };
@@ -94,10 +94,19 @@ type EligibleKey = NodeKeyInfo & {
94
94
  };
95
95
  type PayoutAccountMethod = 'stripe' | 'solana';
96
96
  /**
97
- * The user's saved payout account. One method per user, by design — switching
98
- * methods replaces the previous record. Stripe Connect uses Express accounts
99
- * driven by the stack's platform credentials; Solana uses a wallet address
100
- * the user proved control of by signing a server-issued nonce.
97
+ * The user's saved payout config in the context of one stack.
98
+ *
99
+ * Stripe Connect is per-(user, stack) each stack runs its own platform
100
+ * under its own secret, so a given user has independent connected accounts
101
+ * across stacks. The `stripe` field reflects the connection for the SCOPE
102
+ * stack only; query other stacks via `useUserStripeStacks()` or by passing
103
+ * a different `stackId` to `usePayoutAccount`.
104
+ *
105
+ * The Solana wallet is global (one verified address services every stack).
106
+ *
107
+ * `method` records the user's preferred rail. The active filing flow
108
+ * verifies the chosen rail is configured for the key's originating stack
109
+ * and falls back to a clear error if not.
101
110
  */
102
111
  interface PayoutAccount {
103
112
  /** Which method is currently configured. `null` when nothing is set up. */
@@ -123,6 +132,19 @@ interface PayoutAccount {
123
132
  verifiedAt: string;
124
133
  };
125
134
  }
135
+ /**
136
+ * One stack the user has a Stripe Connect account on. Returned by
137
+ * `useUserStripeStacks()` for the multi-stack settings view.
138
+ */
139
+ interface StripeStackPayout {
140
+ stackId: string;
141
+ accountIdMasked: string;
142
+ chargesEnabled: boolean;
143
+ payoutsEnabled: boolean;
144
+ detailsSubmitted: boolean;
145
+ pendingOnboardingUrl?: string | null;
146
+ updatedAt: string;
147
+ }
126
148
  interface CryptoNonceResponse {
127
149
  nonce: string;
128
150
  /** Canonical message the wallet must sign — includes the nonce. */
@@ -224,4 +246,4 @@ interface KeyUtilsCallbacks {
224
246
  onFilingError?: (error: Error) => void;
225
247
  }
226
248
 
227
- export type { CryptoNonceResponse, DirectTransferResult, EligibleKey, FilingDetail, FilingHistoryEntry, FilingResult, FilingStatus, FilingTrackerState, FilingTrackerStatus, FilingTrackerStep, KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, PayoutAccount, PayoutAccountMethod, PayoutMethod, Platform, PlatformDownload, PricingInfo, StackPayoutCapabilities, StripeConnectStartResponse };
249
+ export type { CryptoNonceResponse, DirectTransferResult, EligibleKey, FilingDetail, FilingHistoryEntry, FilingResult, FilingStatus, FilingTrackerState, FilingTrackerStatus, FilingTrackerStep, KeyListing, KeyUtilsCallbacks, KeyUtilsConfig, KeyWidgetTab, LedgerEntry, ListingResult, MintResult, NodeKeyInfo, PaymentMethod, PayoutAccount, PayoutAccountMethod, PayoutMethod, Platform, PlatformDownload, PricingInfo, StackPayoutCapabilities, StripeConnectStartResponse, StripeStackPayout };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stacknet/keyutils",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Reusable components for buying and managing StackNet node keys",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",