@hsuite/smart-engines-sdk 3.7.0 → 3.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.8.0 — 2026-06-17
4
+
5
+ ### Added
6
+
7
+ - **`BaasClient` now exposes `transactions` (prepare/execute), validator-routed.** The host-routed `BaasClient` gains a `transactions` arm (`TransactionsClient`) so showcase/CLI consumers can drive the sovereignty prepare/execute flow without constructing a separate `SmartEngineClient`. It targets the validator's `/api/transactions/*` routes — a sibling of the `/host` BaaS surface, rooted at the raw gateway/ingress origin (`hostUrl`), NOT under the `pathPrefix`. The prepare endpoints accept an explicit `payerAccountId` (session-less payer) OR carry the web3-auth session token for the JWT-wallet payer path; the token is kept in lock-step with the main client's via `authenticate` / `reauthenticate` / `logout`.
8
+
3
9
  ## 3.6.1 — 2026-06-15
4
10
 
5
11
  ### Fixed
package/README.md CHANGED
@@ -54,7 +54,7 @@ await baas.authenticate({
54
54
  },
55
55
  });
56
56
 
57
- // 4. Initialise a free_testnet smart-app via the four-step deploy flow
57
+ // 4. Initialise a smart-app via the four-step deploy flow
58
58
  // (init → docker push → optional uploadFrontend → deploy). `init` runs
59
59
  // the per-entity DKG ceremony on the cluster and returns the DKG entityId
60
60
  // as `appId`, plus ephemeral push credentials for the cluster's per-tenant
package/dist/index.d.ts CHANGED
@@ -2164,7 +2164,7 @@ export type Web3Signer = {
2164
2164
  wallet: Wallet;
2165
2165
  };
2166
2166
  export declare function createXrplWeb3Signer(seed: string): Web3Signer;
2167
- export type SubscriptionTierName = "free_testnet" | "starter" | "professional" | "enterprise";
2167
+ export type SubscriptionTierName = "builder" | "growth" | "scale" | "enterprise";
2168
2168
  export type SubscriptionStatus = "pending_deposit" | "deposit_confirmed" | "active" | "expired" | "cancelled";
2169
2169
  export type DepositWalletStatus = "pending" | "locked" | "expired" | "slashed" | "released";
2170
2170
  export type SubscriptionTierInfo = {
@@ -4249,6 +4249,7 @@ export type BaasInitResponse = {
4249
4249
  repository: string;
4250
4250
  };
4251
4251
  };
4252
+ export type BaasReissuePushCredentialsResponse = BaasInitResponse;
4252
4253
  export type BaasDeployRequest = {
4253
4254
  tag: string;
4254
4255
  port?: number;
@@ -4319,6 +4320,8 @@ export declare class DeploymentClient {
4319
4320
  private readonly http;
4320
4321
  constructor(http: HttpClient);
4321
4322
  init(request: BaasInitRequest): Promise<BaasInitResponse>;
4323
+ pushCredentials(appId: string): Promise<BaasInitResponse>;
4324
+ reissuePushCredentials(appId: string): Promise<BaasReissuePushCredentialsResponse>;
4322
4325
  uploadFrontend(appId: string, bundle: Blob | Buffer, filename?: string): Promise<BaasUploadFrontendResponse>;
4323
4326
  deploy(appId: string, request: BaasDeployRequest): Promise<BaasDeployResponse>;
4324
4327
  rollback(appId: string, request: BaasRollbackRequest): Promise<BaasDeployResponse>;
@@ -5507,7 +5510,7 @@ export type CustomerSessionInfo = {
5507
5510
  customerAddress: string;
5508
5511
  subscriptionContext?: {
5509
5512
  nftSerial: number;
5510
- tier: "free_testnet" | "starter" | "professional" | "enterprise";
5513
+ tier: "builder" | "growth" | "scale" | "enterprise";
5511
5514
  expiresAt: string;
5512
5515
  allowedAutomations?: string[];
5513
5516
  };
@@ -25151,17 +25154,40 @@ type CreateTokenRequest$1 = {
25151
25154
  initialSupply?: string;
25152
25155
  ruleRef: RuleRef;
25153
25156
  memo?: string;
25157
+ securityMode?: EntitySecurityMode;
25158
+ payerAccountId?: string;
25159
+ fundWith?: FundWith;
25160
+ };
25161
+ export type EntitySecurityMode = "partial" | "full";
25162
+ export type PreparedEntityCreation = {
25163
+ entityId: string;
25164
+ chain: ChainType;
25165
+ address: string;
25166
+ reserveRequirement: string;
25167
+ prepared: PreparedTransaction[];
25154
25168
  };
25169
+ export type FundWith = (prepared: PreparedTransaction[], ctx: {
25170
+ address: string;
25171
+ reserveRequirement: string;
25172
+ }) => Promise<{
25173
+ signedFundingBlob?: string;
25174
+ } | void>;
25155
25175
  type CreateAccountRequest$1 = {
25156
25176
  chain: ChainType;
25157
25177
  ruleRef: RuleRef;
25158
25178
  initialBalance?: string;
25159
25179
  publicKey?: string;
25180
+ securityMode?: EntitySecurityMode;
25181
+ payerAccountId?: string;
25182
+ fundWith?: FundWith;
25160
25183
  };
25161
25184
  export type CreateTopicRequest = {
25162
25185
  chain: ChainType;
25163
25186
  ruleRef: RuleRef;
25164
25187
  memo?: string;
25188
+ securityMode?: EntitySecurityMode;
25189
+ payerAccountId?: string;
25190
+ fundWith?: FundWith;
25165
25191
  };
25166
25192
  export type CreateAgentRequest = {
25167
25193
  primaryChain: ChainType;
@@ -25221,8 +25247,34 @@ export type LaunchpadEntityResult = {
25221
25247
  export declare class EntitiesClient {
25222
25248
  private readonly http;
25223
25249
  constructor(http: HttpClient);
25250
+ private static readonly PAYER_FUNDED_TOKEN_CHAINS;
25251
+ prepareCreateToken(req: Omit<CreateTokenRequest$1, "fundWith">): Promise<PreparedEntityCreation>;
25252
+ executeCreateToken(req: {
25253
+ entityId: string;
25254
+ chain: ChainType;
25255
+ securityMode?: EntitySecurityMode;
25256
+ createTxId?: string;
25257
+ signedFundingBlob?: string;
25258
+ }): Promise<EntityCreationResult>;
25224
25259
  createToken(req: CreateTokenRequest$1): Promise<EntityCreationResult>;
25260
+ prepareCreateAccount(req: Omit<CreateAccountRequest$1, "fundWith">): Promise<PreparedEntityCreation>;
25261
+ executeCreateAccount(req: {
25262
+ entityId: string;
25263
+ chain: ChainType;
25264
+ securityMode?: EntitySecurityMode;
25265
+ signedFundingBlob?: string;
25266
+ createTxId?: string;
25267
+ }): Promise<EntityCreationResult>;
25268
+ private static readonly PAYER_FUNDED_CREATE_CHAINS;
25269
+ private static readonly FUNDING_BLOB_RELAY_CHAINS;
25225
25270
  createAccount(req: CreateAccountRequest$1): Promise<EntityCreationResult>;
25271
+ prepareCreateTopic(req: Omit<CreateTopicRequest, "fundWith">): Promise<PreparedEntityCreation>;
25272
+ executeCreateTopic(req: {
25273
+ entityId: string;
25274
+ chain: ChainType;
25275
+ createTxId: string;
25276
+ securityMode?: EntitySecurityMode;
25277
+ }): Promise<EntityCreationResult>;
25226
25278
  createTopic(req: CreateTopicRequest): Promise<EntityCreationResult>;
25227
25279
  createAgent(req: CreateAgentRequest): Promise<EntityCreationResult>;
25228
25280
  launchpad(req: LaunchpadEntityRequest): Promise<LaunchpadEntityResult>;
@@ -25261,6 +25313,7 @@ export declare class BaasClient {
25261
25313
  private readonly timeout;
25262
25314
  private readonly allowInsecure;
25263
25315
  private readonly http;
25316
+ private readonly txHttp;
25264
25317
  private lastHttpError?;
25265
25318
  private authContext?;
25266
25319
  readonly db: DatabaseClient;
@@ -25272,6 +25325,7 @@ export declare class BaasClient {
25272
25325
  readonly customerSession: CustomerSessionClient;
25273
25326
  readonly rules: RulesClient;
25274
25327
  readonly entities: EntitiesClient;
25328
+ readonly transactions: TransactionsClient;
25275
25329
  constructor(config: BaasClientConfig);
25276
25330
  static connectToCluster(config: BaasConnectToClusterConfig): Promise<BaasClient>;
25277
25331
  setAppId(appId: string): void;
@@ -25488,7 +25542,7 @@ declare namespace personhood {
25488
25542
  export { PERSONHOOD_VERIFIER_NOT_CONFIGURED, PersonhoodAttestationMethod, PersonhoodCert, PersonhoodClient, PersonhoodProof, PersonhoodVerifyParams, isPersonhoodVerifierNotConfigured };
25489
25543
  }
25490
25544
  declare namespace baas {
25491
- export { AgentBalance, AgentEvent, AgentFundRequest, AgentInfo, AgentOperation, AgentRegisterRequest, AgentRules, AgentRulesValidationResult, AgentStatus, AgentTradeRequest, AgentWithdrawRequest, AgentsClient, AuthenticateOptions, BaasAppListResponse, BaasAuthConfig, BaasAuthResult, BaasChallengeRequest, BaasChallengeResponse, BaasChannelConfig, BaasClient, BaasClientConfig, BaasConnectToClusterConfig, 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, BaasRevokeKekResponse, BaasRollbackRequest, BaasRotateKekResponse, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasSetWebhookResponse, BaasStateTransition, BaasStorageUsage, BaasSupportedChain, BaasTriggerType, BaasUpdateResult, BaasUploadFrontendResponse, BaasUploadResult, BaasVerifyRequest, ChannelSubscription, CreateAccountRequest$1 as BaasCreateAccountRequest, CreateAgentRequest, CreateTokenRequest$1 as CreateTokenRequest, CreateTopicRequest, DatabaseClient, DatabaseStatsResponse, DbComparisonOperator, DbDocument, DbQuery, DeployedApp, DeployedAppInfo, DeployedAppLimits, DeployedAppStatus, DeployedAppUsage, DeploymentClient, DeprecateRuleResponse, DocumentProofResponse, EntitiesClient, EntityCreationResult, EntityInfo, EntityType$1 as BaasEntityType, FunctionsClient, LaunchpadEntityRequest, LaunchpadEntityResult, ListEntitiesFilter, ListEntitiesResponse, ListRulesFilter, ListRulesResponse, MessageHandler, MessagingClient, PublishRuleResponse, RulesClient, SimulateRuleRequest, StateRootResponse, StateTransitionsResponse, StorageClient, ValidationResult, VersionHistoryResponse, validateAgentRules };
25545
+ export { AgentBalance, AgentEvent, AgentFundRequest, AgentInfo, AgentOperation, AgentRegisterRequest, AgentRules, AgentRulesValidationResult, AgentStatus, AgentTradeRequest, AgentWithdrawRequest, AgentsClient, AuthenticateOptions, BaasAppListResponse, BaasAuthConfig, BaasAuthResult, BaasChallengeRequest, BaasChallengeResponse, BaasChannelConfig, BaasClient, BaasClientConfig, BaasConnectToClusterConfig, 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, BaasReissuePushCredentialsResponse, BaasRevokeKekResponse, BaasRollbackRequest, BaasRotateKekResponse, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasSetWebhookResponse, BaasStateTransition, BaasStorageUsage, BaasSupportedChain, BaasTriggerType, BaasUpdateResult, BaasUploadFrontendResponse, BaasUploadResult, BaasVerifyRequest, ChannelSubscription, CreateAccountRequest$1 as BaasCreateAccountRequest, CreateAgentRequest, CreateTokenRequest$1 as CreateTokenRequest, CreateTopicRequest, DatabaseClient, DatabaseStatsResponse, DbComparisonOperator, DbDocument, DbQuery, DeployedApp, DeployedAppInfo, DeployedAppLimits, DeployedAppStatus, DeployedAppUsage, DeploymentClient, DeprecateRuleResponse, DocumentProofResponse, EntitiesClient, EntityCreationResult, EntityInfo, EntitySecurityMode, EntityType$1 as BaasEntityType, FunctionsClient, FundWith, LaunchpadEntityRequest, LaunchpadEntityResult, ListEntitiesFilter, ListEntitiesResponse, ListRulesFilter, ListRulesResponse, MessageHandler, MessagingClient, PreparedEntityCreation, PublishRuleResponse, RulesClient, SimulateRuleRequest, StateRootResponse, StateTransitionsResponse, StorageClient, ValidationResult, VersionHistoryResponse, validateAgentRules };
25492
25546
  }
25493
25547
  declare namespace pqcVerify {
25494
25548
  export { FetchRegistryOptions, PqcCertV1, PqcCertV1Schema, PqcCertV1Signer, ValidatorRegistrySnapshot, VerifyResult, fetchRegistrySnapshot, parsePqcCert, verifyPqcAttestation };