@hsuite/smart-engines-sdk 3.13.1 → 4.0.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 +35 -0
- package/README.md +10 -7
- package/dist/index.d.ts +129 -35
- package/dist/index.js +256 -110
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.ts +118 -47
- package/dist/nestjs/index.js +241 -113
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,40 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 4.0.0 — 2026-06-25
|
|
4
|
+
|
|
5
|
+
**SDK revision — align the surface to the REAL reachable endpoints; remove the un-ingressed-tier footguns.** Two profiles, two tiers: `BaasClient` is the app-as-proxy / external profile (host BaaS tier, `{gateway}/host/api/v3/baas/*`); `SmartEngineClient` is the in-cluster / validator-direct profile (raw `/api/v3/*` tier, un-ingressed at the gateway). The web3 authorization proxy is the HOST, which already exposes the entity value-movement routes — so value-movement now lives on `BaasClient.entities`, and the raw-tier transactions arm is removed from `BaasClient`.
|
|
6
|
+
|
|
7
|
+
### Breaking changes
|
|
8
|
+
|
|
9
|
+
- **Removed `BaasClient.transactions` (the `TransactionsClient` sub-client) and `BaasClient`'s internal `txHttp`.** This arm rooted at the RAW `{hostUrl}/api/v3/transactions` origin — a sibling of `/host` that is un-ingressed at the public gateway (RFC #1236), so every call from a gateway-routed `BaasClient` 404'd. That was the footgun. The `TransactionsClient` class itself is unchanged and still ships on `SmartEngineClient` (the validator-direct profile). Migration: external/app-as-proxy callers use `BaasClient.entities.{transfer,withdraw,mint,burn,compliance,trustline}` (host BaaS tier) or, for in-cluster prepare/execute, construct a `SmartEngineClient` with an explicit `validatorBaseUrl`.
|
|
10
|
+
- **`SmartEngineClientConfig.baseUrl` → `validatorBaseUrl` (renamed, type-fence).** `SmartEngineClient` is now constructible ONLY with an explicit VALIDATOR origin. The rename makes it impossible to silently pass a gateway URL into the validator-direct client (whose raw `/api/v3/*` tier 404s at the gateway). Migration: `new SmartEngineClient({ baseUrl })` → `new SmartEngineClient({ validatorBaseUrl })`.
|
|
11
|
+
- **Removed `SmartEngineClient.connectToCluster()` (and its `ClusterConnectionConfig` / `ClusterConnectionSeed` / `ClusterConnectionResult` types).** It resolved a cluster's `gatewayUrl` and fed it into a gateway-pointed `SmartEngineClient` — the same footgun. To reach web3 through a cluster use `BaasClient.connectToCluster({ network })` (host BaaS tier); for an explicit in-cluster validator origin use `new SmartEngineClient({ validatorBaseUrl })` or `SmartEngineClient.connectToNetwork(...)` (which resolves a real validator `apiEndpoint` from the HCS registry — never a gateway URL). `connectToNetwork` is unchanged.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`BaasClient.entities` value-movement (prepare-bytes only).** Six new methods mirroring the host's entity-scoped routes (`POST /api/v3/baas/entities/:entityId/{transfer,withdraw,mint,burn,compliance,trustline}`), each returning the host's `PreparedEntityTransactionResult` and threading `HttpCallOptions` (`onBehalfOf` / `customerToken` / `headers`) — owner-acting via the end user's Mode-1 customer-session JWT, exactly as `agents.execute`. The entity is the source / treasury / authority + fee-payer (resolved server-side; never named in the body), so a caller can never name a foreign payer or drain another account; a rule-deny surfaces as a 403 `rule_rejected` (use `isRuleRejected`), never as signed bytes. New signatures:
|
|
16
|
+
- `entities.transfer(entityId, body: TransferEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
17
|
+
- `entities.withdraw(entityId, body: WithdrawEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
18
|
+
- `entities.mint(entityId, body: MintEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
19
|
+
- `entities.burn(entityId, body: BurnEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
20
|
+
- `entities.compliance(entityId, body: ComplianceEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
21
|
+
- `entities.trustline(entityId, body: TrustlineEntityRequest, opts?) → Promise<PreparedEntityTransactionResult>`
|
|
22
|
+
- New exported types: `TransferEntityRequest`, `WithdrawEntityRequest`, `MintEntityRequest`, `BurnEntityRequest`, `ComplianceEntityRequest`, `ComplianceAction`, `TrustlineEntityRequest`, `PreparedEntityTransactionResult`.
|
|
23
|
+
|
|
24
|
+
## 3.14.0 — 2026-06-25
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- **Agent + BaaS SDK completeness (from the showcase boundary audit).** Lets app-as-proxy consumers drop hand-rolled raw-fetch workarounds.
|
|
29
|
+
- `AgentsClient.certification(agentId, opts?)` → typed `AgentCertification` (entityId, owner/agent/treasury wallets, primaryChain, rulesHash, BLS group key, state-history topic, recent events + tx ids).
|
|
30
|
+
- `AgentsClient.fund()` now returns the discriminated union `AgentPreparedTransactionResponse | AgentPendingApprovalResponse` (the owner approval-threshold path), plus the `isAgentFundPending()` type guard.
|
|
31
|
+
- `AgentInfo` gains the on-chain DKG identity the host already returns: optional `agentWallet`, `treasuryAccount`, `entityId` (additive).
|
|
32
|
+
- `FunctionsClient.getCode(functionId, opts?)` → `BaasFunctionCode` (`{ functionId, code, codeHash }`) for function source reveal.
|
|
33
|
+
- `StorageClient.downloadWithMeta(cid, opts?)` → `{ bytes, contentType?, filename? }` (the bytes-only `download()` discards the headers), backed by a new `HttpClient.getBinaryWithMeta`.
|
|
34
|
+
- `HttpCallOptions.onBehalfOf` — owner-acting pass-through: forwards an end user's Mode-1 customer-session JWT as BOTH `Authorization: Bearer` and `X-Customer-Session-Claim` (no client-side signing; owner-gated agent routes accept only the Mode-1 JWT — the Mode-2 BLS claim is host-minted and rejected there). Distinct from the metering-only `customerToken`.
|
|
35
|
+
- Error helpers for consumers (e.g. a NestJS exception filter): `SdkHttpError.isRetryable` getter, `isSmartEngineSdkError()` guard, and `toHttpError()` (verbatim mapping with a sub-400 → 502 clamp).
|
|
36
|
+
- **`EntitiesClient.prepareCreateAgent(req)` + `executeCreateAgent(req)` — payer-funded two-phase agent create.** Agent creation now mirrors the account create-flow: the synchronous `createAgent` 400s on payer-funded chains (e.g. `chain=xrpl uses prepare-create / execute-create`), so consumers drive the host's generic two-phase create (`POST /api/v3/baas/entities/prepare-create` + `/execute-create`, `entityType: 'agent'`). `prepareCreateAgent` returns `PreparedEntityCreation` (the unsigned payer-funding tx the dapp signs + submits) and `executeCreateAgent` returns `EntityCreationResult` after the validator finalizes (relaying the signed funding blob on XRPL/Stellar, threading the Hedera `createTxId` receipt). `prepareCreateAgent` remaps the agent's `primaryChain` onto the generic prepare/execute DTO's `chain` key. (#117)
|
|
37
|
+
|
|
3
38
|
## 3.8.0 — 2026-06-17
|
|
4
39
|
|
|
5
40
|
### Added
|
package/README.md
CHANGED
|
@@ -79,15 +79,15 @@ baas.setAppId(init.appId);
|
|
|
79
79
|
```ts
|
|
80
80
|
import { SmartEngineClient } from '@hsuite/smart-engines-sdk';
|
|
81
81
|
|
|
82
|
-
const { client,
|
|
83
|
-
network: 'testnet', // resolves
|
|
82
|
+
const { client, validator, session } = await SmartEngineClient.connectToNetwork({
|
|
83
|
+
network: 'testnet', // resolves a real validator origin from the HCS registry
|
|
84
84
|
chain: 'xrpl',
|
|
85
85
|
address: wallet.address,
|
|
86
86
|
publicKey: wallet.publicKey,
|
|
87
87
|
signFn: (challenge) => /* sign the challenge */ '',
|
|
88
88
|
});
|
|
89
89
|
|
|
90
|
-
// All sub-clients are wired against the discovered
|
|
90
|
+
// All sub-clients are wired against the discovered validator
|
|
91
91
|
await client.tss.signMPC({ chain: 'hedera', entityId: '...', transactionBytes: '0x...' });
|
|
92
92
|
await client.ipfs.upload(file, 'document.pdf');
|
|
93
93
|
```
|
|
@@ -115,8 +115,11 @@ const baas = new BaasClient({
|
|
|
115
115
|
pathPrefix: '/host', // gateway routes /host/* → smart-host
|
|
116
116
|
});
|
|
117
117
|
|
|
118
|
+
// `SmartEngineClient` is validator-direct: `validatorBaseUrl` MUST be a
|
|
119
|
+
// validator origin, NEVER the gateway. Its raw `/api/v3/*` tier is un-ingressed
|
|
120
|
+
// at the gateway (RFC #1236), so a gateway URL here 404s every call.
|
|
118
121
|
const client = new SmartEngineClient({
|
|
119
|
-
|
|
122
|
+
validatorBaseUrl: 'http://smart-validator:3000', // in-cluster validator origin
|
|
120
123
|
authToken: '<jwt-from-validator-auth-verify>',
|
|
121
124
|
});
|
|
122
125
|
```
|
|
@@ -357,12 +360,12 @@ await baas.deployment.rollback(init.appId, { toTag: 'v0' });
|
|
|
357
360
|
|
|
358
361
|
For direct chain operations independent of BaaS — e.g., a custodial backend
|
|
359
362
|
that creates accounts and tokens on behalf of users — use the methods on the
|
|
360
|
-
`SmartEngineClient` returned by `
|
|
363
|
+
`SmartEngineClient` returned by `connectToNetwork`:
|
|
361
364
|
|
|
362
365
|
```ts
|
|
363
366
|
import { SmartEngineClient } from '@hsuite/smart-engines-sdk';
|
|
364
367
|
|
|
365
|
-
const { client } = await SmartEngineClient.
|
|
368
|
+
const { client } = await SmartEngineClient.connectToNetwork({
|
|
366
369
|
network: 'testnet',
|
|
367
370
|
chain: 'xrpl',
|
|
368
371
|
address: wallet.address,
|
|
@@ -420,7 +423,7 @@ import { SmartEngineModule } from '@hsuite/smart-engines-sdk/nestjs';
|
|
|
420
423
|
SmartEngineModule.forRootAsync({
|
|
421
424
|
imports: [ConfigModule],
|
|
422
425
|
useFactory: (config: ConfigService) => ({
|
|
423
|
-
|
|
426
|
+
validatorBaseUrl: config.get('VALIDATOR_URL')!,
|
|
424
427
|
timeout: 30000,
|
|
425
428
|
testConnection: true,
|
|
426
429
|
autoReconnect: true,
|
package/dist/index.d.ts
CHANGED
|
@@ -1956,6 +1956,7 @@ export declare class ClusterDiscoveryClient {
|
|
|
1956
1956
|
}
|
|
1957
1957
|
export type HttpCallOptions = {
|
|
1958
1958
|
customerToken?: string;
|
|
1959
|
+
onBehalfOf?: string;
|
|
1959
1960
|
headers?: Record<string, string>;
|
|
1960
1961
|
};
|
|
1961
1962
|
export type HttpClient = {
|
|
@@ -1966,6 +1967,11 @@ export type HttpClient = {
|
|
|
1966
1967
|
delete<T = any>(path: string, opts?: HttpCallOptions): Promise<T>;
|
|
1967
1968
|
getText(path: string, opts?: HttpCallOptions): Promise<string>;
|
|
1968
1969
|
getBinary(path: string, opts?: HttpCallOptions): Promise<Uint8Array>;
|
|
1970
|
+
getBinaryWithMeta(path: string, opts?: HttpCallOptions): Promise<{
|
|
1971
|
+
bytes: Uint8Array;
|
|
1972
|
+
contentType?: string;
|
|
1973
|
+
filename?: string;
|
|
1974
|
+
}>;
|
|
1969
1975
|
upload<T = any>(path: string, file: Blob | Buffer, filename: string, metadata?: Record<string, string>, fieldName?: string, opts?: HttpCallOptions): Promise<T>;
|
|
1970
1976
|
setAuthToken(token: string | undefined): void;
|
|
1971
1977
|
getAuthToken(): string | undefined;
|
|
@@ -1981,6 +1987,7 @@ export declare class SdkHttpError extends Error {
|
|
|
1981
1987
|
readonly statusCode: number;
|
|
1982
1988
|
readonly details?: any | undefined;
|
|
1983
1989
|
constructor(message: string, statusCode: number, details?: any | undefined);
|
|
1990
|
+
get isRetryable(): boolean;
|
|
1984
1991
|
}
|
|
1985
1992
|
export declare function createHttpClient(config: HttpClientConfig): HttpClient;
|
|
1986
1993
|
export declare function encodePathParam(param: string): string;
|
|
@@ -1992,6 +1999,14 @@ export interface RuleRejectedDetails {
|
|
|
1992
1999
|
export declare function isRuleRejected(err: unknown): err is SdkHttpError & {
|
|
1993
2000
|
details: RuleRejectedDetails;
|
|
1994
2001
|
};
|
|
2002
|
+
export declare function isSmartEngineSdkError(err: unknown): err is SdkHttpError;
|
|
2003
|
+
export declare function toHttpError(err: unknown): {
|
|
2004
|
+
statusCode: number;
|
|
2005
|
+
code: string;
|
|
2006
|
+
message: string;
|
|
2007
|
+
isRetryable: boolean;
|
|
2008
|
+
details?: unknown;
|
|
2009
|
+
};
|
|
1995
2010
|
export type DiscoveryClusterEndpoints = {
|
|
1996
2011
|
clusterId: string;
|
|
1997
2012
|
gatewayUrl: string;
|
|
@@ -3839,6 +3854,29 @@ export type AgentInfo = {
|
|
|
3839
3854
|
owner: string;
|
|
3840
3855
|
createdAt: string;
|
|
3841
3856
|
lastActiveAt?: string;
|
|
3857
|
+
agentWallet?: string;
|
|
3858
|
+
treasuryAccount?: string;
|
|
3859
|
+
entityId?: string;
|
|
3860
|
+
};
|
|
3861
|
+
export type AgentCertification = {
|
|
3862
|
+
agentId: string;
|
|
3863
|
+
entityId?: string;
|
|
3864
|
+
ownerWallet?: string;
|
|
3865
|
+
status?: string;
|
|
3866
|
+
agentWallet?: string;
|
|
3867
|
+
treasuryAccount?: string;
|
|
3868
|
+
primaryChain?: string;
|
|
3869
|
+
rulesHash?: string;
|
|
3870
|
+
ruleRef?: string;
|
|
3871
|
+
blsGroupPublicKey?: string;
|
|
3872
|
+
stateHistoryTopicId?: string;
|
|
3873
|
+
recentEvents: Array<{
|
|
3874
|
+
agentId: string;
|
|
3875
|
+
type: string;
|
|
3876
|
+
payload: Record<string, unknown>;
|
|
3877
|
+
timestamp: string;
|
|
3878
|
+
}>;
|
|
3879
|
+
recentTxIds: string[];
|
|
3842
3880
|
};
|
|
3843
3881
|
export type AgentEvent = {
|
|
3844
3882
|
eventId: string;
|
|
@@ -3900,6 +3938,15 @@ export type AgentExecuteResponse = {
|
|
|
3900
3938
|
export type AgentPreparedTransactionResponse = PreparedTransactionResponse & {
|
|
3901
3939
|
success: true;
|
|
3902
3940
|
};
|
|
3941
|
+
export type AgentPendingApprovalResponse = {
|
|
3942
|
+
success: true;
|
|
3943
|
+
pendingOpId: string;
|
|
3944
|
+
agentId: string;
|
|
3945
|
+
action: string;
|
|
3946
|
+
status: "awaiting_approval";
|
|
3947
|
+
description: string;
|
|
3948
|
+
};
|
|
3949
|
+
export declare function isAgentFundPending(r: AgentPreparedTransactionResponse | AgentPendingApprovalResponse): r is AgentPendingApprovalResponse;
|
|
3903
3950
|
export declare class AgentsClient {
|
|
3904
3951
|
private readonly http;
|
|
3905
3952
|
constructor(http: HttpClient);
|
|
@@ -3909,7 +3956,7 @@ export declare class AgentsClient {
|
|
|
3909
3956
|
agents: AgentInfo[];
|
|
3910
3957
|
total: number;
|
|
3911
3958
|
}>;
|
|
3912
|
-
fund(agentId: string, request: AgentFundRequest, opts?: HttpCallOptions): Promise<AgentPreparedTransactionResponse>;
|
|
3959
|
+
fund(agentId: string, request: AgentFundRequest, opts?: HttpCallOptions): Promise<AgentPreparedTransactionResponse | AgentPendingApprovalResponse>;
|
|
3913
3960
|
trade(agentId: string, request: AgentTradeRequest, opts?: HttpCallOptions): Promise<AgentPreparedTransactionResponse>;
|
|
3914
3961
|
withdraw(agentId: string, request: AgentWithdrawRequest, opts?: HttpCallOptions): Promise<AgentPreparedTransactionResponse>;
|
|
3915
3962
|
execute(agentId: string, request: AgentExecuteRequest, opts?: HttpCallOptions): Promise<AgentExecuteResponse & {
|
|
@@ -3927,6 +3974,7 @@ export declare class AgentsClient {
|
|
|
3927
3974
|
success: boolean;
|
|
3928
3975
|
status: string;
|
|
3929
3976
|
}>;
|
|
3977
|
+
certification(agentId: string, opts?: HttpCallOptions): Promise<AgentCertification>;
|
|
3930
3978
|
updateRules(agentId: string, rules: Partial<AgentRules>, opts?: HttpCallOptions): Promise<AgentInfo>;
|
|
3931
3979
|
getEvents(agentId: string, opts?: HttpCallOptions): Promise<{
|
|
3932
3980
|
events: AgentEvent[];
|
|
@@ -4212,6 +4260,11 @@ export type BaasFunctionInfo = {
|
|
|
4212
4260
|
lastInvokedAt?: string;
|
|
4213
4261
|
invocationCount: number;
|
|
4214
4262
|
};
|
|
4263
|
+
export type BaasFunctionCode = {
|
|
4264
|
+
functionId: string;
|
|
4265
|
+
code: string | null;
|
|
4266
|
+
codeHash?: string;
|
|
4267
|
+
};
|
|
4215
4268
|
export type BaasFunctionLog = {
|
|
4216
4269
|
timestamp: string;
|
|
4217
4270
|
level: "debug" | "info" | "warn" | "error";
|
|
@@ -4688,7 +4741,7 @@ export declare class OperatorClient {
|
|
|
4688
4741
|
getTopup(chain: OperatorChain, accountId: string): Promise<OperatorTopUpResponse>;
|
|
4689
4742
|
}
|
|
4690
4743
|
export interface SmartEngineClientConfig {
|
|
4691
|
-
|
|
4744
|
+
validatorBaseUrl: string;
|
|
4692
4745
|
apiKey?: string;
|
|
4693
4746
|
authToken?: string;
|
|
4694
4747
|
timeout?: number;
|
|
@@ -4708,35 +4761,6 @@ export interface NetworkConnectionConfig {
|
|
|
4708
4761
|
mirrorNodeUrl?: string;
|
|
4709
4762
|
allowInsecure?: boolean;
|
|
4710
4763
|
}
|
|
4711
|
-
export interface ClusterConnectionAuth {
|
|
4712
|
-
chain: AuthChain;
|
|
4713
|
-
address: string;
|
|
4714
|
-
publicKey: string;
|
|
4715
|
-
signFn: (challenge: string) => string | Promise<string>;
|
|
4716
|
-
metadata?: {
|
|
4717
|
-
appId?: string;
|
|
4718
|
-
appName?: string;
|
|
4719
|
-
};
|
|
4720
|
-
trustAnchor?: {
|
|
4721
|
-
network: "mainnet" | "testnet" | "previewnet";
|
|
4722
|
-
registryTopicId: string;
|
|
4723
|
-
mirrorNodeUrl?: string;
|
|
4724
|
-
};
|
|
4725
|
-
allowInsecure?: boolean;
|
|
4726
|
-
}
|
|
4727
|
-
export type ClusterConnectionSeed = {
|
|
4728
|
-
bootstrap: string[];
|
|
4729
|
-
network?: never;
|
|
4730
|
-
} | {
|
|
4731
|
-
bootstrap?: never;
|
|
4732
|
-
network: NetworkName;
|
|
4733
|
-
};
|
|
4734
|
-
export type ClusterConnectionConfig = ClusterConnectionSeed & ClusterConnectionAuth;
|
|
4735
|
-
export interface ClusterConnectionResult {
|
|
4736
|
-
client: SmartEngineClient;
|
|
4737
|
-
cluster: ClusterInfo;
|
|
4738
|
-
session: AuthenticateResponse;
|
|
4739
|
-
}
|
|
4740
4764
|
export interface NetworkConnectionResult {
|
|
4741
4765
|
client: SmartEngineClient;
|
|
4742
4766
|
validator: ValidatorInfo;
|
|
@@ -4774,7 +4798,6 @@ export declare class SmartEngineClient {
|
|
|
4774
4798
|
constructor(config: SmartEngineClientConfig);
|
|
4775
4799
|
static fromEnv(env: Record<string, string | undefined>): SmartEngineClient;
|
|
4776
4800
|
static connectToNetwork(config: NetworkConnectionConfig): Promise<NetworkConnectionResult>;
|
|
4777
|
-
static connectToCluster(config: ClusterConnectionConfig): Promise<ClusterConnectionResult>;
|
|
4778
4801
|
getBaseUrl(): string;
|
|
4779
4802
|
isAuthenticated(): boolean;
|
|
4780
4803
|
getHttpHealth(): {
|
|
@@ -5513,6 +5536,11 @@ export declare class StorageClient {
|
|
|
5513
5536
|
constructor(http: HttpClient, getAppId: () => string);
|
|
5514
5537
|
upload(file: Blob | Buffer, filename: string, metadata?: Record<string, string>, opts?: HttpCallOptions): Promise<BaasUploadResult>;
|
|
5515
5538
|
download(cid: string, opts?: HttpCallOptions): Promise<Uint8Array>;
|
|
5539
|
+
downloadWithMeta(cid: string, opts?: HttpCallOptions): Promise<{
|
|
5540
|
+
bytes: Uint8Array;
|
|
5541
|
+
contentType?: string;
|
|
5542
|
+
filename?: string;
|
|
5543
|
+
}>;
|
|
5516
5544
|
getMetadata(cid: string, opts?: HttpCallOptions): Promise<BaasFileMetadata>;
|
|
5517
5545
|
delete(cid: string, opts?: HttpCallOptions): Promise<{
|
|
5518
5546
|
success: boolean;
|
|
@@ -5543,6 +5571,7 @@ export declare class FunctionsClient {
|
|
|
5543
5571
|
total: number;
|
|
5544
5572
|
}>;
|
|
5545
5573
|
get(functionId: string, opts?: HttpCallOptions): Promise<BaasFunctionInfo>;
|
|
5574
|
+
getCode(functionId: string, opts?: HttpCallOptions): Promise<BaasFunctionCode>;
|
|
5546
5575
|
update(functionId: string, updates: Partial<BaasFunctionDeployRequest>, opts?: HttpCallOptions): Promise<BaasFunctionInfo>;
|
|
5547
5576
|
delete(functionId: string, opts?: HttpCallOptions): Promise<{
|
|
5548
5577
|
success: boolean;
|
|
@@ -25297,6 +25326,9 @@ export type CreateAgentRequest = {
|
|
|
25297
25326
|
ruleRef: RuleRef;
|
|
25298
25327
|
name: string;
|
|
25299
25328
|
agentType?: string;
|
|
25329
|
+
securityMode?: EntitySecurityMode;
|
|
25330
|
+
payerAccountId?: string;
|
|
25331
|
+
fundWith?: FundWith;
|
|
25300
25332
|
};
|
|
25301
25333
|
export type EntityCreationResult = {
|
|
25302
25334
|
entityId: string;
|
|
@@ -25347,6 +25379,56 @@ export type LaunchpadEntityResult = {
|
|
|
25347
25379
|
tokenId: string;
|
|
25348
25380
|
chainAccounts: Record<string, string>;
|
|
25349
25381
|
};
|
|
25382
|
+
export type TransferEntityRequest = {
|
|
25383
|
+
chain: ChainType;
|
|
25384
|
+
to: string;
|
|
25385
|
+
amount: string;
|
|
25386
|
+
tokenId?: string;
|
|
25387
|
+
memo?: string;
|
|
25388
|
+
};
|
|
25389
|
+
export type WithdrawEntityRequest = {
|
|
25390
|
+
chain: ChainType;
|
|
25391
|
+
destination: string;
|
|
25392
|
+
amount: string;
|
|
25393
|
+
tokenId?: string;
|
|
25394
|
+
memo?: string;
|
|
25395
|
+
};
|
|
25396
|
+
export type MintEntityRequest = {
|
|
25397
|
+
chain: ChainType;
|
|
25398
|
+
tokenId: string;
|
|
25399
|
+
amount: string;
|
|
25400
|
+
memo?: string;
|
|
25401
|
+
};
|
|
25402
|
+
export type BurnEntityRequest = {
|
|
25403
|
+
chain: ChainType;
|
|
25404
|
+
tokenId: string;
|
|
25405
|
+
amount: string;
|
|
25406
|
+
memo?: string;
|
|
25407
|
+
};
|
|
25408
|
+
export type ComplianceAction = "pause" | "restrict" | "wipe";
|
|
25409
|
+
export type ComplianceEntityRequest = {
|
|
25410
|
+
action: ComplianceAction;
|
|
25411
|
+
chain: ChainType;
|
|
25412
|
+
tokenId: string;
|
|
25413
|
+
account?: string;
|
|
25414
|
+
amount?: string;
|
|
25415
|
+
memo?: string;
|
|
25416
|
+
};
|
|
25417
|
+
export type TrustlineEntityRequest = {
|
|
25418
|
+
chain: ChainType;
|
|
25419
|
+
currency: string;
|
|
25420
|
+
issuerAddress: string;
|
|
25421
|
+
limit?: string;
|
|
25422
|
+
};
|
|
25423
|
+
export type PreparedEntityTransactionResult = {
|
|
25424
|
+
chain: string;
|
|
25425
|
+
transactionId: string;
|
|
25426
|
+
transactionBytes: string;
|
|
25427
|
+
transactionType?: string;
|
|
25428
|
+
payerAccountId?: string;
|
|
25429
|
+
expiresAt?: string;
|
|
25430
|
+
metadata?: Record<string, unknown>;
|
|
25431
|
+
};
|
|
25350
25432
|
export declare class EntitiesClient {
|
|
25351
25433
|
private readonly http;
|
|
25352
25434
|
constructor(http: HttpClient);
|
|
@@ -25380,9 +25462,23 @@ export declare class EntitiesClient {
|
|
|
25380
25462
|
}): Promise<EntityCreationResult>;
|
|
25381
25463
|
createTopic(req: CreateTopicRequest): Promise<EntityCreationResult>;
|
|
25382
25464
|
createAgent(req: CreateAgentRequest): Promise<EntityCreationResult>;
|
|
25465
|
+
prepareCreateAgent(req: Omit<CreateAgentRequest, "fundWith">): Promise<PreparedEntityCreation>;
|
|
25466
|
+
executeCreateAgent(req: {
|
|
25467
|
+
entityId: string;
|
|
25468
|
+
chain: ChainType;
|
|
25469
|
+
securityMode?: EntitySecurityMode;
|
|
25470
|
+
signedFundingBlob?: string;
|
|
25471
|
+
createTxId?: string;
|
|
25472
|
+
}): Promise<EntityCreationResult>;
|
|
25383
25473
|
launchpad(req: LaunchpadEntityRequest): Promise<LaunchpadEntityResult>;
|
|
25384
25474
|
get(entityId: string): Promise<EntityInfo>;
|
|
25385
25475
|
listByOwner(filter?: ListEntitiesFilter): Promise<ListEntitiesResponse>;
|
|
25476
|
+
transfer(entityId: string, body: TransferEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25477
|
+
withdraw(entityId: string, body: WithdrawEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25478
|
+
mint(entityId: string, body: MintEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25479
|
+
burn(entityId: string, body: BurnEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25480
|
+
compliance(entityId: string, body: ComplianceEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25481
|
+
trustline(entityId: string, body: TrustlineEntityRequest, opts?: HttpCallOptions): Promise<PreparedEntityTransactionResult>;
|
|
25386
25482
|
}
|
|
25387
25483
|
export type AuthenticateOptions = {
|
|
25388
25484
|
chain: BaasSupportedChain;
|
|
@@ -25416,7 +25512,6 @@ export declare class BaasClient {
|
|
|
25416
25512
|
private readonly timeout;
|
|
25417
25513
|
private readonly allowInsecure;
|
|
25418
25514
|
private readonly http;
|
|
25419
|
-
private readonly txHttp;
|
|
25420
25515
|
private lastHttpError?;
|
|
25421
25516
|
private authContext?;
|
|
25422
25517
|
readonly db: DatabaseClient;
|
|
@@ -25428,7 +25523,6 @@ export declare class BaasClient {
|
|
|
25428
25523
|
readonly customerSession: CustomerSessionClient;
|
|
25429
25524
|
readonly rules: RulesClient;
|
|
25430
25525
|
readonly entities: EntitiesClient;
|
|
25431
|
-
readonly transactions: TransactionsClient;
|
|
25432
25526
|
constructor(config: BaasClientConfig);
|
|
25433
25527
|
static connectToCluster(config: BaasConnectToClusterConfig): Promise<BaasClient>;
|
|
25434
25528
|
setAppId(appId: string): void;
|
|
@@ -25648,7 +25742,7 @@ declare namespace personhood {
|
|
|
25648
25742
|
export { PERSONHOOD_VERIFIER_NOT_CONFIGURED, PersonhoodAttestationMethod, PersonhoodCert, PersonhoodClient, PersonhoodProof, PersonhoodVerifyParams, isPersonhoodVerifierNotConfigured };
|
|
25649
25743
|
}
|
|
25650
25744
|
declare namespace baas {
|
|
25651
|
-
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, BaasFunctionEvalRequest, BaasFunctionInfo, BaasFunctionLog, BaasFunctionLogOptions, BaasFunctionResources, BaasFunctionResult, BaasFunctionRuntime, BaasHistoryOptions, BaasInitRequest, BaasInitResponse, BaasInsertResult, BaasMerkleProof, BaasMessage, BaasPresenceInfo, BaasPresenceMember, BaasPublishResult, BaasQueryOptions, BaasReissuePushCredentialsResponse, BaasRevokeKekResponse, BaasRollbackRequest, BaasRotateKekResponse, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasSetWebhookResponse, BaasSignedCode, 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 };
|
|
25745
|
+
export { AgentBalance, AgentCertification, AgentEvent, AgentFundRequest, AgentInfo, AgentOperation, AgentPendingApprovalResponse, AgentPreparedTransactionResponse, 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, BaasFunctionCode, BaasFunctionDeployRequest, BaasFunctionDeployResult, BaasFunctionEvalRequest, BaasFunctionInfo, BaasFunctionLog, BaasFunctionLogOptions, BaasFunctionResources, BaasFunctionResult, BaasFunctionRuntime, BaasHistoryOptions, BaasInitRequest, BaasInitResponse, BaasInsertResult, BaasMerkleProof, BaasMessage, BaasPresenceInfo, BaasPresenceMember, BaasPublishResult, BaasQueryOptions, BaasReissuePushCredentialsResponse, BaasRevokeKekResponse, BaasRollbackRequest, BaasRotateKekResponse, BaasRuntimeStatus, BaasService, BaasSessionInfo, BaasSetWebhookResponse, BaasSignedCode, BaasStateTransition, BaasStorageUsage, BaasSupportedChain, BaasTriggerType, BaasUpdateResult, BaasUploadFrontendResponse, BaasUploadResult, BaasVerifyRequest, BurnEntityRequest, ChannelSubscription, ComplianceAction, ComplianceEntityRequest, 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, MintEntityRequest, PreparedEntityCreation, PreparedEntityTransactionResult, PublishRuleResponse, RulesClient, SimulateRuleRequest, StateRootResponse, StateTransitionsResponse, StorageClient, TransferEntityRequest, TrustlineEntityRequest, ValidationResult, VersionHistoryResponse, WithdrawEntityRequest, isAgentFundPending, validateAgentRules };
|
|
25652
25746
|
}
|
|
25653
25747
|
declare namespace pqcVerify {
|
|
25654
25748
|
export { FetchRegistryOptions, PqcCertV1, PqcCertV1Schema, PqcCertV1Signer, ValidatorRegistrySnapshot, VerifyResult, fetchRegistrySnapshot, parsePqcCert, verifyPqcAttestation };
|