@moonpay/platform-sdk-core 1.17.0 → 1.18.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.
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -1
- package/dist/index.d.ts +28 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -265,6 +265,7 @@ async function simulateBankTransfer(ctx, id, params) {
|
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
// src/client.ts
|
|
268
|
+
var import_result4 = require("@moonpay/platform-protocol/result");
|
|
268
269
|
function createClientCore(options) {
|
|
269
270
|
const ctx = createClientContext({
|
|
270
271
|
apiBaseUrl: options.apiBaseUrl
|
|
@@ -277,6 +278,10 @@ function createClientCore(options) {
|
|
|
277
278
|
return options.frameBaseUrl;
|
|
278
279
|
},
|
|
279
280
|
createTransport: options.createTransport,
|
|
281
|
+
getCredentials: () => ctx.accessToken ? (0, import_result4.ok)({ accessToken: ctx.accessToken, clientToken: ctx.clientToken }) : (0, import_result4.err)({
|
|
282
|
+
code: "noActiveSession",
|
|
283
|
+
message: "No active session. Connect a customer (getConnection / connect / setupAuth) before requesting credentials."
|
|
284
|
+
}),
|
|
280
285
|
getQuote: (params) => getQuote(ctx, params),
|
|
281
286
|
getAssets: (params) => getAssets(ctx, params),
|
|
282
287
|
getPaymentMethods: () => getPaymentMethods(ctx),
|