@arcblock/payment-service 1.29.3-beta-frontend-serve.4 → 1.29.3
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 +89 -89
- package/dist/index.d.ts +36 -0
- package/dist/index.js +329 -163
- package/package.json +4 -3
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,19 @@ export interface PaymentCoreSlots {
|
|
|
48
48
|
* (it binds blocklet-server's isProduction/blockletAppDir — G2).
|
|
49
49
|
*/
|
|
50
50
|
staticHandler?: (app: any) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Host-injected DID-Connect token store (CF: D1-backed). Omit on node hosts to
|
|
53
|
+
* keep the file-backed nedb default. Typed `any` so this package's .d.ts stays
|
|
54
|
+
* free of the internal storage type — same convention as `staticHandler`.
|
|
55
|
+
*/
|
|
56
|
+
storage?: any;
|
|
57
|
+
/**
|
|
58
|
+
* Host-injected DID-Connect runtime. The arc-node host injects
|
|
59
|
+
* `createNodeDidConnectRuntime()` (AUTH_SERVICE-backed, per-tenant signing);
|
|
60
|
+
* the CF worker injects its own; blocklet-server omits it (SDK runtime default).
|
|
61
|
+
* Typed `any` so this package's .d.ts carries no did-connect-js type dependency.
|
|
62
|
+
*/
|
|
63
|
+
didConnectRuntime?: any;
|
|
51
64
|
}
|
|
52
65
|
export interface PaymentCoreLifecycle {
|
|
53
66
|
start: () => Promise<void>;
|
|
@@ -129,4 +142,27 @@ export interface PaymentCoreService {
|
|
|
129
142
|
* sees the literal → bundles the impl into dist).
|
|
130
143
|
*/
|
|
131
144
|
export declare function createNodeStaticHandler(webRoot: string): (app: any) => void;
|
|
145
|
+
/**
|
|
146
|
+
* The AUTH_SERVICE-backed DID-Connect runtime for the arc-node embedded host —
|
|
147
|
+
* inject as the `didConnectRuntime` slot. Without it a bare host falls back to the
|
|
148
|
+
* blocklet-server SDK runtime, whose authenticator signs with the env
|
|
149
|
+
* BLOCKLET_APP_SK wallet (absent on arc → "Missing public key for SK wallet").
|
|
150
|
+
* Same dual-build `as string` cast as the other node facades.
|
|
151
|
+
*/
|
|
152
|
+
export declare function createNodeDidConnectRuntime(opts?: {
|
|
153
|
+
tokenStorage?: any;
|
|
154
|
+
timeout?: number;
|
|
155
|
+
}): any;
|
|
156
|
+
/**
|
|
157
|
+
* The embedded host identity services — the AUTH_SERVICE-backed implementations of
|
|
158
|
+
* the optional IdentityDriver methods (`getBusinessWallet`, `directory`), derived
|
|
159
|
+
* from `getInstanceAppIdentity`. A host spreads the parts it wants into its identity
|
|
160
|
+
* driver: arc-node spreads both; CF spreads `getBusinessWallet` only (it keeps its
|
|
161
|
+
* build-alias directory shim). This is the single convergence seam for "all wallets
|
|
162
|
+
* dynamic with per-mode fallback" — see wallet-authenticator-dynamic.md §0.
|
|
163
|
+
*/
|
|
164
|
+
export declare function createEmbeddedIdentityServices(): {
|
|
165
|
+
getBusinessWallet(chain: 'arcblock' | 'ethereum'): any;
|
|
166
|
+
directory(): any;
|
|
167
|
+
};
|
|
132
168
|
export declare function createEmbeddedPaymentService(slots: PaymentCoreSlots): PaymentCoreService;
|