@arcblock/payment-service 1.29.6 → 1.29.8
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/cf.js +67 -217
- package/dist/index.d.ts +17 -0
- package/dist/index.js +394 -72
- package/package.json +3 -5
package/dist/index.d.ts
CHANGED
|
@@ -166,3 +166,20 @@ export declare function createEmbeddedIdentityServices(): {
|
|
|
166
166
|
directory(): any;
|
|
167
167
|
};
|
|
168
168
|
export declare function createEmbeddedPaymentService(slots: PaymentCoreSlots): PaymentCoreService;
|
|
169
|
+
/** The reserved mount prefix for the embedded payment service. */
|
|
170
|
+
export declare const PAYMENT_PREFIX = "/.well-known/payment";
|
|
171
|
+
/** The caller identity the host resolved (injected as `x-user-*`; no in-process login_token verify). */
|
|
172
|
+
export interface HostCallerIdentity {
|
|
173
|
+
did: string;
|
|
174
|
+
role?: string;
|
|
175
|
+
authMethod?: string;
|
|
176
|
+
displayName?: string;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Strip client-forged `x-user-*` and inject the host-resolved caller (raw role —
|
|
180
|
+
* the core strips any `blocklet-` prefix itself). See the core module for the
|
|
181
|
+
* full rationale.
|
|
182
|
+
*/
|
|
183
|
+
export declare function injectCaller(headers: Headers, caller: HostCallerIdentity | null): void;
|
|
184
|
+
/** Build a lazy per-tenant provisioner with in-flight dedup (null tenant = no-op). */
|
|
185
|
+
export declare function createTenantProvisioner(provision: (instanceDid: string) => Promise<void>): (instanceDid: string | null) => Promise<void>;
|