@hsuite/smart-engines-sdk 3.1.0 → 3.2.1

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.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  // Generated by dts-bundle-generator v9.5.1
2
2
 
3
+ import { Wallet } from 'xrpl';
3
4
  import { z } from 'zod';
4
5
 
5
6
  export type CircuitState = "closed" | "open" | "half_open";
@@ -489,7 +490,6 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
489
490
  validatorTopicId: z.ZodString;
490
491
  immutable: z.ZodDefault<z.ZodBoolean>;
491
492
  securityMode: z.ZodDefault<z.ZodEnum<[
492
- "none",
493
493
  "partial",
494
494
  "full"
495
495
  ]>>;
@@ -497,7 +497,7 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
497
497
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
498
498
  }, "strip", z.ZodTypeAny, {
499
499
  chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
500
- securityMode: "none" | "partial" | "full";
500
+ securityMode: "partial" | "full";
501
501
  initialBalance: string;
502
502
  validatorTimestamp: string;
503
503
  validatorTopicId: string;
@@ -514,7 +514,7 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
514
514
  validatorTopicId: string;
515
515
  publicKey?: string | undefined;
516
516
  metadata?: Record<string, any> | undefined;
517
- securityMode?: "none" | "partial" | "full" | undefined;
517
+ securityMode?: "partial" | "full" | undefined;
518
518
  appOwnerPublicKey?: string | undefined;
519
519
  memo?: string | undefined;
520
520
  payerAccountId?: string | undefined;
@@ -990,7 +990,7 @@ export interface ClusterDiscoveryConfig {
990
990
  trustAnchor?: ValidatorDiscoveryConfig;
991
991
  allowInsecure?: boolean;
992
992
  }
993
- declare class ClusterDiscoveryClient {
993
+ export declare class ClusterDiscoveryClient {
994
994
  private readonly bootstrap;
995
995
  private readonly cacheTtlMs;
996
996
  private readonly fetchTimeoutMs;
@@ -1070,6 +1070,14 @@ export declare class ValidatorAuthError extends Error {
1070
1070
  details?: any | undefined;
1071
1071
  constructor(message: string, statusCode: number, details?: any | undefined);
1072
1072
  }
1073
+ export type Web3Signer = {
1074
+ chain: "xrpl";
1075
+ address: string;
1076
+ publicKey: string;
1077
+ signFn: (challenge: string) => string;
1078
+ wallet: Wallet;
1079
+ };
1080
+ export declare function createXrplWeb3Signer(seed: string): Web3Signer;
1073
1081
  interface RetryConfig$1 {
1074
1082
  maxRetries: number;
1075
1083
  initialDelayMs: number;
@@ -1409,6 +1417,7 @@ export declare class IPFSClient {
1409
1417
  getStatus(): Promise<IpfsStatusResponse>;
1410
1418
  getStorageUsage(): Promise<IpfsStorageUsageResponse>;
1411
1419
  }
1420
+ export type SecurityMode = "partial" | "full";
1412
1421
  export type PreparedTransaction = {
1413
1422
  success?: boolean;
1414
1423
  transactionBytes: string;
@@ -1424,135 +1433,267 @@ export type PreparedTransaction = {
1424
1433
  };
1425
1434
  export type PrepareTransferRequest = {
1426
1435
  chain: ChainType;
1427
- payerAccountId: string;
1436
+ payerAccountId?: string;
1428
1437
  from: string;
1429
1438
  to: string;
1430
1439
  amount: string;
1431
1440
  tokenId?: string;
1432
1441
  entityId?: string;
1433
1442
  memo?: string;
1443
+ securityMode?: SecurityMode;
1444
+ appOwnerPublicKey?: string;
1445
+ ss58Format?: number;
1434
1446
  };
1435
1447
  export type PrepareNftMintRequest = {
1436
1448
  chain: ChainType;
1437
- payerAccountId: string;
1438
- tokenId: string;
1439
- metadata: string | string[];
1449
+ payerAccountId?: string;
1450
+ tokenId?: string;
1451
+ metadata?: string | string[];
1440
1452
  entityId?: string;
1453
+ securityMode?: SecurityMode;
1454
+ appOwnerPublicKey?: string;
1455
+ ss58Format?: number;
1456
+ collection?: number;
1457
+ item?: number;
1458
+ mintTo?: string;
1459
+ witnessData?: unknown;
1460
+ recipient?: string;
1461
+ collectionMint?: string;
1462
+ name?: string;
1463
+ symbol?: string;
1464
+ uri?: string;
1465
+ sellerFeeBasisPoints?: number;
1466
+ mintAuthority?: string;
1441
1467
  };
1442
1468
  export type PrepareNftBurnRequest = {
1443
1469
  chain: ChainType;
1444
- payerAccountId: string;
1445
- tokenId: string;
1446
- serialNumber: number;
1470
+ payerAccountId?: string;
1471
+ tokenId?: string;
1472
+ serialNumber?: number;
1447
1473
  entityId?: string;
1474
+ securityMode?: SecurityMode;
1475
+ appOwnerPublicKey?: string;
1476
+ ss58Format?: number;
1477
+ collection?: number;
1478
+ item?: number;
1479
+ mint?: string;
1480
+ owner?: string;
1448
1481
  };
1449
1482
  export type PrepareNftTransferRequest = {
1450
1483
  chain: ChainType;
1451
- payerAccountId: string;
1452
- tokenId: string;
1453
- serialNumber: number;
1454
- fromAccountId: string;
1455
- toAccountId: string;
1484
+ payerAccountId?: string;
1485
+ tokenId?: string;
1486
+ serialNumber?: number;
1487
+ fromAccountId?: string;
1488
+ toAccountId?: string;
1456
1489
  entityId?: string;
1490
+ securityMode?: SecurityMode;
1491
+ appOwnerPublicKey?: string;
1492
+ ss58Format?: number;
1493
+ collection?: number;
1494
+ item?: number;
1495
+ dest?: string;
1496
+ mint?: string;
1497
+ fromOwner?: string;
1498
+ toOwner?: string;
1457
1499
  };
1458
1500
  export type PrepareTokenCreateRequest = {
1459
- chain: "hedera";
1460
- payerAccountId: string;
1461
- name: string;
1462
- symbol: string;
1463
- decimals: number;
1464
- initialSupply: string;
1465
- treasuryAccountId: string;
1466
- entityId: string;
1501
+ chain: ChainType;
1502
+ payerAccountId?: string;
1503
+ name?: string;
1504
+ symbol?: string;
1505
+ decimals?: number;
1506
+ initialSupply?: string;
1507
+ treasuryAccountId?: string;
1508
+ entityId?: string;
1467
1509
  memo?: string;
1468
1510
  tokenType?: "FUNGIBLE_COMMON" | "NON_FUNGIBLE_UNIQUE";
1511
+ securityMode?: SecurityMode;
1512
+ appOwnerPublicKey?: string;
1469
1513
  supplyKey?: string;
1470
1514
  adminKey?: string;
1471
1515
  pauseKey?: string;
1472
1516
  freezeKey?: string;
1473
1517
  kycKey?: string;
1474
1518
  wipeKey?: string;
1519
+ mintAuthority?: string;
1520
+ assetId?: number;
1521
+ admin?: string;
1522
+ minBalance?: string;
1523
+ assetName?: string;
1524
+ noneOwnerVkeyHex?: string;
1525
+ initialRecipient?: string;
1475
1526
  };
1476
1527
  export type PrepareTokenMintRequest = {
1477
1528
  chain: ChainType;
1478
- payerAccountId: string;
1479
- tokenId: string;
1529
+ payerAccountId?: string;
1530
+ tokenId?: string;
1480
1531
  amount: string;
1481
1532
  recipientAccountId?: string;
1482
1533
  entityId?: string;
1534
+ securityMode?: SecurityMode;
1535
+ appOwnerPublicKey?: string;
1536
+ assetId?: number;
1537
+ beneficiary?: string;
1538
+ appOwnerVkeyHex?: string;
1539
+ noneOwnerVkeyHex?: string;
1540
+ destination?: string;
1483
1541
  };
1484
1542
  export type PrepareTokenBurnRequest = {
1485
- chain: "hedera";
1486
- payerAccountId: string;
1487
- tokenId: string;
1543
+ chain: ChainType;
1544
+ payerAccountId?: string;
1545
+ tokenId?: string;
1488
1546
  amount: string;
1489
- entityId: string;
1547
+ entityId?: string;
1548
+ securityMode?: SecurityMode;
1549
+ appOwnerPublicKey?: string;
1550
+ assetId?: number;
1551
+ who?: string;
1552
+ appOwnerVkeyHex?: string;
1553
+ noneOwnerVkeyHex?: string;
1554
+ source?: string;
1490
1555
  };
1491
- export type PrepareTokenAssociationRequest = {
1492
- chain: "hedera";
1493
- payerAccountId: string;
1556
+ export type PrepareTokenAssociateRequest = {
1557
+ chain: ChainType;
1558
+ payerAccountId?: string;
1494
1559
  accountId: string;
1495
1560
  tokenIds: string[];
1496
- entityId: string;
1561
+ entityId?: string;
1562
+ owner?: string;
1563
+ };
1564
+ export type PrepareTokenPauseRequest = {
1565
+ chain: ChainType;
1566
+ payerAccountId?: string;
1567
+ tokenId?: string;
1568
+ assetId?: number;
1569
+ entityId?: string;
1570
+ securityMode?: SecurityMode;
1571
+ appOwnerPublicKey?: string;
1572
+ ss58Format?: number;
1573
+ currentAuthority?: string;
1574
+ newMintAuthority?: string | null;
1575
+ memo?: string;
1576
+ };
1577
+ export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
1578
+ export type PrepareTokenRestrictRequest = {
1579
+ chain: ChainType;
1580
+ payerAccountId?: string;
1581
+ tokenId?: string;
1582
+ accountId?: string;
1583
+ entityId?: string;
1584
+ securityMode?: SecurityMode;
1585
+ appOwnerPublicKey?: string;
1586
+ ss58Format?: number;
1587
+ assetId?: number;
1588
+ who?: string;
1589
+ account?: string;
1590
+ freezeAuthority?: string;
1591
+ memo?: string;
1592
+ };
1593
+ export type PrepareTokenUnrestrictRequest = PrepareTokenRestrictRequest;
1594
+ export type TransactionInfoResponse = {
1595
+ model?: string;
1596
+ description?: string;
1597
+ principles?: string[];
1598
+ supportedChains: string[];
1599
+ responseFormat?: Record<string, string>;
1497
1600
  };
1498
1601
  export type PrepareTopicCreateRequest = {
1499
- chain: "hedera";
1500
- payerAccountId: string;
1602
+ payerAccountId?: string;
1501
1603
  memo?: string;
1502
1604
  adminKeyRequired?: boolean;
1503
1605
  submitKeyRequired?: boolean;
1504
1606
  entityId: string;
1505
1607
  };
1506
1608
  export type PrepareTopicMessageRequest = {
1507
- chain: "hedera";
1508
- payerAccountId: string;
1609
+ payerAccountId?: string;
1509
1610
  topicId: string;
1510
1611
  message: string | Record<string, unknown>;
1511
1612
  entityId: string;
1512
1613
  };
1513
- export type PrepareTokenPauseRequest = {
1514
- chain: "hedera";
1515
- payerAccountId: string;
1516
- tokenId: string;
1517
- entityId: string;
1518
- memo?: string;
1519
- };
1520
- export type PrepareTokenUnpauseRequest = PrepareTokenPauseRequest;
1521
- export type PrepareTokenRestrictRequest = {
1522
- chain: "hedera";
1523
- payerAccountId: string;
1614
+ export type PrepareTokenComplianceEnableRequest = {
1615
+ payerAccountId?: string;
1524
1616
  tokenId: string;
1525
1617
  accountId: string;
1526
1618
  entityId: string;
1619
+ securityMode?: SecurityMode;
1620
+ appOwnerPublicKey?: string;
1527
1621
  memo?: string;
1528
1622
  };
1529
- export type PrepareTokenUnrestrictRequest = PrepareTokenRestrictRequest;
1530
- export type PrepareTokenComplianceEnableRequest = PrepareTokenRestrictRequest;
1531
- export type PrepareTokenComplianceDisableRequest = PrepareTokenRestrictRequest;
1623
+ export type PrepareTokenComplianceDisableRequest = PrepareTokenComplianceEnableRequest;
1532
1624
  export type PrepareTokenWipeRequest = {
1533
- chain: "hedera";
1534
- payerAccountId: string;
1625
+ payerAccountId?: string;
1535
1626
  tokenId: string;
1536
1627
  accountId: string;
1537
1628
  amount: string;
1538
1629
  entityId: string;
1539
1630
  memo?: string;
1540
1631
  };
1632
+ export declare class HederaTransactionsClient {
1633
+ private readonly http;
1634
+ constructor(http: HttpClient);
1635
+ prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
1636
+ prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
1637
+ prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
1638
+ prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
1639
+ prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
1640
+ }
1541
1641
  export type PrepareTrustLineRequest = {
1542
- chain: "xrpl";
1543
- accountAddress: string;
1642
+ accountAddress?: string;
1643
+ payerAccountId?: string;
1544
1644
  currency: string;
1545
1645
  issuerAddress: string;
1546
1646
  limit?: string;
1547
1647
  entityId: string;
1548
1648
  };
1549
- export type TransactionInfoResponse = {
1550
- model?: string;
1551
- description?: string;
1552
- principles?: string[];
1553
- supportedChains: string[];
1554
- responseFormat?: Record<string, string>;
1649
+ export declare class XrplTransactionsClient {
1650
+ private readonly http;
1651
+ constructor(http: HttpClient);
1652
+ prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
1653
+ }
1654
+ export type PrepareTokenCloseAccountRequest = {
1655
+ payerAccountId?: string;
1656
+ account: string;
1657
+ destination: string;
1658
+ owner?: string;
1659
+ entityId?: string;
1660
+ securityMode?: SecurityMode;
1661
+ appOwnerPublicKey?: string;
1662
+ memo?: string;
1663
+ };
1664
+ export declare class SolanaTransactionsClient {
1665
+ private readonly http;
1666
+ constructor(http: HttpClient);
1667
+ prepareTokenCloseAccount(request: PrepareTokenCloseAccountRequest): Promise<PreparedTransaction>;
1668
+ }
1669
+ export type PrepareAssetSetTeamRequest = {
1670
+ payerAccountId?: string;
1671
+ assetId: number;
1672
+ issuer: string;
1673
+ admin: string;
1674
+ freezer: string;
1675
+ entityId?: string;
1676
+ securityMode?: SecurityMode;
1677
+ appOwnerPublicKey?: string;
1678
+ ss58Format?: number;
1679
+ };
1680
+ export type PrepareAssetSetMetadataRequest = {
1681
+ payerAccountId?: string;
1682
+ assetId: number;
1683
+ name: string;
1684
+ symbol: string;
1685
+ decimals: number;
1686
+ entityId?: string;
1687
+ securityMode?: SecurityMode;
1688
+ appOwnerPublicKey?: string;
1689
+ ss58Format?: number;
1555
1690
  };
1691
+ export declare class PolkadotTransactionsClient {
1692
+ private readonly http;
1693
+ constructor(http: HttpClient);
1694
+ prepareAssetSetTeam(request: PrepareAssetSetTeamRequest): Promise<PreparedTransaction>;
1695
+ prepareAssetSetMetadata(request: PrepareAssetSetMetadataRequest): Promise<PreparedTransaction>;
1696
+ }
1556
1697
  export declare class TransactionsClient {
1557
1698
  private readonly http;
1558
1699
  constructor(http: HttpClient);
@@ -1564,17 +1705,11 @@ export declare class TransactionsClient {
1564
1705
  prepareTokenCreate(request: PrepareTokenCreateRequest): Promise<PreparedTransaction>;
1565
1706
  prepareTokenMint(request: PrepareTokenMintRequest): Promise<PreparedTransaction>;
1566
1707
  prepareTokenBurn(request: PrepareTokenBurnRequest): Promise<PreparedTransaction>;
1567
- prepareTokenAssociation(request: PrepareTokenAssociationRequest): Promise<PreparedTransaction>;
1708
+ prepareTokenAssociate(request: PrepareTokenAssociateRequest): Promise<PreparedTransaction>;
1568
1709
  prepareTokenPause(request: PrepareTokenPauseRequest): Promise<PreparedTransaction>;
1569
1710
  prepareTokenUnpause(request: PrepareTokenUnpauseRequest): Promise<PreparedTransaction>;
1570
1711
  prepareTokenRestrict(request: PrepareTokenRestrictRequest): Promise<PreparedTransaction>;
1571
1712
  prepareTokenUnrestrict(request: PrepareTokenUnrestrictRequest): Promise<PreparedTransaction>;
1572
- prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
1573
- prepareTokenComplianceDisable(request: PrepareTokenComplianceDisableRequest): Promise<PreparedTransaction>;
1574
- prepareTokenWipe(request: PrepareTokenWipeRequest): Promise<PreparedTransaction>;
1575
- prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
1576
- prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
1577
- prepareTrustLine(request: PrepareTrustLineRequest): Promise<PreparedTransaction>;
1578
1713
  }
1579
1714
  export type SnapshotStatus = "pending" | "generating" | "completed" | "failed";
1580
1715
  export type SnapshotFormat = "json" | "csv";
@@ -1816,882 +1951,1041 @@ export declare function isPersonhoodVerifierNotConfigured(err: unknown): err is
1816
1951
  error: typeof PERSONHOOD_VERIFIER_NOT_CONFIGURED;
1817
1952
  };
1818
1953
  };
1819
- export interface SmartEngineClientConfig {
1820
- baseUrl: string;
1821
- apiKey?: string;
1822
- authToken?: string;
1823
- timeout?: number;
1824
- allowInsecure?: boolean;
1825
- http?: ResilientHttpConfig;
1826
- }
1827
- export interface NetworkConnectionConfig {
1828
- network: "mainnet" | "testnet" | "previewnet";
1829
- registryTopicId: string;
1830
- chain: AuthChain;
1831
- address: string;
1832
- publicKey: string;
1833
- signFn: (challenge: string) => string | Promise<string>;
1834
- metadata?: {
1835
- appId?: string;
1836
- appName?: string;
1837
- };
1838
- mirrorNodeUrl?: string;
1839
- allowInsecure?: boolean;
1840
- }
1841
- export interface ClusterConnectionConfig {
1842
- bootstrap: string[];
1843
- chain: AuthChain;
1844
- address: string;
1845
- publicKey: string;
1846
- signFn: (challenge: string) => string | Promise<string>;
1847
- metadata?: {
1848
- appId?: string;
1849
- appName?: string;
1850
- };
1851
- trustAnchor?: {
1852
- network: "mainnet" | "testnet" | "previewnet";
1853
- registryTopicId: string;
1854
- mirrorNodeUrl?: string;
1954
+ export type AgentStatus = "active" | "paused" | "revoked" | "pending";
1955
+ export type AgentRegisterRequest = {
1956
+ name: string;
1957
+ description?: string;
1958
+ capabilities: string[];
1959
+ rules: AgentRules;
1960
+ fundingConfig?: {
1961
+ chain: string;
1962
+ maxAmount: string;
1963
+ autoFund: boolean;
1855
1964
  };
1856
- allowInsecure?: boolean;
1857
- }
1858
- export interface ClusterConnectionResult {
1859
- client: SmartEngineClient;
1860
- cluster: ClusterInfo;
1861
- session: AuthenticateResponse;
1862
- }
1863
- export interface NetworkConnectionResult {
1864
- client: SmartEngineClient;
1865
- validator: ValidatorInfo;
1866
- session: AuthenticateResponse;
1867
- }
1868
- export declare class SmartEngineClient {
1869
- private baseUrl;
1870
- private allowInsecure;
1965
+ };
1966
+ export type AgentRules = {
1967
+ maxTradeAmount?: string;
1968
+ allowedPairs?: string[];
1969
+ allowedChains?: string[];
1970
+ dailyLimit?: string;
1971
+ requireApprovalAbove?: string;
1972
+ customRules?: Record<string, unknown>;
1973
+ };
1974
+ export type AgentRulesValidationResult = {
1975
+ valid: boolean;
1976
+ errors: string[];
1977
+ };
1978
+ export declare function validateAgentRules(rules: AgentRules): AgentRulesValidationResult;
1979
+ export type AgentInfo = {
1980
+ agentId: string;
1981
+ name: string;
1982
+ description?: string;
1983
+ status: AgentStatus;
1984
+ capabilities: string[];
1985
+ rules: AgentRules;
1986
+ owner: string;
1987
+ createdAt: string;
1988
+ lastActiveAt?: string;
1989
+ };
1990
+ export type AgentEvent = {
1991
+ eventId: string;
1992
+ agentId: string;
1993
+ type: string;
1994
+ data: Record<string, unknown>;
1995
+ timestamp: string;
1996
+ };
1997
+ export type AgentBalance = {
1998
+ chain: string;
1999
+ accountId: string;
2000
+ balance: string;
2001
+ symbol: string;
2002
+ };
2003
+ export type AgentOperation = {
2004
+ operationId: string;
2005
+ agentId: string;
2006
+ type: string;
2007
+ amount: string;
2008
+ chain: string;
2009
+ status: "pending" | "approved" | "rejected";
2010
+ createdAt: string;
2011
+ };
2012
+ export type AgentFundRequest = {
2013
+ chain: string;
2014
+ amount: string;
2015
+ source?: string;
2016
+ };
2017
+ export type AgentTradeRequest = {
2018
+ chain: string;
2019
+ pair: string;
2020
+ side: "buy" | "sell";
2021
+ amount: string;
2022
+ price?: string;
2023
+ };
2024
+ export type AgentWithdrawRequest = {
2025
+ chain: string;
2026
+ amount: string;
2027
+ destination: string;
2028
+ };
2029
+ export declare class AgentsClient {
1871
2030
  private readonly http;
1872
- private readonly txHttp;
1873
- private lastHttpError?;
1874
- readonly subscription: SubscriptionClient;
1875
- readonly tss: TSSClient;
1876
- readonly ipfs: IPFSClient;
1877
- readonly transactions: TransactionsClient;
1878
- readonly snapshots: SnapshotsClient;
1879
- readonly historicalBalance: HistoricalBalanceClient;
1880
- readonly settlement: SettlementClient;
1881
- readonly governance: GovernanceClient;
1882
- readonly personhood: PersonhoodClient;
1883
- constructor(config: SmartEngineClientConfig);
1884
- static connectToNetwork(config: NetworkConnectionConfig): Promise<NetworkConnectionResult>;
1885
- static connectToCluster(config: ClusterConnectionConfig): Promise<ClusterConnectionResult>;
1886
- getBaseUrl(): string;
1887
- isAuthenticated(): boolean;
1888
- getHttpHealth(): {
1889
- breaker: CircuitBreakerSnapshot | null;
1890
- lastError?: Error;
1891
- };
1892
- getHealth(): Promise<{
1893
- status: string;
1894
- timestamp: string;
1895
- chains: any[];
2031
+ constructor(http: HttpClient);
2032
+ register(request: AgentRegisterRequest): Promise<AgentInfo>;
2033
+ get(agentId: string): Promise<AgentInfo>;
2034
+ list(): Promise<{
2035
+ agents: AgentInfo[];
2036
+ total: number;
1896
2037
  }>;
1897
- getSupportedChains(): Promise<{
1898
- chains: string[];
2038
+ fund(agentId: string, request: AgentFundRequest): Promise<{
2039
+ success: boolean;
2040
+ txId?: string;
1899
2041
  }>;
1900
- createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse>;
1901
- getAccountInfo(chain: string, accountId: string): Promise<AccountInfo>;
1902
- getBalance(chain: string, accountId: string): Promise<AccountBalance>;
1903
- transfer(request: TransferRequest): Promise<TransferResponse>;
1904
- getTransaction(chain: string, txId: string): Promise<Transaction>;
1905
- getTransactionReceipt(chain: string, txId: string): Promise<any>;
1906
- createToken(request: CreateTokenRequest): Promise<CreateTokenResponse>;
1907
- mintToken(request: MintTokenRequest): Promise<any>;
1908
- getTokenInfo(chain: string, tokenId: string): Promise<TokenInfo>;
1909
- burnToken(request: BurnTokenRequest): Promise<ActionResult>;
1910
- pauseToken(request: TokenActionRequest): Promise<ActionResult>;
1911
- unpauseToken(request: TokenActionRequest): Promise<ActionResult>;
1912
- restrictAccount(request: TokenActionRequest): Promise<ActionResult>;
1913
- unrestrictAccount(request: TokenActionRequest): Promise<ActionResult>;
1914
- enableCompliance(request: TokenActionRequest): Promise<ActionResult>;
1915
- disableCompliance(request: TokenActionRequest): Promise<ActionResult>;
1916
- wipeFromAccount(request: TokenActionRequest): Promise<ActionResult>;
1917
- getAllCapabilities(): Promise<any>;
1918
- getChainCapabilities(chain: ChainType): Promise<any>;
1919
- getSystemStatus(): Promise<any>;
1920
- submitMessage(chain: string, topicId: string, message: string): Promise<any>;
1921
- getClusterHealth(): Promise<{
2042
+ trade(agentId: string, request: AgentTradeRequest): Promise<{
2043
+ success: boolean;
2044
+ txId?: string;
2045
+ }>;
2046
+ withdraw(agentId: string, request: AgentWithdrawRequest): Promise<{
2047
+ success: boolean;
2048
+ txId?: string;
2049
+ }>;
2050
+ pause(agentId: string): Promise<{
2051
+ success: boolean;
1922
2052
  status: string;
1923
- nodes: number;
1924
- healthy: number;
1925
- unhealthy: number;
1926
2053
  }>;
1927
- getClusterStatus(): Promise<{
2054
+ resume(agentId: string): Promise<{
2055
+ success: boolean;
1928
2056
  status: string;
1929
- nodeId: string;
1930
- nodes: Array<{
1931
- nodeId: string;
1932
- endpoint: string;
1933
- status: string;
1934
- lastSeen?: string;
1935
- }>;
1936
- quorum: {
1937
- required: number;
1938
- current: number;
1939
- reached: boolean;
1940
- };
1941
2057
  }>;
1942
- getMetrics(): Promise<string>;
1943
- getQueueStats(): Promise<{
1944
- queues: Record<string, {
1945
- pending: number;
1946
- processing: number;
1947
- completed: number;
1948
- failed: number;
1949
- }>;
1950
- timestamp: string;
2058
+ revoke(agentId: string): Promise<{
2059
+ success: boolean;
2060
+ status: string;
1951
2061
  }>;
1952
- getCircuitBreakerStatus(): Promise<{
1953
- breakers: Record<string, {
1954
- state: "closed" | "open" | "half-open";
1955
- failures: number;
1956
- successes: number;
1957
- lastFailure?: string;
1958
- nextRetry?: string;
1959
- }>;
1960
- timestamp: string;
2062
+ updateRules(agentId: string, rules: Partial<AgentRules>): Promise<AgentInfo>;
2063
+ getEvents(agentId: string): Promise<{
2064
+ events: AgentEvent[];
2065
+ total: number;
1961
2066
  }>;
1962
- verifySignature(request: {
1963
- chain: ChainType;
1964
- message: string;
1965
- signature: string;
1966
- publicKey: string;
1967
- }): Promise<{
1968
- valid: boolean;
1969
- chain: ChainType;
2067
+ getBalances(agentId: string): Promise<{
2068
+ balances: AgentBalance[];
2069
+ }>;
2070
+ approve(agentId: string, operationId: string): Promise<{
2071
+ success: boolean;
2072
+ }>;
2073
+ reject(agentId: string, operationId: string): Promise<{
2074
+ success: boolean;
1970
2075
  }>;
1971
2076
  }
1972
- export type GatewayHealthResponse = {
1973
- status: "healthy" | "degraded" | "unhealthy";
1974
- timestamp: string;
1975
- uptime: number;
1976
- version: string;
1977
- };
1978
- export type GatewayStatusResponse = {
1979
- status: string;
1980
- hosts: {
1981
- total: number;
1982
- verified: number;
1983
- active: number;
1984
- };
1985
- domains: {
1986
- total: number;
1987
- verified: number;
1988
- };
1989
- uptime: number;
1990
- };
1991
- export type GatewayReadinessResponse = {
1992
- ready: boolean;
1993
- checks: Record<string, boolean>;
1994
- };
1995
- export type GatewayLivenessResponse = {
1996
- alive: boolean;
1997
- timestamp: string;
2077
+ export type BaasService = "auth" | "database" | "storage" | "functions" | "messaging";
2078
+ export type BaasSupportedChain = "hedera" | "xrpl" | "polkadot" | "solana";
2079
+ export type BaasEndpoints = {
2080
+ auth: string;
2081
+ database: string;
2082
+ storage: string;
2083
+ functions: string;
2084
+ messaging: string;
1998
2085
  };
1999
- export type GatewayMetricsResponse = {
2000
- requests: {
2001
- total: number;
2002
- successful: number;
2003
- failed: number;
2004
- avgLatencyMs: number;
2005
- };
2006
- hosts: {
2007
- total: number;
2008
- healthy: number;
2009
- unhealthy: number;
2010
- };
2011
- bandwidth: {
2012
- inbound: number;
2013
- outbound: number;
2014
- };
2015
- timestamp: string;
2086
+ export type DeployedAppStatus = "pending" | "deploying" | "active" | "suspended" | "deleted";
2087
+ export type DeployedAppLimits = {
2088
+ storage: string;
2089
+ functions: number;
2090
+ channels: number;
2016
2091
  };
2017
- export type GatewayMetricsSummaryResponse = {
2018
- summary: Record<string, unknown>;
2019
- period: string;
2020
- generatedAt: string;
2092
+ export type DeployedAppUsage = {
2093
+ storage: number;
2094
+ functions: number;
2095
+ channels: number;
2021
2096
  };
2022
- export type RegisterHostRequest = {
2097
+ export type DeployedApp = {
2098
+ appId: string;
2023
2099
  name: string;
2024
- endpoint: string;
2025
- capabilities?: string[];
2026
- metadata?: Record<string, unknown>;
2100
+ services: BaasService[];
2101
+ status: DeployedAppStatus;
2102
+ owner: string;
2103
+ endpoints: BaasEndpoints;
2104
+ environment?: Record<string, string>;
2105
+ limits: DeployedAppLimits;
2106
+ usage: DeployedAppUsage;
2107
+ createdAt: string;
2108
+ updatedAt?: string;
2027
2109
  };
2028
- export type HostInfo = {
2029
- hostId: string;
2110
+ export type DeployedAppInfo = {
2111
+ appId: string;
2030
2112
  name: string;
2031
- endpoint: string;
2032
- status: "active" | "inactive" | "suspended";
2033
- verified: boolean;
2034
- capabilities: string[];
2035
- lastSeen: string;
2036
- registeredAt: string;
2037
- metadata?: Record<string, unknown>;
2113
+ status: "active" | "inactive" | "deploying" | "error";
2114
+ services: string[];
2115
+ endpoints: BaasEndpoints;
2116
+ createdAt: string;
2038
2117
  };
2039
- export type HostListResponse = {
2040
- hosts: HostInfo[];
2041
- total: number;
2118
+ export type BaasAuthConfig = {
2119
+ chain: BaasSupportedChain;
2120
+ walletAddress: string;
2121
+ publicKey: string;
2122
+ signFn: (message: string) => string | Promise<string>;
2042
2123
  };
2043
- export type RoutingConfig = {
2044
- strategy: "round-robin" | "least-connections" | "random" | "weighted";
2045
- healthCheckInterval?: number;
2124
+ export type BaasClientConfig = {
2125
+ hostUrl: string;
2126
+ appId?: string;
2127
+ appName?: string;
2128
+ auth?: BaasAuthConfig;
2129
+ services?: BaasService[];
2046
2130
  timeout?: number;
2047
- retries?: number;
2048
- weights?: Record<string, number>;
2049
- };
2050
- export type ProxyRequest = {
2051
- targetHostId?: string;
2052
- method: string;
2053
- path: string;
2054
- headers?: Record<string, string>;
2055
- body?: unknown;
2131
+ allowInsecure?: boolean;
2132
+ http?: ResilientHttpConfig;
2133
+ pathPrefix?: string;
2056
2134
  };
2057
- export type ProxyResponse = {
2058
- statusCode: number;
2059
- headers: Record<string, string>;
2060
- body: unknown;
2061
- hostId: string;
2062
- latencyMs: number;
2135
+ export type BaasChallengeRequest = {
2136
+ chain: BaasSupportedChain;
2137
+ walletAddress: string;
2138
+ appId: string;
2139
+ metadata?: Record<string, unknown>;
2063
2140
  };
2064
- export type RoutingStatsResponse = {
2065
- totalRequests: number;
2066
- successRate: number;
2067
- avgLatencyMs: number;
2068
- hostStats: Record<string, {
2069
- requests: number;
2070
- errors: number;
2071
- avgLatencyMs: number;
2072
- }>;
2141
+ export type BaasChallengeResponse = {
2142
+ challengeId: string;
2143
+ message: string;
2144
+ expiresAt: number;
2145
+ chain?: BaasSupportedChain;
2146
+ walletAddress?: string;
2147
+ appId?: string;
2073
2148
  };
2074
- export type DomainRegistrationRequest = {
2075
- domain: string;
2076
- owner: string;
2077
- registrar?: string;
2078
- autoRenew?: boolean;
2149
+ export type BaasVerifyRequest = {
2150
+ challengeId: string;
2151
+ signature: string;
2152
+ publicKey?: string;
2079
2153
  };
2080
- export type DomainInfo = {
2081
- domain: string;
2082
- owner: string;
2083
- status: "active" | "pending" | "suspended" | "expired";
2084
- verified: boolean;
2085
- registrar?: string;
2086
- expiresAt?: string;
2087
- createdAt: string;
2088
- dnsConfigured: boolean;
2089
- dnssecEnabled: boolean;
2154
+ export type BaasAuthResult = {
2155
+ authenticated?: boolean;
2156
+ walletAddress: string;
2157
+ chain: BaasSupportedChain;
2158
+ appId: string;
2159
+ token: string;
2160
+ expiresAt: number;
2090
2161
  };
2091
- export type DomainListResponse = {
2092
- domains: DomainInfo[];
2093
- total: number;
2162
+ export type BaasSessionInfo = {
2163
+ valid: boolean;
2164
+ walletAddress?: string;
2165
+ chain?: BaasSupportedChain;
2166
+ appId?: string;
2167
+ permissions?: string[];
2168
+ sessionId?: string;
2169
+ expiresAt?: number;
2170
+ error?: string;
2094
2171
  };
2095
- export type DomainAvailabilityResponse = {
2096
- domain: string;
2097
- available: boolean;
2098
- premium: boolean;
2099
- price?: string;
2100
- suggestions?: string[];
2172
+ export type BaasDocument = {
2173
+ _id: string;
2174
+ data: Record<string, unknown>;
2175
+ createdAt: number;
2176
+ updatedAt: number;
2177
+ version: number;
2101
2178
  };
2102
- export type VerificationTokenResponse = {
2103
- token: string;
2104
- method: "dns" | "http" | "email";
2105
- instructions: string;
2106
- expiresAt: string;
2179
+ export type DbDocument<T = Record<string, unknown>> = {
2180
+ _id: string;
2181
+ data: T;
2182
+ createdAt: number;
2183
+ updatedAt: number;
2184
+ version: number;
2107
2185
  };
2108
- export type VerificationResult = {
2109
- verified: boolean;
2110
- domain: string;
2111
- method: string;
2112
- verifiedAt?: string;
2113
- error?: string;
2186
+ export type BaasStateTransition = {
2187
+ transitionId: string;
2188
+ operation: "insert" | "update" | "delete";
2189
+ collection: string;
2190
+ documentId: string;
2191
+ previousHash: string;
2192
+ newHash: string;
2193
+ stateRoot: string;
2194
+ timestamp: number;
2195
+ proof: BaasMerkleProof;
2114
2196
  };
2115
- export type DnsRecord = {
2116
- type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SRV" | "CAA";
2117
- name: string;
2118
- value: string;
2119
- ttl?: number;
2120
- priority?: number;
2197
+ export type BaasMerkleProof = {
2198
+ root: string;
2199
+ leaf: string;
2200
+ siblings: string[];
2201
+ path: ("left" | "right")[];
2121
2202
  };
2122
- export type DomainTransferRequest = {
2123
- authCode: string;
2124
- newRegistrar?: string;
2203
+ export type BaasInsertResult = {
2204
+ document: BaasDocument;
2205
+ stateTransition: BaasStateTransition;
2125
2206
  };
2126
- export type DnsResolveResponse = {
2127
- name: string;
2128
- type: string;
2129
- records: Array<{
2130
- value: string;
2131
- ttl: number;
2132
- }>;
2133
- dnssec: boolean;
2134
- timestamp: string;
2207
+ export type BaasUpdateResult = {
2208
+ document: BaasDocument;
2209
+ stateTransition: BaasStateTransition;
2135
2210
  };
2136
- export type DnsBatchQuery = {
2137
- name: string;
2138
- type?: string;
2211
+ export type BaasDeleteResult = {
2212
+ deleted: boolean;
2213
+ stateTransition: BaasStateTransition;
2139
2214
  };
2140
- export type DnsBatchResolveResponse = {
2141
- results: DnsResolveResponse[];
2142
- errors: Array<{
2143
- query: DnsBatchQuery;
2144
- error: string;
2145
- }>;
2215
+ export type DbComparisonOperator = {
2216
+ $eq?: unknown;
2217
+ $ne?: unknown;
2218
+ $gt?: number;
2219
+ $gte?: number;
2220
+ $lt?: number;
2221
+ $lte?: number;
2222
+ $in?: unknown[];
2223
+ $nin?: unknown[];
2224
+ $exists?: boolean;
2225
+ $regex?: string;
2146
2226
  };
2147
- export type DnsZone = {
2148
- zoneName: string;
2149
- status: "active" | "pending" | "disabled";
2150
- records: number;
2151
- dnssecEnabled: boolean;
2152
- createdAt: string;
2153
- updatedAt: string;
2227
+ export type DbQuery = Record<string, unknown | DbComparisonOperator>;
2228
+ export type BaasQueryOptions = {
2229
+ limit?: number;
2230
+ skip?: number;
2231
+ sort?: string;
2232
+ projection?: Record<string, 0 | 1>;
2154
2233
  };
2155
- export type DnsZoneListResponse = {
2156
- zones: DnsZone[];
2157
- total: number;
2234
+ export type BaasFindResult = {
2235
+ documents: BaasDocument[];
2236
+ count: number;
2237
+ limit: number;
2238
+ skip: number;
2158
2239
  };
2159
- export type DnsRecordInfo = {
2160
- recordId: string;
2161
- type: string;
2162
- name: string;
2163
- value: string;
2164
- ttl: number;
2165
- priority?: number;
2166
- createdAt: string;
2167
- updatedAt: string;
2240
+ export type BaasFileMetadata = {
2241
+ filename?: string;
2242
+ mimeType?: string;
2243
+ tags?: Record<string, string>;
2244
+ encrypted?: boolean;
2168
2245
  };
2169
- export type DnssecKey = {
2170
- keyTag: number;
2171
- algorithm: string;
2172
- digestType: string;
2173
- digest: string;
2174
- publicKey: string;
2175
- flags: number;
2246
+ export type BaasUploadResult = {
2247
+ cid: string;
2248
+ size: number;
2249
+ mimeType: string;
2250
+ uploadedAt: string;
2251
+ filename?: string;
2252
+ encrypted?: boolean;
2176
2253
  };
2177
- export type DnssecDsRecord = {
2178
- keyTag: number;
2179
- algorithm: number;
2180
- digestType: number;
2181
- digest: string;
2254
+ export type BaasFileInfo = {
2255
+ cid: string;
2256
+ filename?: string;
2257
+ size: number;
2258
+ mimeType?: string;
2259
+ uploadedAt: string;
2260
+ lastAccessedAt?: string;
2261
+ tags?: Record<string, string>;
2182
2262
  };
2183
- export declare class RoutingClient {
2184
- private readonly http;
2185
- constructor(http: HttpClient);
2186
- registerHost(request: RegisterHostRequest): Promise<HostInfo>;
2187
- unregisterHost(hostId: string): Promise<{
2188
- success: boolean;
2189
- }>;
2190
- getAllHosts(): Promise<HostListResponse>;
2191
- getVerifiedHosts(): Promise<HostListResponse>;
2192
- getHost(hostId: string): Promise<HostInfo>;
2193
- verifyHost(hostId: string): Promise<{
2194
- verified: boolean;
2195
- message: string;
2196
- }>;
2197
- setRoutingConfig(appId: string, config: RoutingConfig): Promise<RoutingConfig>;
2198
- getRoutingConfig(appId: string): Promise<RoutingConfig>;
2199
- proxyRequest(request: ProxyRequest): Promise<ProxyResponse>;
2200
- getStats(): Promise<RoutingStatsResponse>;
2201
- mapDomainToApp(domain: string, appId: string): Promise<{
2202
- success: boolean;
2203
- domain: string;
2204
- appId: string;
2263
+ export type BaasStorageUsage = {
2264
+ totalSize: number;
2265
+ fileCount: number;
2266
+ };
2267
+ export type BaasFunctionRuntime = "nodejs20" | "python3" | "deno";
2268
+ export type BaasTriggerType = "http" | "schedule" | "event" | "webhook";
2269
+ export type BaasFunctionResources = {
2270
+ memory: string;
2271
+ timeout: number;
2272
+ maxConcurrency?: number;
2273
+ };
2274
+ export type BaasFunctionDeployRequest = {
2275
+ name: string;
2276
+ description?: string;
2277
+ runtime: BaasFunctionRuntime;
2278
+ code: string;
2279
+ codeType: "inline" | "ipfs";
2280
+ entryPoint?: string;
2281
+ triggers?: Array<{
2282
+ type: BaasTriggerType;
2283
+ config: Record<string, unknown>;
2205
2284
  }>;
2206
- }
2207
- export declare class DomainsClient {
2208
- private readonly http;
2209
- constructor(http: HttpClient);
2210
- register(request: DomainRegistrationRequest): Promise<DomainInfo>;
2211
- checkAvailability(domain: string): Promise<DomainAvailabilityResponse>;
2212
- getInfo(domain: string): Promise<DomainInfo>;
2213
- list(owner?: string): Promise<DomainListResponse>;
2214
- generateVerificationToken(domain: string, method: "dns" | "http" | "email"): Promise<VerificationTokenResponse>;
2215
- verifyOwnership(domain: string, token: string): Promise<VerificationResult>;
2216
- configureDns(domain: string, records: DnsRecord[]): Promise<{
2217
- success: boolean;
2218
- records: DnsRecord[];
2219
- }>;
2220
- enableDnssec(domain: string): Promise<{
2221
- success: boolean;
2222
- message: string;
2223
- }>;
2224
- disableDnssec(domain: string): Promise<{
2225
- success: boolean;
2226
- message: string;
2227
- }>;
2228
- renew(domain: string, years?: number): Promise<DomainInfo>;
2229
- transfer(domain: string, request: DomainTransferRequest): Promise<{
2230
- success: boolean;
2231
- message: string;
2232
- }>;
2233
- approveTransfer(domain: string): Promise<{
2234
- success: boolean;
2235
- }>;
2236
- rejectTransfer(domain: string): Promise<{
2237
- success: boolean;
2238
- }>;
2239
- suspend(domain: string, reason: string): Promise<{
2240
- success: boolean;
2241
- }>;
2242
- unsuspend(domain: string): Promise<{
2243
- success: boolean;
2244
- }>;
2245
- }
2246
- export declare class DnsClient {
2285
+ resources?: Partial<BaasFunctionResources>;
2286
+ environment?: Record<string, string>;
2287
+ };
2288
+ export type BaasFunctionDeployResult = {
2289
+ functionId: string;
2290
+ version: number;
2291
+ deployedAt: string;
2292
+ endpoints?: string[];
2293
+ status: "active" | "deploying" | "failed";
2294
+ error?: string;
2295
+ };
2296
+ export type BaasFunctionResult = {
2297
+ requestId: string;
2298
+ functionId: string;
2299
+ status: "success" | "error" | "timeout";
2300
+ result?: unknown;
2301
+ error?: string;
2302
+ logs?: string[];
2303
+ duration: number;
2304
+ memoryUsed?: number;
2305
+ };
2306
+ export type BaasFunctionInfo = {
2307
+ functionId: string;
2308
+ name: string;
2309
+ runtime: BaasFunctionRuntime;
2310
+ version: number;
2311
+ status: "active" | "inactive" | "error";
2312
+ deployedAt: string;
2313
+ lastInvokedAt?: string;
2314
+ invocationCount: number;
2315
+ };
2316
+ export type BaasFunctionLog = {
2317
+ timestamp: string;
2318
+ level: "debug" | "info" | "warn" | "error";
2319
+ message: string;
2320
+ requestId?: string;
2321
+ metadata?: Record<string, unknown>;
2322
+ };
2323
+ export type BaasFunctionLogOptions = {
2324
+ startTime?: string;
2325
+ endTime?: string;
2326
+ limit?: number;
2327
+ level?: "debug" | "info" | "warn" | "error";
2328
+ requestId?: string;
2329
+ };
2330
+ export type BaasMessage = {
2331
+ messageId: string;
2332
+ channel: string;
2333
+ data: Record<string, unknown>;
2334
+ sender?: string;
2335
+ timestamp: string;
2336
+ metadata?: Record<string, unknown>;
2337
+ };
2338
+ export type MessageHandler = (message: BaasMessage) => void | Promise<void>;
2339
+ export type BaasChannelConfig = {
2340
+ name: string;
2341
+ persistent?: boolean;
2342
+ maxHistoryLength?: number;
2343
+ presence?: boolean;
2344
+ authRequired?: boolean;
2345
+ };
2346
+ export type ChannelSubscription = {
2347
+ subscriptionId: string;
2348
+ channel: string;
2349
+ appId: string;
2350
+ createdAt: string;
2351
+ active: boolean;
2352
+ };
2353
+ export type BaasPresenceMember = {
2354
+ clientId: string;
2355
+ walletAddress?: string;
2356
+ joinedAt: string;
2357
+ lastSeenAt: string;
2358
+ metadata?: Record<string, unknown>;
2359
+ };
2360
+ export type BaasPresenceInfo = {
2361
+ channel: string;
2362
+ members: BaasPresenceMember[];
2363
+ totalCount: number;
2364
+ };
2365
+ export type BaasHistoryOptions = {
2366
+ limit?: number;
2367
+ before?: string;
2368
+ after?: string;
2369
+ startTime?: string;
2370
+ endTime?: string;
2371
+ };
2372
+ export type BaasPublishResult = {
2373
+ messageId: string;
2374
+ channel: string;
2375
+ timestamp: string;
2376
+ };
2377
+ export type BaasInitRequest = {
2378
+ name: string;
2379
+ port: number;
2380
+ services: BaasService[];
2381
+ limits?: {
2382
+ cpu?: string;
2383
+ memory?: string;
2384
+ };
2385
+ };
2386
+ export type BaasInitResponse = {
2387
+ appId: string;
2388
+ registry: {
2389
+ server: string;
2390
+ username: string;
2391
+ password: string;
2392
+ repository: string;
2393
+ };
2394
+ };
2395
+ export type BaasDeployRequest = {
2396
+ tag: string;
2397
+ port?: number;
2398
+ replicas?: number;
2399
+ env?: Record<string, string>;
2400
+ resources?: {
2401
+ cpu?: string;
2402
+ memory?: string;
2403
+ };
2404
+ strategy?: "rolling" | "recreate";
2405
+ };
2406
+ export type BaasDeployResponse = {
2407
+ appId: string;
2408
+ status: string;
2409
+ url: string;
2410
+ };
2411
+ export type BaasUploadFrontendResponse = {
2412
+ bundleSha256: string;
2413
+ bundleSizeBytes: number;
2414
+ };
2415
+ export type BaasRollbackRequest = {
2416
+ toTag: string;
2417
+ };
2418
+ export type BaasRuntimeStatus = {
2419
+ appId: string;
2420
+ state: "PENDING_SUBSCRIPTION" | "ACTIVE" | "SUSPENDED" | "RETIRED";
2421
+ runtime?: {
2422
+ image: string;
2423
+ runtimeState: "NOT_DEPLOYED" | "DEPLOYING" | "RUNNING" | "FAILED" | "DEGRADED";
2424
+ replicas: number;
2425
+ lastReconciledAt?: string;
2426
+ lastError?: string;
2427
+ };
2428
+ };
2429
+ export type BaasAppListResponse = {
2430
+ apps: DeployedAppInfo[];
2431
+ };
2432
+ export type BaasErrorResponse = {
2433
+ code: string;
2434
+ message: string;
2435
+ details?: Record<string, unknown>;
2436
+ requestId?: string;
2437
+ };
2438
+ export type BaasErrorDetails = {
2439
+ code?: string;
2440
+ details?: unknown;
2441
+ originalError?: string;
2442
+ };
2443
+ export declare class DeploymentClient {
2247
2444
  private readonly http;
2248
2445
  constructor(http: HttpClient);
2249
- resolve(name: string, type?: string, dnssec?: boolean): Promise<DnsResolveResponse>;
2250
- resolveBatch(queries: DnsBatchQuery[]): Promise<DnsBatchResolveResponse>;
2251
- listZones(): Promise<DnsZoneListResponse>;
2252
- getZone(zoneName: string): Promise<DnsZone & {
2253
- records: DnsRecordInfo[];
2254
- }>;
2255
- createZone(request: {
2256
- zoneName: string;
2257
- description?: string;
2258
- }): Promise<DnsZone>;
2259
- deleteZone(zoneName: string): Promise<{
2446
+ init(request: BaasInitRequest): Promise<BaasInitResponse>;
2447
+ uploadFrontend(appId: string, bundle: Blob | Buffer, filename?: string): Promise<BaasUploadFrontendResponse>;
2448
+ deploy(appId: string, request: BaasDeployRequest): Promise<BaasDeployResponse>;
2449
+ rollback(appId: string, request: BaasRollbackRequest): Promise<BaasDeployResponse>;
2450
+ status(appId: string): Promise<BaasRuntimeStatus>;
2451
+ list(): Promise<BaasAppListResponse>;
2452
+ get(appId: string): Promise<DeployedAppInfo>;
2453
+ update(appId: string, updates: Partial<BaasDeployRequest>): Promise<DeployedAppInfo>;
2454
+ delete(appId: string): Promise<{
2260
2455
  success: boolean;
2261
2456
  }>;
2262
- addRecord(zoneName: string, record: DnsRecord): Promise<DnsRecordInfo>;
2263
- updateRecord(zoneName: string, recordId: string, updates: Partial<DnsRecord>): Promise<DnsRecordInfo>;
2264
- deleteRecord(zoneName: string, recordId: string): Promise<{
2457
+ suspend(appId: string): Promise<{
2265
2458
  success: boolean;
2459
+ status: string;
2266
2460
  }>;
2267
- generateDnssecKeys(zoneName: string, algorithm?: string): Promise<{
2268
- keys: DnssecKey[];
2269
- }>;
2270
- getDnssecKeys(zoneName: string): Promise<{
2271
- keys: DnssecKey[];
2272
- }>;
2273
- getDsRecord(zoneName: string): Promise<DnssecDsRecord>;
2274
- clearCache(): Promise<{
2461
+ resume(appId: string): Promise<{
2275
2462
  success: boolean;
2276
- entriesCleared: number;
2463
+ status: string;
2464
+ }>;
2465
+ getStats(): Promise<{
2466
+ totalApps: number;
2467
+ activeApps: number;
2468
+ totalOwners: number;
2277
2469
  }>;
2278
2470
  }
2279
- export type SmartGatewayClientConfig = {
2471
+ export interface SmartEngineClientConfig {
2280
2472
  baseUrl: string;
2281
2473
  apiKey?: string;
2282
2474
  authToken?: string;
2283
2475
  timeout?: number;
2284
2476
  allowInsecure?: boolean;
2285
- };
2286
- export declare class SmartGatewayClient {
2287
- private readonly http;
2288
- readonly routing: RoutingClient;
2289
- readonly domains: DomainsClient;
2290
- readonly dns: DnsClient;
2291
- constructor(config: SmartGatewayClientConfig);
2292
- getHealth(): Promise<GatewayHealthResponse>;
2293
- getStatus(): Promise<GatewayStatusResponse>;
2294
- getReadiness(): Promise<GatewayReadinessResponse>;
2295
- getLiveness(): Promise<GatewayLivenessResponse>;
2296
- getMetrics(refresh?: boolean): Promise<GatewayMetricsResponse>;
2297
- getMetricsSummary(): Promise<GatewayMetricsSummaryResponse>;
2477
+ http?: ResilientHttpConfig;
2298
2478
  }
2299
- declare function formatHederaAccountId(id: string): string;
2300
- declare function parseHbar(amount: string): number;
2301
- declare function hbarToTinybars(hbar: string | number): string;
2302
- declare function tinybarsToHbar(tinybars: string | number): string;
2303
- declare function formatHederaTokenId(id: string): string;
2304
- declare function formatHederaTopicId(id: string): string;
2305
- declare function validateXRPLAddress(address: string): boolean;
2306
- declare function formatXRPLAddress(address: string): string;
2307
- declare function xrpToDrops(xrp: string | number): string;
2308
- declare function dropsToXrp(drops: string | number): string;
2309
- declare function parseXRP(amount: string): number;
2310
- declare function validateCurrencyCode(code: string): boolean;
2311
- declare function validatePolkadotAddress(address: string): boolean;
2312
- declare function formatPolkadotAddress(address: string, prefixLength?: number, suffixLength?: number): string;
2313
- declare function dotToPlanck(dot: number): bigint;
2314
- declare function planckToDot(planck: bigint): number;
2315
- declare function formatDot(planck: bigint, decimals?: number): string;
2316
- declare function parseDotString(dotString: string): bigint;
2317
- declare function validateSolanaPublicKey(publicKey: string): boolean;
2318
- declare function formatSolanaAddress(address: string, prefixLength?: number, suffixLength?: number): string;
2319
- declare function solToLamports(sol: number): bigint;
2320
- declare function lamportsToSol(lamports: bigint): number;
2321
- declare function formatSol(lamports: bigint, decimals?: number): string;
2322
- declare function parseSolString(solString: string): bigint;
2323
- declare function isTransactionSignature(signature: string): boolean;
2324
- declare function validateStellarAddress(address: string): boolean;
2325
- declare function stroopsToXlm(stroops: string | number): string;
2326
- declare function xlmToStroops(xlm: string | number): string;
2327
- declare function validateBitcoinAddress(address: string): boolean;
2328
- declare function satoshisToBtc(satoshis: string | number): string;
2329
- declare function btcToSatoshis(btc: string | number): string;
2330
- export type BaasService = "auth" | "database" | "storage" | "functions" | "messaging";
2331
- export type BaasSupportedChain = "hedera" | "xrpl" | "polkadot" | "solana";
2332
- export type BaasEndpoints = {
2333
- auth: string;
2334
- database: string;
2335
- storage: string;
2336
- functions: string;
2337
- messaging: string;
2338
- };
2339
- export type DeployedAppStatus = "pending" | "deploying" | "active" | "suspended" | "deleted";
2340
- export type DeployedAppLimits = {
2341
- storage: string;
2342
- functions: number;
2343
- channels: number;
2344
- };
2345
- export type DeployedAppUsage = {
2346
- storage: number;
2347
- functions: number;
2348
- channels: number;
2349
- };
2350
- export type DeployedApp = {
2351
- appId: string;
2352
- name: string;
2353
- services: BaasService[];
2354
- status: DeployedAppStatus;
2355
- owner: string;
2356
- endpoints: BaasEndpoints;
2357
- environment?: Record<string, string>;
2358
- limits: DeployedAppLimits;
2359
- usage: DeployedAppUsage;
2360
- createdAt: string;
2361
- updatedAt?: string;
2362
- };
2363
- export type DeployedAppInfo = {
2364
- appId: string;
2365
- name: string;
2366
- status: "active" | "inactive" | "deploying" | "error";
2367
- services: string[];
2368
- endpoints: BaasEndpoints;
2369
- createdAt: string;
2370
- };
2371
- export type BaasAuthConfig = {
2372
- chain: BaasSupportedChain;
2373
- walletAddress: string;
2479
+ export interface NetworkConnectionConfig {
2480
+ network: "mainnet" | "testnet" | "previewnet";
2481
+ registryTopicId: string;
2482
+ chain: AuthChain;
2483
+ address: string;
2374
2484
  publicKey: string;
2375
- signFn: (message: string) => string | Promise<string>;
2376
- };
2377
- export type BaasClientConfig = {
2378
- hostUrl: string;
2379
- appId?: string;
2380
- appName?: string;
2381
- auth?: BaasAuthConfig;
2382
- services?: BaasService[];
2383
- timeout?: number;
2485
+ signFn: (challenge: string) => string | Promise<string>;
2486
+ metadata?: {
2487
+ appId?: string;
2488
+ appName?: string;
2489
+ };
2490
+ mirrorNodeUrl?: string;
2384
2491
  allowInsecure?: boolean;
2385
- http?: ResilientHttpConfig;
2386
- pathPrefix?: string;
2387
- };
2388
- export type BaasChallengeRequest = {
2389
- chain: BaasSupportedChain;
2390
- walletAddress: string;
2391
- appId: string;
2392
- metadata?: Record<string, unknown>;
2393
- };
2394
- export type BaasChallengeResponse = {
2395
- challengeId: string;
2396
- message: string;
2397
- expiresAt: number;
2398
- chain?: BaasSupportedChain;
2399
- walletAddress?: string;
2400
- appId?: string;
2401
- };
2402
- export type BaasVerifyRequest = {
2403
- challengeId: string;
2404
- signature: string;
2405
- publicKey?: string;
2406
- };
2407
- export type BaasAuthResult = {
2408
- authenticated?: boolean;
2409
- walletAddress: string;
2410
- chain: BaasSupportedChain;
2411
- appId: string;
2412
- token: string;
2413
- expiresAt: number;
2414
- };
2415
- export type BaasSessionInfo = {
2416
- valid: boolean;
2417
- walletAddress?: string;
2418
- chain?: BaasSupportedChain;
2419
- appId?: string;
2420
- permissions?: string[];
2421
- sessionId?: string;
2422
- expiresAt?: number;
2423
- error?: string;
2424
- };
2425
- export type BaasDocument = {
2426
- _id: string;
2427
- data: Record<string, unknown>;
2428
- createdAt: number;
2429
- updatedAt: number;
2430
- version: number;
2431
- };
2432
- export type DbDocument<T = Record<string, unknown>> = {
2433
- _id: string;
2434
- data: T;
2435
- createdAt: number;
2436
- updatedAt: number;
2437
- version: number;
2438
- };
2439
- export type BaasStateTransition = {
2440
- transitionId: string;
2441
- operation: "insert" | "update" | "delete";
2442
- collection: string;
2443
- documentId: string;
2444
- previousHash: string;
2445
- newHash: string;
2446
- stateRoot: string;
2447
- timestamp: number;
2448
- proof: BaasMerkleProof;
2449
- };
2450
- export type BaasMerkleProof = {
2451
- root: string;
2452
- leaf: string;
2453
- siblings: string[];
2454
- path: ("left" | "right")[];
2455
- };
2456
- export type BaasInsertResult = {
2457
- document: BaasDocument;
2458
- stateTransition: BaasStateTransition;
2459
- };
2460
- export type BaasUpdateResult = {
2461
- document: BaasDocument;
2462
- stateTransition: BaasStateTransition;
2463
- };
2464
- export type BaasDeleteResult = {
2465
- deleted: boolean;
2466
- stateTransition: BaasStateTransition;
2467
- };
2468
- export type DbComparisonOperator = {
2469
- $eq?: unknown;
2470
- $ne?: unknown;
2471
- $gt?: number;
2472
- $gte?: number;
2473
- $lt?: number;
2474
- $lte?: number;
2475
- $in?: unknown[];
2476
- $nin?: unknown[];
2477
- $exists?: boolean;
2478
- $regex?: string;
2479
- };
2480
- export type DbQuery = Record<string, unknown | DbComparisonOperator>;
2481
- export type BaasQueryOptions = {
2482
- limit?: number;
2483
- skip?: number;
2484
- sort?: string;
2485
- projection?: Record<string, 0 | 1>;
2486
- };
2487
- export type BaasFindResult = {
2488
- documents: BaasDocument[];
2489
- count: number;
2490
- limit: number;
2491
- skip: number;
2492
+ }
2493
+ export interface ClusterConnectionConfig {
2494
+ bootstrap: string[];
2495
+ chain: AuthChain;
2496
+ address: string;
2497
+ publicKey: string;
2498
+ signFn: (challenge: string) => string | Promise<string>;
2499
+ metadata?: {
2500
+ appId?: string;
2501
+ appName?: string;
2502
+ };
2503
+ trustAnchor?: {
2504
+ network: "mainnet" | "testnet" | "previewnet";
2505
+ registryTopicId: string;
2506
+ mirrorNodeUrl?: string;
2507
+ };
2508
+ allowInsecure?: boolean;
2509
+ }
2510
+ export interface ClusterConnectionResult {
2511
+ client: SmartEngineClient;
2512
+ cluster: ClusterInfo;
2513
+ session: AuthenticateResponse;
2514
+ }
2515
+ export interface NetworkConnectionResult {
2516
+ client: SmartEngineClient;
2517
+ validator: ValidatorInfo;
2518
+ session: AuthenticateResponse;
2519
+ }
2520
+ export declare class SmartEngineClient {
2521
+ private baseUrl;
2522
+ private allowInsecure;
2523
+ private readonly http;
2524
+ private readonly txHttp;
2525
+ private lastHttpError?;
2526
+ readonly subscription: SubscriptionClient;
2527
+ readonly tss: TSSClient;
2528
+ readonly ipfs: IPFSClient;
2529
+ readonly transactions: TransactionsClient;
2530
+ readonly hedera: HederaTransactionsClient;
2531
+ readonly xrpl: XrplTransactionsClient;
2532
+ readonly solana: SolanaTransactionsClient;
2533
+ readonly polkadot: PolkadotTransactionsClient;
2534
+ readonly snapshots: SnapshotsClient;
2535
+ readonly historicalBalance: HistoricalBalanceClient;
2536
+ readonly settlement: SettlementClient;
2537
+ readonly governance: GovernanceClient;
2538
+ readonly personhood: PersonhoodClient;
2539
+ readonly agents: AgentsClient;
2540
+ readonly deployments: DeploymentClient;
2541
+ constructor(config: SmartEngineClientConfig);
2542
+ static fromEnv(env: Record<string, string | undefined>): SmartEngineClient;
2543
+ static connectToNetwork(config: NetworkConnectionConfig): Promise<NetworkConnectionResult>;
2544
+ static connectToCluster(config: ClusterConnectionConfig): Promise<ClusterConnectionResult>;
2545
+ getBaseUrl(): string;
2546
+ isAuthenticated(): boolean;
2547
+ getHttpHealth(): {
2548
+ breaker: CircuitBreakerSnapshot | null;
2549
+ lastError?: Error;
2550
+ };
2551
+ getHealth(): Promise<{
2552
+ status: string;
2553
+ timestamp: string;
2554
+ chains: any[];
2555
+ }>;
2556
+ getSupportedChains(): Promise<{
2557
+ chains: string[];
2558
+ }>;
2559
+ createAccount(request: CreateAccountRequest): Promise<CreateAccountResponse>;
2560
+ getAccountInfo(chain: string, accountId: string): Promise<AccountInfo>;
2561
+ getBalance(chain: string, accountId: string): Promise<AccountBalance>;
2562
+ transfer(request: TransferRequest): Promise<TransferResponse>;
2563
+ getTransaction(chain: string, txId: string): Promise<Transaction>;
2564
+ getTransactionReceipt(chain: string, txId: string): Promise<any>;
2565
+ createToken(request: CreateTokenRequest): Promise<CreateTokenResponse>;
2566
+ mintToken(request: MintTokenRequest): Promise<any>;
2567
+ getTokenInfo(chain: string, tokenId: string): Promise<TokenInfo>;
2568
+ burnToken(request: BurnTokenRequest): Promise<ActionResult>;
2569
+ pauseToken(request: TokenActionRequest): Promise<ActionResult>;
2570
+ unpauseToken(request: TokenActionRequest): Promise<ActionResult>;
2571
+ restrictAccount(request: TokenActionRequest): Promise<ActionResult>;
2572
+ unrestrictAccount(request: TokenActionRequest): Promise<ActionResult>;
2573
+ enableCompliance(request: TokenActionRequest): Promise<ActionResult>;
2574
+ disableCompliance(request: TokenActionRequest): Promise<ActionResult>;
2575
+ wipeFromAccount(request: TokenActionRequest): Promise<ActionResult>;
2576
+ getAllCapabilities(): Promise<any>;
2577
+ getChainCapabilities(chain: ChainType): Promise<any>;
2578
+ getSystemStatus(): Promise<any>;
2579
+ submitMessage(chain: string, topicId: string, message: string): Promise<any>;
2580
+ getClusterHealth(): Promise<{
2581
+ status: string;
2582
+ nodes: number;
2583
+ healthy: number;
2584
+ unhealthy: number;
2585
+ }>;
2586
+ getClusterStatus(): Promise<{
2587
+ status: string;
2588
+ nodeId: string;
2589
+ nodes: Array<{
2590
+ nodeId: string;
2591
+ endpoint: string;
2592
+ status: string;
2593
+ lastSeen?: string;
2594
+ }>;
2595
+ quorum: {
2596
+ required: number;
2597
+ current: number;
2598
+ reached: boolean;
2599
+ };
2600
+ }>;
2601
+ getMetrics(): Promise<string>;
2602
+ getQueueStats(): Promise<{
2603
+ queues: Record<string, {
2604
+ pending: number;
2605
+ processing: number;
2606
+ completed: number;
2607
+ failed: number;
2608
+ }>;
2609
+ timestamp: string;
2610
+ }>;
2611
+ getCircuitBreakerStatus(): Promise<{
2612
+ breakers: Record<string, {
2613
+ state: "closed" | "open" | "half-open";
2614
+ failures: number;
2615
+ successes: number;
2616
+ lastFailure?: string;
2617
+ nextRetry?: string;
2618
+ }>;
2619
+ timestamp: string;
2620
+ }>;
2621
+ verifySignature(request: {
2622
+ chain: ChainType;
2623
+ message: string;
2624
+ signature: string;
2625
+ publicKey: string;
2626
+ }): Promise<{
2627
+ valid: boolean;
2628
+ chain: ChainType;
2629
+ }>;
2630
+ }
2631
+ export type GatewayHealthResponse = {
2632
+ status: "healthy" | "degraded" | "unhealthy";
2633
+ timestamp: string;
2634
+ uptime: number;
2635
+ version: string;
2492
2636
  };
2493
- export type BaasFileMetadata = {
2494
- filename?: string;
2495
- mimeType?: string;
2496
- tags?: Record<string, string>;
2497
- encrypted?: boolean;
2637
+ export type GatewayStatusResponse = {
2638
+ status: string;
2639
+ hosts: {
2640
+ total: number;
2641
+ verified: number;
2642
+ active: number;
2643
+ };
2644
+ domains: {
2645
+ total: number;
2646
+ verified: number;
2647
+ };
2648
+ uptime: number;
2498
2649
  };
2499
- export type BaasUploadResult = {
2500
- cid: string;
2501
- size: number;
2502
- mimeType: string;
2503
- uploadedAt: string;
2504
- filename?: string;
2505
- encrypted?: boolean;
2650
+ export type GatewayReadinessResponse = {
2651
+ ready: boolean;
2652
+ checks: Record<string, boolean>;
2506
2653
  };
2507
- export type BaasFileInfo = {
2508
- cid: string;
2509
- filename?: string;
2510
- size: number;
2511
- mimeType?: string;
2512
- uploadedAt: string;
2513
- lastAccessedAt?: string;
2514
- tags?: Record<string, string>;
2654
+ export type GatewayLivenessResponse = {
2655
+ alive: boolean;
2656
+ timestamp: string;
2515
2657
  };
2516
- export type BaasStorageUsage = {
2517
- totalSize: number;
2518
- fileCount: number;
2658
+ export type GatewayMetricsResponse = {
2659
+ requests: {
2660
+ total: number;
2661
+ successful: number;
2662
+ failed: number;
2663
+ avgLatencyMs: number;
2664
+ };
2665
+ hosts: {
2666
+ total: number;
2667
+ healthy: number;
2668
+ unhealthy: number;
2669
+ };
2670
+ bandwidth: {
2671
+ inbound: number;
2672
+ outbound: number;
2673
+ };
2674
+ timestamp: string;
2519
2675
  };
2520
- export type BaasFunctionRuntime = "nodejs20" | "python3" | "deno";
2521
- export type BaasTriggerType = "http" | "schedule" | "event" | "webhook";
2522
- export type BaasFunctionResources = {
2523
- memory: string;
2524
- timeout: number;
2525
- maxConcurrency?: number;
2676
+ export type GatewayMetricsSummaryResponse = {
2677
+ summary: Record<string, unknown>;
2678
+ period: string;
2679
+ generatedAt: string;
2526
2680
  };
2527
- export type BaasFunctionDeployRequest = {
2681
+ export type RegisterHostRequest = {
2528
2682
  name: string;
2529
- description?: string;
2530
- runtime: BaasFunctionRuntime;
2531
- code: string;
2532
- codeType: "inline" | "ipfs";
2533
- entryPoint?: string;
2534
- triggers?: Array<{
2535
- type: BaasTriggerType;
2536
- config: Record<string, unknown>;
2537
- }>;
2538
- resources?: Partial<BaasFunctionResources>;
2539
- environment?: Record<string, string>;
2683
+ endpoint: string;
2684
+ capabilities?: string[];
2685
+ metadata?: Record<string, unknown>;
2540
2686
  };
2541
- export type BaasFunctionDeployResult = {
2542
- functionId: string;
2543
- version: number;
2544
- deployedAt: string;
2545
- endpoints?: string[];
2546
- status: "active" | "deploying" | "failed";
2547
- error?: string;
2687
+ export type HostInfo = {
2688
+ hostId: string;
2689
+ name: string;
2690
+ endpoint: string;
2691
+ status: "active" | "inactive" | "suspended";
2692
+ verified: boolean;
2693
+ capabilities: string[];
2694
+ lastSeen: string;
2695
+ registeredAt: string;
2696
+ metadata?: Record<string, unknown>;
2548
2697
  };
2549
- export type BaasFunctionResult = {
2550
- requestId: string;
2551
- functionId: string;
2552
- status: "success" | "error" | "timeout";
2553
- result?: unknown;
2554
- error?: string;
2555
- logs?: string[];
2556
- duration: number;
2557
- memoryUsed?: number;
2698
+ export type HostListResponse = {
2699
+ hosts: HostInfo[];
2700
+ total: number;
2558
2701
  };
2559
- export type BaasFunctionInfo = {
2560
- functionId: string;
2561
- name: string;
2562
- runtime: BaasFunctionRuntime;
2563
- version: number;
2564
- status: "active" | "inactive" | "error";
2565
- deployedAt: string;
2566
- lastInvokedAt?: string;
2567
- invocationCount: number;
2702
+ export type RoutingConfig = {
2703
+ strategy: "round-robin" | "least-connections" | "random" | "weighted";
2704
+ healthCheckInterval?: number;
2705
+ timeout?: number;
2706
+ retries?: number;
2707
+ weights?: Record<string, number>;
2568
2708
  };
2569
- export type BaasFunctionLog = {
2570
- timestamp: string;
2571
- level: "debug" | "info" | "warn" | "error";
2572
- message: string;
2573
- requestId?: string;
2574
- metadata?: Record<string, unknown>;
2709
+ export type ProxyRequest = {
2710
+ targetHostId?: string;
2711
+ method: string;
2712
+ path: string;
2713
+ headers?: Record<string, string>;
2714
+ body?: unknown;
2575
2715
  };
2576
- export type BaasFunctionLogOptions = {
2577
- startTime?: string;
2578
- endTime?: string;
2579
- limit?: number;
2580
- level?: "debug" | "info" | "warn" | "error";
2581
- requestId?: string;
2716
+ export type ProxyResponse = {
2717
+ statusCode: number;
2718
+ headers: Record<string, string>;
2719
+ body: unknown;
2720
+ hostId: string;
2721
+ latencyMs: number;
2582
2722
  };
2583
- export type BaasMessage = {
2584
- messageId: string;
2585
- channel: string;
2586
- data: Record<string, unknown>;
2587
- sender?: string;
2588
- timestamp: string;
2589
- metadata?: Record<string, unknown>;
2723
+ export type RoutingStatsResponse = {
2724
+ totalRequests: number;
2725
+ successRate: number;
2726
+ avgLatencyMs: number;
2727
+ hostStats: Record<string, {
2728
+ requests: number;
2729
+ errors: number;
2730
+ avgLatencyMs: number;
2731
+ }>;
2590
2732
  };
2591
- export type MessageHandler = (message: BaasMessage) => void | Promise<void>;
2592
- export type BaasChannelConfig = {
2593
- name: string;
2594
- persistent?: boolean;
2595
- maxHistoryLength?: number;
2596
- presence?: boolean;
2597
- authRequired?: boolean;
2733
+ export type DomainRegistrationRequest = {
2734
+ domain: string;
2735
+ owner: string;
2736
+ registrar?: string;
2737
+ autoRenew?: boolean;
2598
2738
  };
2599
- export type ChannelSubscription = {
2600
- subscriptionId: string;
2601
- channel: string;
2602
- appId: string;
2739
+ export type DomainInfo = {
2740
+ domain: string;
2741
+ owner: string;
2742
+ status: "active" | "pending" | "suspended" | "expired";
2743
+ verified: boolean;
2744
+ registrar?: string;
2745
+ expiresAt?: string;
2603
2746
  createdAt: string;
2604
- active: boolean;
2747
+ dnsConfigured: boolean;
2748
+ dnssecEnabled: boolean;
2605
2749
  };
2606
- export type BaasPresenceMember = {
2607
- clientId: string;
2608
- walletAddress?: string;
2609
- joinedAt: string;
2610
- lastSeenAt: string;
2611
- metadata?: Record<string, unknown>;
2750
+ export type DomainListResponse = {
2751
+ domains: DomainInfo[];
2752
+ total: number;
2612
2753
  };
2613
- export type BaasPresenceInfo = {
2614
- channel: string;
2615
- members: BaasPresenceMember[];
2616
- totalCount: number;
2754
+ export type DomainAvailabilityResponse = {
2755
+ domain: string;
2756
+ available: boolean;
2757
+ premium: boolean;
2758
+ price?: string;
2759
+ suggestions?: string[];
2617
2760
  };
2618
- export type BaasHistoryOptions = {
2619
- limit?: number;
2620
- before?: string;
2621
- after?: string;
2622
- startTime?: string;
2623
- endTime?: string;
2761
+ export type VerificationTokenResponse = {
2762
+ token: string;
2763
+ method: "dns" | "http" | "email";
2764
+ instructions: string;
2765
+ expiresAt: string;
2624
2766
  };
2625
- export type BaasPublishResult = {
2626
- messageId: string;
2627
- channel: string;
2628
- timestamp: string;
2767
+ export type VerificationResult = {
2768
+ verified: boolean;
2769
+ domain: string;
2770
+ method: string;
2771
+ verifiedAt?: string;
2772
+ error?: string;
2629
2773
  };
2630
- export type BaasInitRequest = {
2774
+ export type DnsRecord = {
2775
+ type: "A" | "AAAA" | "CNAME" | "MX" | "TXT" | "NS" | "SRV" | "CAA";
2631
2776
  name: string;
2632
- port: number;
2633
- services: BaasService[];
2634
- limits?: {
2635
- cpu?: string;
2636
- memory?: string;
2637
- };
2777
+ value: string;
2778
+ ttl?: number;
2779
+ priority?: number;
2638
2780
  };
2639
- export type BaasInitResponse = {
2640
- appId: string;
2641
- registry: {
2642
- server: string;
2643
- username: string;
2644
- password: string;
2645
- repository: string;
2646
- };
2781
+ export type DomainTransferRequest = {
2782
+ authCode: string;
2783
+ newRegistrar?: string;
2647
2784
  };
2648
- export type BaasDeployRequest = {
2649
- tag: string;
2650
- replicas?: number;
2651
- env?: Record<string, string>;
2652
- resources?: {
2653
- cpu?: string;
2654
- memory?: string;
2655
- };
2656
- strategy?: "rolling" | "recreate";
2785
+ export type DnsResolveResponse = {
2786
+ name: string;
2787
+ type: string;
2788
+ records: Array<{
2789
+ value: string;
2790
+ ttl: number;
2791
+ }>;
2792
+ dnssec: boolean;
2793
+ timestamp: string;
2657
2794
  };
2658
- export type BaasDeployResponse = {
2659
- appId: string;
2660
- status: string;
2661
- url: string;
2795
+ export type DnsBatchQuery = {
2796
+ name: string;
2797
+ type?: string;
2662
2798
  };
2663
- export type BaasUploadFrontendResponse = {
2664
- bundleSha256: string;
2665
- bundleSizeBytes: number;
2799
+ export type DnsBatchResolveResponse = {
2800
+ results: DnsResolveResponse[];
2801
+ errors: Array<{
2802
+ query: DnsBatchQuery;
2803
+ error: string;
2804
+ }>;
2666
2805
  };
2667
- export type BaasRollbackRequest = {
2668
- toTag: string;
2806
+ export type DnsZone = {
2807
+ zoneName: string;
2808
+ status: "active" | "pending" | "disabled";
2809
+ records: number;
2810
+ dnssecEnabled: boolean;
2811
+ createdAt: string;
2812
+ updatedAt: string;
2669
2813
  };
2670
- export type BaasRuntimeStatus = {
2671
- appId: string;
2672
- state: "PENDING_SUBSCRIPTION" | "ACTIVE" | "SUSPENDED" | "RETIRED";
2673
- runtime?: {
2674
- image: string;
2675
- runtimeState: "NOT_DEPLOYED" | "DEPLOYING" | "RUNNING" | "FAILED" | "DEGRADED";
2676
- replicas: number;
2677
- lastReconciledAt?: string;
2678
- lastError?: string;
2679
- };
2814
+ export type DnsZoneListResponse = {
2815
+ zones: DnsZone[];
2816
+ total: number;
2680
2817
  };
2681
- export type BaasAppListResponse = {
2682
- apps: DeployedAppInfo[];
2818
+ export type DnsRecordInfo = {
2819
+ recordId: string;
2820
+ type: string;
2821
+ name: string;
2822
+ value: string;
2823
+ ttl: number;
2824
+ priority?: number;
2825
+ createdAt: string;
2826
+ updatedAt: string;
2683
2827
  };
2684
- export type BaasErrorResponse = {
2685
- code: string;
2686
- message: string;
2687
- details?: Record<string, unknown>;
2688
- requestId?: string;
2828
+ export type DnssecKey = {
2829
+ keyTag: number;
2830
+ algorithm: string;
2831
+ digestType: string;
2832
+ digest: string;
2833
+ publicKey: string;
2834
+ flags: number;
2689
2835
  };
2690
- export type BaasErrorDetails = {
2691
- code?: string;
2692
- details?: unknown;
2693
- originalError?: string;
2836
+ export type DnssecDsRecord = {
2837
+ keyTag: number;
2838
+ algorithm: number;
2839
+ digestType: number;
2840
+ digest: string;
2841
+ };
2842
+ export declare class RoutingClient {
2843
+ private readonly http;
2844
+ constructor(http: HttpClient);
2845
+ registerHost(request: RegisterHostRequest): Promise<HostInfo>;
2846
+ unregisterHost(hostId: string): Promise<{
2847
+ success: boolean;
2848
+ }>;
2849
+ getAllHosts(): Promise<HostListResponse>;
2850
+ getVerifiedHosts(): Promise<HostListResponse>;
2851
+ getHost(hostId: string): Promise<HostInfo>;
2852
+ verifyHost(hostId: string): Promise<{
2853
+ verified: boolean;
2854
+ message: string;
2855
+ }>;
2856
+ setRoutingConfig(appId: string, config: RoutingConfig): Promise<RoutingConfig>;
2857
+ getRoutingConfig(appId: string): Promise<RoutingConfig>;
2858
+ proxyRequest(request: ProxyRequest): Promise<ProxyResponse>;
2859
+ getStats(): Promise<RoutingStatsResponse>;
2860
+ mapDomainToApp(domain: string, appId: string): Promise<{
2861
+ success: boolean;
2862
+ domain: string;
2863
+ appId: string;
2864
+ }>;
2865
+ }
2866
+ export declare class DomainsClient {
2867
+ private readonly http;
2868
+ constructor(http: HttpClient);
2869
+ register(request: DomainRegistrationRequest): Promise<DomainInfo>;
2870
+ checkAvailability(domain: string): Promise<DomainAvailabilityResponse>;
2871
+ getInfo(domain: string): Promise<DomainInfo>;
2872
+ list(owner?: string): Promise<DomainListResponse>;
2873
+ generateVerificationToken(domain: string, method: "dns" | "http" | "email"): Promise<VerificationTokenResponse>;
2874
+ verifyOwnership(domain: string, token: string): Promise<VerificationResult>;
2875
+ configureDns(domain: string, records: DnsRecord[]): Promise<{
2876
+ success: boolean;
2877
+ records: DnsRecord[];
2878
+ }>;
2879
+ enableDnssec(domain: string): Promise<{
2880
+ success: boolean;
2881
+ message: string;
2882
+ }>;
2883
+ disableDnssec(domain: string): Promise<{
2884
+ success: boolean;
2885
+ message: string;
2886
+ }>;
2887
+ renew(domain: string, years?: number): Promise<DomainInfo>;
2888
+ transfer(domain: string, request: DomainTransferRequest): Promise<{
2889
+ success: boolean;
2890
+ message: string;
2891
+ }>;
2892
+ approveTransfer(domain: string): Promise<{
2893
+ success: boolean;
2894
+ }>;
2895
+ rejectTransfer(domain: string): Promise<{
2896
+ success: boolean;
2897
+ }>;
2898
+ suspend(domain: string, reason: string): Promise<{
2899
+ success: boolean;
2900
+ }>;
2901
+ unsuspend(domain: string): Promise<{
2902
+ success: boolean;
2903
+ }>;
2904
+ }
2905
+ export declare class DnsClient {
2906
+ private readonly http;
2907
+ constructor(http: HttpClient);
2908
+ resolve(name: string, type?: string, dnssec?: boolean): Promise<DnsResolveResponse>;
2909
+ resolveBatch(queries: DnsBatchQuery[]): Promise<DnsBatchResolveResponse>;
2910
+ listZones(): Promise<DnsZoneListResponse>;
2911
+ getZone(zoneName: string): Promise<DnsZone & {
2912
+ records: DnsRecordInfo[];
2913
+ }>;
2914
+ createZone(request: {
2915
+ zoneName: string;
2916
+ description?: string;
2917
+ }): Promise<DnsZone>;
2918
+ deleteZone(zoneName: string): Promise<{
2919
+ success: boolean;
2920
+ }>;
2921
+ addRecord(zoneName: string, record: DnsRecord): Promise<DnsRecordInfo>;
2922
+ updateRecord(zoneName: string, recordId: string, updates: Partial<DnsRecord>): Promise<DnsRecordInfo>;
2923
+ deleteRecord(zoneName: string, recordId: string): Promise<{
2924
+ success: boolean;
2925
+ }>;
2926
+ generateDnssecKeys(zoneName: string, algorithm?: string): Promise<{
2927
+ keys: DnssecKey[];
2928
+ }>;
2929
+ getDnssecKeys(zoneName: string): Promise<{
2930
+ keys: DnssecKey[];
2931
+ }>;
2932
+ getDsRecord(zoneName: string): Promise<DnssecDsRecord>;
2933
+ clearCache(): Promise<{
2934
+ success: boolean;
2935
+ entriesCleared: number;
2936
+ }>;
2937
+ }
2938
+ export type SmartGatewayClientConfig = {
2939
+ baseUrl: string;
2940
+ apiKey?: string;
2941
+ authToken?: string;
2942
+ timeout?: number;
2943
+ allowInsecure?: boolean;
2694
2944
  };
2945
+ export declare class SmartGatewayClient {
2946
+ private readonly http;
2947
+ readonly routing: RoutingClient;
2948
+ readonly domains: DomainsClient;
2949
+ readonly dns: DnsClient;
2950
+ constructor(config: SmartGatewayClientConfig);
2951
+ getHealth(): Promise<GatewayHealthResponse>;
2952
+ getStatus(): Promise<GatewayStatusResponse>;
2953
+ getReadiness(): Promise<GatewayReadinessResponse>;
2954
+ getLiveness(): Promise<GatewayLivenessResponse>;
2955
+ getMetrics(refresh?: boolean): Promise<GatewayMetricsResponse>;
2956
+ getMetricsSummary(): Promise<GatewayMetricsSummaryResponse>;
2957
+ }
2958
+ declare function formatHederaAccountId(id: string): string;
2959
+ declare function parseHbar(amount: string): number;
2960
+ declare function hbarToTinybars(hbar: string | number): string;
2961
+ declare function tinybarsToHbar(tinybars: string | number): string;
2962
+ declare function formatHederaTokenId(id: string): string;
2963
+ declare function formatHederaTopicId(id: string): string;
2964
+ declare function validateXRPLAddress(address: string): boolean;
2965
+ declare function formatXRPLAddress(address: string): string;
2966
+ declare function xrpToDrops(xrp: string | number): string;
2967
+ declare function dropsToXrp(drops: string | number): string;
2968
+ declare function parseXRP(amount: string): number;
2969
+ declare function validateCurrencyCode(code: string): boolean;
2970
+ declare function validatePolkadotAddress(address: string): boolean;
2971
+ declare function formatPolkadotAddress(address: string, prefixLength?: number, suffixLength?: number): string;
2972
+ declare function dotToPlanck(dot: number): bigint;
2973
+ declare function planckToDot(planck: bigint): number;
2974
+ declare function formatDot(planck: bigint, decimals?: number): string;
2975
+ declare function parseDotString(dotString: string): bigint;
2976
+ declare function validateSolanaPublicKey(publicKey: string): boolean;
2977
+ declare function formatSolanaAddress(address: string, prefixLength?: number, suffixLength?: number): string;
2978
+ declare function solToLamports(sol: number): bigint;
2979
+ declare function lamportsToSol(lamports: bigint): number;
2980
+ declare function formatSol(lamports: bigint, decimals?: number): string;
2981
+ declare function parseSolString(solString: string): bigint;
2982
+ declare function isTransactionSignature(signature: string): boolean;
2983
+ declare function validateStellarAddress(address: string): boolean;
2984
+ declare function stroopsToXlm(stroops: string | number): string;
2985
+ declare function xlmToStroops(xlm: string | number): string;
2986
+ declare function validateBitcoinAddress(address: string): boolean;
2987
+ declare function satoshisToBtc(satoshis: string | number): string;
2988
+ declare function btcToSatoshis(btc: string | number): string;
2695
2989
  export type StateRootResponse = {
2696
2990
  appId: string;
2697
2991
  stateRoot: string;
@@ -2817,157 +3111,6 @@ export declare class MessagingClient {
2817
3111
  getPresence(channel: string): Promise<BaasPresenceInfo>;
2818
3112
  getStats(): Promise<any>;
2819
3113
  }
2820
- export declare class DeploymentClient {
2821
- private readonly http;
2822
- constructor(http: HttpClient);
2823
- init(request: BaasInitRequest): Promise<BaasInitResponse>;
2824
- uploadFrontend(appId: string, bundle: Blob | Buffer, filename?: string): Promise<BaasUploadFrontendResponse>;
2825
- deploy(appId: string, request: BaasDeployRequest): Promise<BaasDeployResponse>;
2826
- rollback(appId: string, request: BaasRollbackRequest): Promise<BaasDeployResponse>;
2827
- status(appId: string): Promise<BaasRuntimeStatus>;
2828
- list(): Promise<BaasAppListResponse>;
2829
- get(appId: string): Promise<DeployedAppInfo>;
2830
- update(appId: string, updates: Partial<BaasDeployRequest>): Promise<DeployedAppInfo>;
2831
- delete(appId: string): Promise<{
2832
- success: boolean;
2833
- }>;
2834
- suspend(appId: string): Promise<{
2835
- success: boolean;
2836
- status: string;
2837
- }>;
2838
- resume(appId: string): Promise<{
2839
- success: boolean;
2840
- status: string;
2841
- }>;
2842
- getStats(): Promise<{
2843
- totalApps: number;
2844
- activeApps: number;
2845
- totalOwners: number;
2846
- }>;
2847
- }
2848
- export type AgentStatus = "active" | "paused" | "revoked" | "pending";
2849
- export type AgentRegisterRequest = {
2850
- name: string;
2851
- description?: string;
2852
- capabilities: string[];
2853
- rules: AgentRules;
2854
- fundingConfig?: {
2855
- chain: string;
2856
- maxAmount: string;
2857
- autoFund: boolean;
2858
- };
2859
- };
2860
- export type AgentRules = {
2861
- maxTradeAmount?: string;
2862
- allowedPairs?: string[];
2863
- allowedChains?: string[];
2864
- dailyLimit?: string;
2865
- requireApprovalAbove?: string;
2866
- customRules?: Record<string, unknown>;
2867
- };
2868
- export type AgentRulesValidationResult = {
2869
- valid: boolean;
2870
- errors: string[];
2871
- };
2872
- export declare function validateAgentRules(rules: AgentRules): AgentRulesValidationResult;
2873
- export type AgentInfo = {
2874
- agentId: string;
2875
- name: string;
2876
- description?: string;
2877
- status: AgentStatus;
2878
- capabilities: string[];
2879
- rules: AgentRules;
2880
- owner: string;
2881
- createdAt: string;
2882
- lastActiveAt?: string;
2883
- };
2884
- export type AgentEvent = {
2885
- eventId: string;
2886
- agentId: string;
2887
- type: string;
2888
- data: Record<string, unknown>;
2889
- timestamp: string;
2890
- };
2891
- export type AgentBalance = {
2892
- chain: string;
2893
- accountId: string;
2894
- balance: string;
2895
- symbol: string;
2896
- };
2897
- export type AgentOperation = {
2898
- operationId: string;
2899
- agentId: string;
2900
- type: string;
2901
- amount: string;
2902
- chain: string;
2903
- status: "pending" | "approved" | "rejected";
2904
- createdAt: string;
2905
- };
2906
- export type AgentFundRequest = {
2907
- chain: string;
2908
- amount: string;
2909
- source?: string;
2910
- };
2911
- export type AgentTradeRequest = {
2912
- chain: string;
2913
- pair: string;
2914
- side: "buy" | "sell";
2915
- amount: string;
2916
- price?: string;
2917
- };
2918
- export type AgentWithdrawRequest = {
2919
- chain: string;
2920
- amount: string;
2921
- destination: string;
2922
- };
2923
- export declare class AgentsClient {
2924
- private readonly http;
2925
- constructor(http: HttpClient);
2926
- register(request: AgentRegisterRequest): Promise<AgentInfo>;
2927
- get(agentId: string): Promise<AgentInfo>;
2928
- list(): Promise<{
2929
- agents: AgentInfo[];
2930
- total: number;
2931
- }>;
2932
- fund(agentId: string, request: AgentFundRequest): Promise<{
2933
- success: boolean;
2934
- txId?: string;
2935
- }>;
2936
- trade(agentId: string, request: AgentTradeRequest): Promise<{
2937
- success: boolean;
2938
- txId?: string;
2939
- }>;
2940
- withdraw(agentId: string, request: AgentWithdrawRequest): Promise<{
2941
- success: boolean;
2942
- txId?: string;
2943
- }>;
2944
- pause(agentId: string): Promise<{
2945
- success: boolean;
2946
- status: string;
2947
- }>;
2948
- resume(agentId: string): Promise<{
2949
- success: boolean;
2950
- status: string;
2951
- }>;
2952
- revoke(agentId: string): Promise<{
2953
- success: boolean;
2954
- status: string;
2955
- }>;
2956
- updateRules(agentId: string, rules: Partial<AgentRules>): Promise<AgentInfo>;
2957
- getEvents(agentId: string): Promise<{
2958
- events: AgentEvent[];
2959
- total: number;
2960
- }>;
2961
- getBalances(agentId: string): Promise<{
2962
- balances: AgentBalance[];
2963
- }>;
2964
- approve(agentId: string, operationId: string): Promise<{
2965
- success: boolean;
2966
- }>;
2967
- reject(agentId: string, operationId: string): Promise<{
2968
- success: boolean;
2969
- }>;
2970
- }
2971
3114
  export type CustomerSessionChallenge = {
2972
3115
  challenge: string;
2973
3116
  };
@@ -3062,6 +3205,99 @@ export declare class BaasError extends Error {
3062
3205
  readonly details?: BaasErrorDetails | undefined;
3063
3206
  constructor(message: string, statusCode: number, details?: BaasErrorDetails | undefined);
3064
3207
  }
3208
+ export declare const PqcCertV1Schema: z.ZodObject<{
3209
+ pqcCertVersion: z.ZodLiteral<1>;
3210
+ algorithm: z.ZodLiteral<"ml-dsa-87">;
3211
+ consumer: z.ZodString;
3212
+ contentHash: z.ZodString;
3213
+ payloadHash: z.ZodOptional<z.ZodString>;
3214
+ threshold: z.ZodNumber;
3215
+ signers: z.ZodArray<z.ZodObject<{
3216
+ nodeId: z.ZodString;
3217
+ dilithium5PublicKey: z.ZodString;
3218
+ signature: z.ZodString;
3219
+ }, "strip", z.ZodTypeAny, {
3220
+ nodeId: string;
3221
+ signature: string;
3222
+ dilithium5PublicKey: string;
3223
+ }, {
3224
+ nodeId: string;
3225
+ signature: string;
3226
+ dilithium5PublicKey: string;
3227
+ }>, "atleastone">;
3228
+ ts: z.ZodNumber;
3229
+ topicMessageId: z.ZodOptional<z.ZodString>;
3230
+ }, "strict", z.ZodTypeAny, {
3231
+ threshold: number;
3232
+ signers: [
3233
+ {
3234
+ nodeId: string;
3235
+ signature: string;
3236
+ dilithium5PublicKey: string;
3237
+ },
3238
+ ...{
3239
+ nodeId: string;
3240
+ signature: string;
3241
+ dilithium5PublicKey: string;
3242
+ }[]
3243
+ ];
3244
+ algorithm: "ml-dsa-87";
3245
+ pqcCertVersion: 1;
3246
+ consumer: string;
3247
+ contentHash: string;
3248
+ ts: number;
3249
+ payloadHash?: string | undefined;
3250
+ topicMessageId?: string | undefined;
3251
+ }, {
3252
+ threshold: number;
3253
+ signers: [
3254
+ {
3255
+ nodeId: string;
3256
+ signature: string;
3257
+ dilithium5PublicKey: string;
3258
+ },
3259
+ ...{
3260
+ nodeId: string;
3261
+ signature: string;
3262
+ dilithium5PublicKey: string;
3263
+ }[]
3264
+ ];
3265
+ algorithm: "ml-dsa-87";
3266
+ pqcCertVersion: 1;
3267
+ consumer: string;
3268
+ contentHash: string;
3269
+ ts: number;
3270
+ payloadHash?: string | undefined;
3271
+ topicMessageId?: string | undefined;
3272
+ }>;
3273
+ export type PqcCertV1 = z.infer<typeof PqcCertV1Schema>;
3274
+ export type PqcCertV1Signer = PqcCertV1["signers"][number];
3275
+ export declare function parsePqcCert(input: unknown): {
3276
+ ok: true;
3277
+ cert: PqcCertV1;
3278
+ } | {
3279
+ ok: false;
3280
+ error: string;
3281
+ };
3282
+ export type ValidatorRegistrySnapshot = {
3283
+ readonly snapshotTs: number;
3284
+ readonly validators: readonly {
3285
+ readonly nodeId: string;
3286
+ readonly dilithium5PublicKey: string;
3287
+ readonly active: boolean;
3288
+ }[];
3289
+ };
3290
+ export type FetchRegistryOptions = {
3291
+ readonly timeoutMs?: number;
3292
+ };
3293
+ export declare function fetchRegistrySnapshot(smartHostUrl: string, opts?: FetchRegistryOptions): Promise<ValidatorRegistrySnapshot | null>;
3294
+ export type VerifyResult = {
3295
+ readonly valid: boolean;
3296
+ readonly reason?: string;
3297
+ readonly verifiedSignerCount?: number;
3298
+ readonly thresholdMet?: boolean;
3299
+ };
3300
+ export declare function verifyPqcAttestation(cert: unknown, payload: unknown, registrySnapshot?: ValidatorRegistrySnapshot): Promise<VerifyResult>;
3065
3301
 
3066
3302
  declare namespace bitcoin {
3067
3303
  export { btcToSatoshis, satoshisToBtc, validateBitcoinAddress };
@@ -3081,14 +3317,14 @@ declare namespace solana {
3081
3317
  declare namespace stellar {
3082
3318
  export { stroopsToXlm, validateStellarAddress, xlmToStroops };
3083
3319
  }
3084
- declare namespace baas {
3085
- export { AgentBalance, AgentEvent, AgentFundRequest, AgentInfo, AgentOperation, AgentRegisterRequest, AgentRules, AgentRulesValidationResult, AgentStatus, AgentTradeRequest, AgentWithdrawRequest, AgentsClient, AuthenticateOptions, BaasAppListResponse, BaasAuthConfig, BaasAuthResult, BaasChallengeRequest, BaasChallengeResponse, BaasChannelConfig, BaasClient, BaasClientConfig, BaasDeleteResult, BaasDeployRequest, BaasDeployResponse, BaasDocument, BaasEndpoints, BaasError, BaasErrorDetails, BaasErrorResponse, BaasFileInfo, BaasFileMetadata, BaasFindResult, BaasFunctionDeployRequest, BaasFunctionDeployResult, BaasFunctionInfo, BaasFunctionLog, BaasFunctionLogOptions, BaasFunctionResources, BaasFunctionResult, BaasFunctionRuntime, BaasHistoryOptions, BaasInitRequest, BaasInitResponse, BaasInsertResult, BaasMerkleProof, BaasMessage, BaasPresenceInfo, BaasPresenceMember, BaasPublishResult, BaasQueryOptions, BaasRollbackRequest, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasStateTransition, BaasStorageUsage, BaasSupportedChain, BaasTriggerType, BaasUpdateResult, BaasUploadFrontendResponse, BaasUploadResult, BaasVerifyRequest, ChannelSubscription, DatabaseClient, DatabaseStatsResponse, DbComparisonOperator, DbDocument, DbQuery, DeployedApp, DeployedAppInfo, DeployedAppLimits, DeployedAppStatus, DeployedAppUsage, DeploymentClient, DocumentProofResponse, FunctionsClient, MessageHandler, MessagingClient, StateRootResponse, StateTransitionsResponse, StorageClient, validateAgentRules };
3320
+ declare namespace pqcVerify {
3321
+ export { FetchRegistryOptions, PqcCertV1, PqcCertV1Schema, PqcCertV1Signer, ValidatorRegistrySnapshot, VerifyResult, fetchRegistrySnapshot, parsePqcCert, verifyPqcAttestation };
3086
3322
  }
3087
3323
  declare namespace discovery {
3088
3324
  export { ClusterDiscoveryClient, ClusterDiscoveryConfig, ClusterEndpointsView, ClusterInfo, MIRROR_NODE_URLS, MirrorNodeClient, MirrorNodeConfig, MirrorNodeError, TopicMessage, TopicMessagesResponse, ValidatorDiscoveryClient, ValidatorDiscoveryConfig, ValidatorInfo, ValidatorMetadata, ValidatorNetworkEndpoints };
3089
3325
  }
3090
3326
  declare namespace auth {
3091
- export { AuthChain, AuthenticateRequest, AuthenticateResponse, ChallengeResponse, SecurityConfig, SessionInfo, ValidatorAuthClient, ValidatorAuthConfig, ValidatorAuthError };
3327
+ export { AuthChain, AuthenticateRequest, AuthenticateResponse, ChallengeResponse, SecurityConfig, SessionInfo, ValidatorAuthClient, ValidatorAuthConfig, ValidatorAuthError, Web3Signer, createXrplWeb3Signer };
3092
3328
  }
3093
3329
  declare namespace chains {
3094
3330
  export { bitcoin, hedera, polkadot, solana, stellar, xrpl };
@@ -3105,6 +3341,9 @@ declare namespace governance {
3105
3341
  declare namespace personhood {
3106
3342
  export { PERSONHOOD_VERIFIER_NOT_CONFIGURED, PersonhoodAttestationMethod, PersonhoodCert, PersonhoodClient, PersonhoodProof, PersonhoodVerifyParams, isPersonhoodVerifierNotConfigured };
3107
3343
  }
3344
+ declare namespace baas {
3345
+ export { AgentBalance, AgentEvent, AgentFundRequest, AgentInfo, AgentOperation, AgentRegisterRequest, AgentRules, AgentRulesValidationResult, AgentStatus, AgentTradeRequest, AgentWithdrawRequest, AgentsClient, AuthenticateOptions, BaasAppListResponse, BaasAuthConfig, BaasAuthResult, BaasChallengeRequest, BaasChallengeResponse, BaasChannelConfig, BaasClient, BaasClientConfig, BaasDeleteResult, BaasDeployRequest, BaasDeployResponse, BaasDocument, BaasEndpoints, BaasError, BaasErrorDetails, BaasErrorResponse, BaasFileInfo, BaasFileMetadata, BaasFindResult, BaasFunctionDeployRequest, BaasFunctionDeployResult, BaasFunctionInfo, BaasFunctionLog, BaasFunctionLogOptions, BaasFunctionResources, BaasFunctionResult, BaasFunctionRuntime, BaasHistoryOptions, BaasInitRequest, BaasInitResponse, BaasInsertResult, BaasMerkleProof, BaasMessage, BaasPresenceInfo, BaasPresenceMember, BaasPublishResult, BaasQueryOptions, BaasRollbackRequest, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasStateTransition, BaasStorageUsage, BaasSupportedChain, BaasTriggerType, BaasUpdateResult, BaasUploadFrontendResponse, BaasUploadResult, BaasVerifyRequest, ChannelSubscription, DatabaseClient, DatabaseStatsResponse, DbComparisonOperator, DbDocument, DbQuery, DeployedApp, DeployedAppInfo, DeployedAppLimits, DeployedAppStatus, DeployedAppUsage, DeploymentClient, DocumentProofResponse, FunctionsClient, MessageHandler, MessagingClient, StateRootResponse, StateTransitionsResponse, StorageClient, validateAgentRules };
3346
+ }
3108
3347
 
3109
3348
  export {
3110
3349
  RetryConfig as ResilienceRetryConfig,
@@ -3115,6 +3354,7 @@ export {
3115
3354
  discovery,
3116
3355
  governance,
3117
3356
  personhood,
3357
+ pqcVerify,
3118
3358
  settlement,
3119
3359
  subscription,
3120
3360
  };