@funkit/api-base 1.12.1 → 1.12.3-next.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @funkit/api-base
2
2
 
3
+ ## 1.12.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 0f8dfa7: Add Kalshi customer API key and integration support
8
+ - bd1addb: feat: ventuals support
9
+
10
+ ## 1.12.2
11
+
12
+ ### Patch Changes
13
+
14
+ - 910178d: remove mesh apiendpoint
15
+ - Updated dependencies [1796835]
16
+ - @funkit/utils@1.1.10
17
+
3
18
  ## 1.12.1
4
19
 
5
20
  ### Patch Changes
package/dist/index.js CHANGED
@@ -50,6 +50,8 @@ var CAMBRIA_API_KEY = "BPVeP8zThG467vVIYzuiu5aVWAkS9KiR6tT1TdTP";
50
50
  var HYPERDASH_API_KEY = "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
51
51
  var MONKEY_TILT_API_KEY = "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX";
52
52
  var BASED_API_KEY = "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e";
53
+ var KALSHI_API_KEY = "KEd0ZxJc4n1QBER8yBcKH8wWwfgjjdjO42riuq86";
54
+ var VENTUALS_API_KEY = "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2";
53
55
 
54
56
  // src/utils/checkout.ts
55
57
  import { toHex } from "viem";
@@ -1361,219 +1363,6 @@ var MELD_PROVIDER_CATEGORIES = [
1361
1363
  "FIAT_PAYMENTS"
1362
1364
  ];
1363
1365
 
1364
- // src/services/mesh/endpoints.ts
1365
- async function meshGetCryptocurrencyHoldings({
1366
- authToken,
1367
- type,
1368
- ...options
1369
- }) {
1370
- return sendPostRequest({
1371
- uri: `${API_BASE_URL}/mesh/holdings/get`,
1372
- body: { authToken, type },
1373
- ...options
1374
- });
1375
- }
1376
- async function meshGetCryptocurrencyHoldingsProxy({
1377
- brokerType,
1378
- deviceId,
1379
- ...options
1380
- }) {
1381
- return sendPostRequest({
1382
- uri: `${MESH_API_BASE_URL}/mesh/holdings/get`,
1383
- body: { brokerType, deviceId },
1384
- ...options
1385
- });
1386
- }
1387
- async function meshGetTransferIntegrations(options) {
1388
- return sendGetRequest({
1389
- uri: `${API_BASE_URL}/mesh/transfers/managed/integrations`,
1390
- ...options
1391
- });
1392
- }
1393
- async function meshGetLinkToken({
1394
- userId,
1395
- integrationId,
1396
- restrictMultipleAccounts,
1397
- transferOptions,
1398
- ...options
1399
- }) {
1400
- const body = {
1401
- userId,
1402
- ...integrationId && { integrationId },
1403
- ...restrictMultipleAccounts && { restrictMultipleAccounts },
1404
- ...transferOptions && { transferOptions }
1405
- };
1406
- return sendPostRequest({
1407
- uri: `${API_BASE_URL}/mesh/linktoken`,
1408
- body,
1409
- ...options
1410
- });
1411
- }
1412
- async function meshConfigureTransfer({
1413
- params,
1414
- ...options
1415
- }) {
1416
- return sendPostRequest({
1417
- uri: `${API_BASE_URL}/mesh/transfers/managed/configure`,
1418
- body: params,
1419
- retryOptions: { maxAttempts: 1 },
1420
- ...options
1421
- });
1422
- }
1423
- async function meshConfigureTransferProxy({
1424
- params,
1425
- ...options
1426
- }) {
1427
- return sendPostRequest({
1428
- uri: `${MESH_API_BASE_URL}/mesh/transfers/managed/configure`,
1429
- body: params,
1430
- retryOptions: { maxAttempts: 1 },
1431
- ...options
1432
- });
1433
- }
1434
- async function meshPreviewTransfer({
1435
- fromAuthToken,
1436
- fromType,
1437
- toAuthToken,
1438
- toType,
1439
- networkId,
1440
- symbol,
1441
- toAddress,
1442
- amount,
1443
- amountInFiat,
1444
- fiatCurrency,
1445
- ...options
1446
- }) {
1447
- const body = {
1448
- fromAuthToken,
1449
- fromType,
1450
- ...toAuthToken && { toAuthToken },
1451
- ...toType && { toType },
1452
- ...networkId && { networkId },
1453
- ...symbol && { symbol },
1454
- ...toAddress && { toAddress },
1455
- ...amount && { amount },
1456
- ...amountInFiat && { amountInFiat },
1457
- ...fiatCurrency && { fiatCurrency }
1458
- };
1459
- return sendPostRequest({
1460
- uri: `${API_BASE_URL}/mesh/transfers/managed/preview`,
1461
- body,
1462
- retryOptions: { maxAttempts: 1 },
1463
- ...options
1464
- });
1465
- }
1466
- async function meshPreviewTransferProxy({
1467
- apiKey,
1468
- logger,
1469
- signal,
1470
- ...props
1471
- }) {
1472
- const body = { ...props };
1473
- return sendPostRequest({
1474
- uri: `${MESH_API_BASE_URL}/mesh/transfers/managed/preview`,
1475
- body,
1476
- apiKey,
1477
- logger,
1478
- retryOptions: { maxAttempts: 1 },
1479
- signal
1480
- });
1481
- }
1482
- async function meshExecuteTransfer({
1483
- fromAuthToken,
1484
- fromType,
1485
- previewId,
1486
- mfaCode,
1487
- ...options
1488
- }) {
1489
- const body = {
1490
- fromAuthToken,
1491
- fromType,
1492
- previewId,
1493
- ...mfaCode && { mfaCode }
1494
- };
1495
- return sendPostRequest({
1496
- uri: `${API_BASE_URL}/mesh/transfers/managed/execute`,
1497
- body,
1498
- ...options
1499
- });
1500
- }
1501
- async function meshExecuteTransferProxy({
1502
- apiKey,
1503
- logger,
1504
- signal,
1505
- ...props
1506
- }) {
1507
- const body = { ...props };
1508
- return sendPostRequest({
1509
- uri: `${MESH_API_BASE_URL}/mesh/transfers/managed/execute`,
1510
- body,
1511
- apiKey,
1512
- logger,
1513
- signal
1514
- });
1515
- }
1516
- async function saveTokensToMeshProxy({
1517
- apiKey,
1518
- logger,
1519
- signal,
1520
- ...props
1521
- }) {
1522
- const body = { ...props };
1523
- return sendPostRequest({
1524
- uri: `${MESH_API_BASE_URL}/api/tokens`,
1525
- body,
1526
- apiKey,
1527
- logger,
1528
- signal
1529
- });
1530
- }
1531
- async function removeTokensFromMeshProxy({
1532
- deviceId,
1533
- brokerType,
1534
- ...options
1535
- }) {
1536
- return await sendDeleteRequest({
1537
- uri: `${MESH_API_BASE_URL}/api/tokens?deviceId=${deviceId}&brokerType=${brokerType}`,
1538
- ...options
1539
- });
1540
- }
1541
-
1542
- // src/services/mesh/types.ts
1543
- var MeshExecuteTransferStatus = /* @__PURE__ */ ((MeshExecuteTransferStatus2) => {
1544
- MeshExecuteTransferStatus2["succeeded"] = "succeeded";
1545
- MeshExecuteTransferStatus2["failed"] = "failed";
1546
- MeshExecuteTransferStatus2["mfaRequired"] = "mfaRequired";
1547
- MeshExecuteTransferStatus2["emailConfirmationRequired"] = "emailConfirmationRequired";
1548
- MeshExecuteTransferStatus2["emailConfirmationApprovalRequired"] = "emailConfirmationApprovalRequired";
1549
- MeshExecuteTransferStatus2["deviceConfirmationRequired"] = "deviceConfirmationRequired";
1550
- MeshExecuteTransferStatus2["mfaFailed"] = "mfaFailed";
1551
- MeshExecuteTransferStatus2["addressWhitelistRequired"] = "addressWhitelistRequired";
1552
- MeshExecuteTransferStatus2["secondMfaRequired"] = "secondMfaRequired";
1553
- return MeshExecuteTransferStatus2;
1554
- })(MeshExecuteTransferStatus || {});
1555
- var MeshExecuteTransferMfaType = /* @__PURE__ */ ((MeshExecuteTransferMfaType2) => {
1556
- MeshExecuteTransferMfaType2["unspecified"] = "unspecified";
1557
- MeshExecuteTransferMfaType2["phone"] = "phone";
1558
- MeshExecuteTransferMfaType2["email"] = "email";
1559
- MeshExecuteTransferMfaType2["totp"] = "totp";
1560
- MeshExecuteTransferMfaType2["face"] = "face";
1561
- MeshExecuteTransferMfaType2["tradingPin"] = "tradingPin";
1562
- MeshExecuteTransferMfaType2["mobile"] = "mobile";
1563
- return MeshExecuteTransferMfaType2;
1564
- })(MeshExecuteTransferMfaType || {});
1565
- var MeshConfigureTransferStatus = /* @__PURE__ */ ((MeshConfigureTransferStatus2) => {
1566
- MeshConfigureTransferStatus2["failed"] = "failed";
1567
- MeshConfigureTransferStatus2["fromIntegrationNotSupported"] = "fromIntegrationNotSupported";
1568
- MeshConfigureTransferStatus2["kycRequired"] = "kycRequired";
1569
- MeshConfigureTransferStatus2["notAuthorizedFrom"] = "notAuthorizedFrom";
1570
- MeshConfigureTransferStatus2["notAuthorizedTo"] = "notAuthorizedTo";
1571
- MeshConfigureTransferStatus2["succeeded"] = "succeeded";
1572
- MeshConfigureTransferStatus2["toIntegrationNotSupported"] = "toIntegrationNotSupported";
1573
- MeshConfigureTransferStatus2["validationFailed"] = "validationFailed";
1574
- return MeshConfigureTransferStatus2;
1575
- })(MeshConfigureTransferStatus || {});
1576
-
1577
1366
  // src/services/moonpay/endpoints.ts
1578
1367
  import { ErrorCode as ErrorCode3, InternalFailureError as InternalFailureError2 } from "@funkit/utils";
1579
1368
  async function getMoonpayUrlSignature({
@@ -1764,14 +1553,12 @@ export {
1764
1553
  HYPERDASH_API_KEY,
1765
1554
  HYPERSWAP_API_KEY,
1766
1555
  IN_PROGRESS_CHECKOUT_STATES,
1556
+ KALSHI_API_KEY,
1767
1557
  KATANA_API_KEY,
1768
1558
  MELD_PROVIDER_CATEGORIES,
1769
1559
  MESH_API_BASE_URL,
1770
1560
  MONKEY_TILT_API_KEY,
1771
1561
  MeldServiceProvider,
1772
- MeshConfigureTransferStatus,
1773
- MeshExecuteTransferMfaType,
1774
- MeshExecuteTransferStatus,
1775
1562
  OSTIUM_API_KEY,
1776
1563
  OperationStatus,
1777
1564
  OperationType,
@@ -1782,6 +1569,7 @@ export {
1782
1569
  SUSHI_API_KEY,
1783
1570
  TERMINAL_CHECKOUT_STATES,
1784
1571
  TO_PROGRESS_CHECKOUT_STATES,
1572
+ VENTUALS_API_KEY,
1785
1573
  addTransaction,
1786
1574
  addUserToWallet,
1787
1575
  checkWalletAccessInitialization,
@@ -1846,20 +1634,8 @@ export {
1846
1634
  initializeCheckout,
1847
1635
  initializeCheckoutTokenTransferAddress,
1848
1636
  initializeWalletAccess,
1849
- meshConfigureTransfer,
1850
- meshConfigureTransferProxy,
1851
- meshExecuteTransfer,
1852
- meshExecuteTransferProxy,
1853
- meshGetCryptocurrencyHoldings,
1854
- meshGetCryptocurrencyHoldingsProxy,
1855
- meshGetLinkToken,
1856
- meshGetTransferIntegrations,
1857
- meshPreviewTransfer,
1858
- meshPreviewTransferProxy,
1859
1637
  randomBytes,
1860
- removeTokensFromMeshProxy,
1861
1638
  roundToNearestBottomTenth,
1862
- saveTokensToMeshProxy,
1863
1639
  scheduleOp,
1864
1640
  sendDeleteRequest,
1865
1641
  sendGetRequest,