@hsuite/smart-engines-sdk 3.4.1 → 3.5.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 +59 -0
- package/README.md +124 -27
- package/dist/index.d.ts +67 -53
- package/dist/index.js +454 -457
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.ts +4 -43
- package/dist/nestjs/index.js +438 -442
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +2 -1
package/dist/nestjs/index.d.ts
CHANGED
|
@@ -4,13 +4,6 @@ import { DynamicModule, OnModuleDestroy, OnModuleInit, Type } from '@nestjs/comm
|
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
|
|
6
6
|
export type CircuitState = "closed" | "open" | "half_open";
|
|
7
|
-
export interface CircuitBreakerConfig {
|
|
8
|
-
failureThreshold: number;
|
|
9
|
-
rollingWindowMs: number;
|
|
10
|
-
cooldownMs: number;
|
|
11
|
-
failureFilter?: string[];
|
|
12
|
-
name?: string;
|
|
13
|
-
}
|
|
14
7
|
export interface CircuitBreakerSnapshot {
|
|
15
8
|
state: CircuitState;
|
|
16
9
|
failureCount: number;
|
|
@@ -1551,6 +1544,8 @@ export type HttpClient = {
|
|
|
1551
1544
|
delete<T = any>(path: string): Promise<T>;
|
|
1552
1545
|
getText(path: string): Promise<string>;
|
|
1553
1546
|
upload<T = any>(path: string, file: Blob | Buffer, filename: string, metadata?: Record<string, string>, fieldName?: string): Promise<T>;
|
|
1547
|
+
setAuthToken(token: string | undefined): void;
|
|
1548
|
+
getAuthToken(): string | undefined;
|
|
1554
1549
|
};
|
|
1555
1550
|
export type DiscoveryClusterEndpoints = {
|
|
1556
1551
|
clusterId: string;
|
|
@@ -1622,6 +1617,7 @@ declare class PlatformImagesClient {
|
|
|
1622
1617
|
}>;
|
|
1623
1618
|
verify(imageName: string, version: string, digest: string): Promise<DiscoveryVerifyResult>;
|
|
1624
1619
|
}
|
|
1620
|
+
export type NetworkName = "testnet" | "mainnet";
|
|
1625
1621
|
export type AuthChain = "hedera" | "xrpl" | "polkadot" | "stellar" | "solana";
|
|
1626
1622
|
export interface AuthenticateResponse {
|
|
1627
1623
|
token: string;
|
|
@@ -1630,21 +1626,6 @@ export interface AuthenticateResponse {
|
|
|
1630
1626
|
expiresAt: string;
|
|
1631
1627
|
message: string;
|
|
1632
1628
|
}
|
|
1633
|
-
export interface RetryConfig {
|
|
1634
|
-
maxRetries: number;
|
|
1635
|
-
initialDelayMs: number;
|
|
1636
|
-
maxDelayMs: number;
|
|
1637
|
-
backoffMultiplier: number;
|
|
1638
|
-
jitterFactor?: number;
|
|
1639
|
-
}
|
|
1640
|
-
export interface ResilientHttpConfig {
|
|
1641
|
-
timeoutMs?: number;
|
|
1642
|
-
retry?: Partial<RetryConfig>;
|
|
1643
|
-
circuitBreaker?: Partial<CircuitBreakerConfig> | false;
|
|
1644
|
-
onRetry?: (attempt: number, delay: number, status?: number) => void;
|
|
1645
|
-
onCircuitBreakerStateChange?: (state: "closed" | "open" | "half_open") => void;
|
|
1646
|
-
}
|
|
1647
|
-
export type NetworkName = "testnet" | "mainnet";
|
|
1648
1629
|
export type SubscriptionTierName = "free_testnet" | "starter" | "professional" | "enterprise";
|
|
1649
1630
|
export type SubscriptionStatus = "pending_deposit" | "deposit_confirmed" | "active" | "expired" | "cancelled";
|
|
1650
1631
|
export type DepositWalletStatus = "pending" | "locked" | "expired" | "slashed" | "released";
|
|
@@ -2481,7 +2462,7 @@ export type PrepareTokenWipeRequest = {
|
|
|
2481
2462
|
declare class HederaTransactionsClient {
|
|
2482
2463
|
private readonly http;
|
|
2483
2464
|
readonly tss: HederaTssClient;
|
|
2484
|
-
constructor(http: HttpClient, tssHttp
|
|
2465
|
+
constructor(http: HttpClient, tssHttp: HttpClient);
|
|
2485
2466
|
prepareTopicCreate(request: PrepareTopicCreateRequest): Promise<PreparedTransaction>;
|
|
2486
2467
|
prepareTopicMessage(request: PrepareTopicMessageRequest): Promise<PreparedTransaction>;
|
|
2487
2468
|
prepareTokenComplianceEnable(request: PrepareTokenComplianceEnableRequest): Promise<PreparedTransaction>;
|
|
@@ -3342,7 +3323,6 @@ export type BaasClientConfig = {
|
|
|
3342
3323
|
services?: BaasService[];
|
|
3343
3324
|
timeout?: number;
|
|
3344
3325
|
allowInsecure?: boolean;
|
|
3345
|
-
http?: ResilientHttpConfig;
|
|
3346
3326
|
pathPrefix?: string;
|
|
3347
3327
|
};
|
|
3348
3328
|
export type BaasAuthResult = {
|
|
@@ -3898,18 +3878,6 @@ export type TokenMigrationsForTokenResponse = {
|
|
|
3898
3878
|
migrations: TokenMigrationStatus[];
|
|
3899
3879
|
count: number;
|
|
3900
3880
|
};
|
|
3901
|
-
export type TokenDetailsResponse = {
|
|
3902
|
-
chain: string;
|
|
3903
|
-
tokenId: string;
|
|
3904
|
-
name?: string;
|
|
3905
|
-
symbol?: string;
|
|
3906
|
-
totalSupply?: string;
|
|
3907
|
-
adminKey?: string | null;
|
|
3908
|
-
supplyKey?: string | null;
|
|
3909
|
-
tssControlled?: boolean;
|
|
3910
|
-
entityId?: string;
|
|
3911
|
-
message?: string;
|
|
3912
|
-
};
|
|
3913
3881
|
declare class TokensClient {
|
|
3914
3882
|
private readonly http;
|
|
3915
3883
|
constructor(http: HttpClient);
|
|
@@ -3919,7 +3887,6 @@ declare class TokensClient {
|
|
|
3919
3887
|
error: string;
|
|
3920
3888
|
}>;
|
|
3921
3889
|
getMigrationsForToken(tokenId: string): Promise<TokenMigrationsForTokenResponse>;
|
|
3922
|
-
getDetails(chain: string, tokenId: string): Promise<TokenDetailsResponse>;
|
|
3923
3890
|
}
|
|
3924
3891
|
export type OperatorChain = "hedera";
|
|
3925
3892
|
export type OperatorTokenBalance = {
|
|
@@ -3954,7 +3921,6 @@ export interface SmartEngineClientConfig {
|
|
|
3954
3921
|
authToken?: string;
|
|
3955
3922
|
timeout?: number;
|
|
3956
3923
|
allowInsecure?: boolean;
|
|
3957
|
-
http?: ResilientHttpConfig;
|
|
3958
3924
|
}
|
|
3959
3925
|
export interface NetworkConnectionConfig {
|
|
3960
3926
|
network: "mainnet" | "testnet" | "previewnet";
|
|
@@ -12267,7 +12233,6 @@ declare class BaasClient {
|
|
|
12267
12233
|
private appId;
|
|
12268
12234
|
private readonly timeout;
|
|
12269
12235
|
private readonly allowInsecure;
|
|
12270
|
-
private authToken;
|
|
12271
12236
|
private readonly http;
|
|
12272
12237
|
private lastHttpError?;
|
|
12273
12238
|
readonly db: DatabaseClient;
|
|
@@ -12294,10 +12259,6 @@ declare class BaasClient {
|
|
|
12294
12259
|
validateSession(): Promise<BaasSessionInfo>;
|
|
12295
12260
|
logout(): Promise<void>;
|
|
12296
12261
|
private requireAuth;
|
|
12297
|
-
private getHeaders;
|
|
12298
|
-
private post;
|
|
12299
|
-
private get;
|
|
12300
|
-
private request;
|
|
12301
12262
|
}
|
|
12302
12263
|
export interface SmartEngineServiceConfig extends SmartEngineClientConfig {
|
|
12303
12264
|
testConnection?: boolean;
|