@hsuite/smart-engines-sdk 3.6.1 → 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 +6 -0
- package/README.md +1 -1
- package/dist/index.d.ts +175 -3
- package/dist/index.js +579 -122
- package/dist/index.js.map +1 -1
- package/dist/nestjs/index.d.ts +170 -2
- package/dist/nestjs/index.js +513 -103
- package/dist/nestjs/index.js.map +1 -1
- package/package.json +1 -1
package/dist/nestjs/index.d.ts
CHANGED
|
@@ -255,6 +255,30 @@ declare const TokenInfoSchema: z.ZodObject<{
|
|
|
255
255
|
circulatingSupply?: string | undefined;
|
|
256
256
|
}>;
|
|
257
257
|
export type TokenInfo = z.infer<typeof TokenInfoSchema>;
|
|
258
|
+
declare const RuleRefSchema: z.ZodObject<{
|
|
259
|
+
chain: z.ZodEnum<[
|
|
260
|
+
"hedera",
|
|
261
|
+
"xrpl",
|
|
262
|
+
"polkadot",
|
|
263
|
+
"solana",
|
|
264
|
+
"stellar",
|
|
265
|
+
"ethereum",
|
|
266
|
+
"polygon",
|
|
267
|
+
"bitcoin",
|
|
268
|
+
"cardano"
|
|
269
|
+
]>;
|
|
270
|
+
topicId: z.ZodString;
|
|
271
|
+
consensusTimestamp: z.ZodString;
|
|
272
|
+
}, "strip", z.ZodTypeAny, {
|
|
273
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
274
|
+
topicId: string;
|
|
275
|
+
consensusTimestamp: string;
|
|
276
|
+
}, {
|
|
277
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
278
|
+
topicId: string;
|
|
279
|
+
consensusTimestamp: string;
|
|
280
|
+
}>;
|
|
281
|
+
export type RuleRefInput = z.infer<typeof RuleRefSchema>;
|
|
258
282
|
declare const CreateAccountRequestSchema: z.ZodObject<{
|
|
259
283
|
chain: z.ZodEnum<[
|
|
260
284
|
"hedera",
|
|
@@ -279,6 +303,30 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
|
|
|
279
303
|
"full"
|
|
280
304
|
]>>;
|
|
281
305
|
appOwnerPublicKey: z.ZodOptional<z.ZodString>;
|
|
306
|
+
ruleRef: z.ZodOptional<z.ZodObject<{
|
|
307
|
+
chain: z.ZodEnum<[
|
|
308
|
+
"hedera",
|
|
309
|
+
"xrpl",
|
|
310
|
+
"polkadot",
|
|
311
|
+
"solana",
|
|
312
|
+
"stellar",
|
|
313
|
+
"ethereum",
|
|
314
|
+
"polygon",
|
|
315
|
+
"bitcoin",
|
|
316
|
+
"cardano"
|
|
317
|
+
]>;
|
|
318
|
+
topicId: z.ZodString;
|
|
319
|
+
consensusTimestamp: z.ZodString;
|
|
320
|
+
}, "strip", z.ZodTypeAny, {
|
|
321
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
322
|
+
topicId: string;
|
|
323
|
+
consensusTimestamp: string;
|
|
324
|
+
}, {
|
|
325
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
326
|
+
topicId: string;
|
|
327
|
+
consensusTimestamp: string;
|
|
328
|
+
}>>;
|
|
329
|
+
entityType: z.ZodOptional<z.ZodString>;
|
|
282
330
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
283
331
|
}, "strip", z.ZodTypeAny, {
|
|
284
332
|
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
@@ -292,6 +340,12 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
|
|
|
292
340
|
appOwnerPublicKey?: string | undefined;
|
|
293
341
|
memo?: string | undefined;
|
|
294
342
|
payerAccountId?: string | undefined;
|
|
343
|
+
ruleRef?: {
|
|
344
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
345
|
+
topicId: string;
|
|
346
|
+
consensusTimestamp: string;
|
|
347
|
+
} | undefined;
|
|
348
|
+
entityType?: string | undefined;
|
|
295
349
|
}, {
|
|
296
350
|
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
297
351
|
initialBalance: string;
|
|
@@ -304,6 +358,12 @@ declare const CreateAccountRequestSchema: z.ZodObject<{
|
|
|
304
358
|
memo?: string | undefined;
|
|
305
359
|
payerAccountId?: string | undefined;
|
|
306
360
|
immutable?: boolean | undefined;
|
|
361
|
+
ruleRef?: {
|
|
362
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
363
|
+
topicId: string;
|
|
364
|
+
consensusTimestamp: string;
|
|
365
|
+
} | undefined;
|
|
366
|
+
entityType?: string | undefined;
|
|
307
367
|
}>;
|
|
308
368
|
export type CreateAccountRequest = z.infer<typeof CreateAccountRequestSchema>;
|
|
309
369
|
declare const CreateAccountResponseSchema: z.ZodObject<{
|
|
@@ -462,6 +522,30 @@ declare const CreateTokenRequestSchema: z.ZodObject<{
|
|
|
462
522
|
validatorTopicId: z.ZodString;
|
|
463
523
|
immutable: z.ZodDefault<z.ZodBoolean>;
|
|
464
524
|
payerAccountId: z.ZodOptional<z.ZodString>;
|
|
525
|
+
ruleRef: z.ZodOptional<z.ZodObject<{
|
|
526
|
+
chain: z.ZodEnum<[
|
|
527
|
+
"hedera",
|
|
528
|
+
"xrpl",
|
|
529
|
+
"polkadot",
|
|
530
|
+
"solana",
|
|
531
|
+
"stellar",
|
|
532
|
+
"ethereum",
|
|
533
|
+
"polygon",
|
|
534
|
+
"bitcoin",
|
|
535
|
+
"cardano"
|
|
536
|
+
]>;
|
|
537
|
+
topicId: z.ZodString;
|
|
538
|
+
consensusTimestamp: z.ZodString;
|
|
539
|
+
}, "strip", z.ZodTypeAny, {
|
|
540
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
541
|
+
topicId: string;
|
|
542
|
+
consensusTimestamp: string;
|
|
543
|
+
}, {
|
|
544
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
545
|
+
topicId: string;
|
|
546
|
+
consensusTimestamp: string;
|
|
547
|
+
}>>;
|
|
548
|
+
entityType: z.ZodOptional<z.ZodString>;
|
|
465
549
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
466
550
|
}, "strip", z.ZodTypeAny, {
|
|
467
551
|
symbol: string;
|
|
@@ -484,6 +568,12 @@ declare const CreateTokenRequestSchema: z.ZodObject<{
|
|
|
484
568
|
initialSupply: string;
|
|
485
569
|
metadata?: Record<string, any> | undefined;
|
|
486
570
|
payerAccountId?: string | undefined;
|
|
571
|
+
ruleRef?: {
|
|
572
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
573
|
+
topicId: string;
|
|
574
|
+
consensusTimestamp: string;
|
|
575
|
+
} | undefined;
|
|
576
|
+
entityType?: string | undefined;
|
|
487
577
|
treasury?: string | undefined;
|
|
488
578
|
}, {
|
|
489
579
|
symbol: string;
|
|
@@ -506,6 +596,12 @@ declare const CreateTokenRequestSchema: z.ZodObject<{
|
|
|
506
596
|
metadata?: Record<string, any> | undefined;
|
|
507
597
|
payerAccountId?: string | undefined;
|
|
508
598
|
immutable?: boolean | undefined;
|
|
599
|
+
ruleRef?: {
|
|
600
|
+
chain: "hedera" | "xrpl" | "polkadot" | "solana" | "stellar" | "ethereum" | "polygon" | "bitcoin" | "cardano";
|
|
601
|
+
topicId: string;
|
|
602
|
+
consensusTimestamp: string;
|
|
603
|
+
} | undefined;
|
|
604
|
+
entityType?: string | undefined;
|
|
509
605
|
treasury?: string | undefined;
|
|
510
606
|
}>;
|
|
511
607
|
export type CreateTokenRequest = z.infer<typeof CreateTokenRequestSchema>;
|
|
@@ -1626,7 +1722,7 @@ export interface AuthenticateResponse {
|
|
|
1626
1722
|
expiresAt: string;
|
|
1627
1723
|
message: string;
|
|
1628
1724
|
}
|
|
1629
|
-
export type SubscriptionTierName = "
|
|
1725
|
+
export type SubscriptionTierName = "builder" | "growth" | "scale" | "enterprise";
|
|
1630
1726
|
export type SubscriptionStatus = "pending_deposit" | "deposit_confirmed" | "active" | "expired" | "cancelled";
|
|
1631
1727
|
export type DepositWalletStatus = "pending" | "locked" | "expired" | "slashed" | "released";
|
|
1632
1728
|
export type SubscriptionTierInfo = {
|
|
@@ -2148,6 +2244,8 @@ export type PrepareTransferRequest = {
|
|
|
2148
2244
|
securityMode?: SecurityMode;
|
|
2149
2245
|
appOwnerPublicKey?: string;
|
|
2150
2246
|
ss58Format?: number;
|
|
2247
|
+
ruleRef?: RuleRefInput;
|
|
2248
|
+
entityType?: string;
|
|
2151
2249
|
};
|
|
2152
2250
|
export type PrepareNftMintRequest = {
|
|
2153
2251
|
chain: ChainType;
|
|
@@ -3341,6 +3439,18 @@ declare class AgentsClient {
|
|
|
3341
3439
|
success: boolean;
|
|
3342
3440
|
}>;
|
|
3343
3441
|
}
|
|
3442
|
+
export type BuildAttestation = {
|
|
3443
|
+
readonly version: "1";
|
|
3444
|
+
readonly appId: string;
|
|
3445
|
+
readonly developerWallet: string;
|
|
3446
|
+
readonly developerChain: ChainType;
|
|
3447
|
+
readonly framework: "ionic" | "nestjs";
|
|
3448
|
+
readonly sdkVersion: string;
|
|
3449
|
+
readonly imageDigest: string;
|
|
3450
|
+
readonly bundleSha256: string;
|
|
3451
|
+
readonly cliVersion: string;
|
|
3452
|
+
readonly builtAt: number;
|
|
3453
|
+
};
|
|
3344
3454
|
export type BaasService = "auth" | "database" | "storage" | "functions" | "messaging";
|
|
3345
3455
|
export type BaasSupportedChain = "hedera" | "xrpl" | "polkadot" | "solana";
|
|
3346
3456
|
export type BaasEndpoints = {
|
|
@@ -3587,6 +3697,7 @@ export type BaasInitResponse = {
|
|
|
3587
3697
|
repository: string;
|
|
3588
3698
|
};
|
|
3589
3699
|
};
|
|
3700
|
+
export type BaasReissuePushCredentialsResponse = BaasInitResponse;
|
|
3590
3701
|
export type BaasDeployRequest = {
|
|
3591
3702
|
tag: string;
|
|
3592
3703
|
port?: number;
|
|
@@ -3598,6 +3709,10 @@ export type BaasDeployRequest = {
|
|
|
3598
3709
|
memory?: string;
|
|
3599
3710
|
};
|
|
3600
3711
|
strategy?: "rolling" | "recreate";
|
|
3712
|
+
attestation?: {
|
|
3713
|
+
payload: BuildAttestation;
|
|
3714
|
+
signature: string;
|
|
3715
|
+
};
|
|
3601
3716
|
};
|
|
3602
3717
|
export type BaasDeployResponse = {
|
|
3603
3718
|
appId: string;
|
|
@@ -3642,6 +3757,8 @@ declare class DeploymentClient {
|
|
|
3642
3757
|
private readonly http;
|
|
3643
3758
|
constructor(http: HttpClient);
|
|
3644
3759
|
init(request: BaasInitRequest): Promise<BaasInitResponse>;
|
|
3760
|
+
pushCredentials(appId: string): Promise<BaasInitResponse>;
|
|
3761
|
+
reissuePushCredentials(appId: string): Promise<BaasReissuePushCredentialsResponse>;
|
|
3645
3762
|
uploadFrontend(appId: string, bundle: Blob | Buffer, filename?: string): Promise<BaasUploadFrontendResponse>;
|
|
3646
3763
|
deploy(appId: string, request: BaasDeployRequest): Promise<BaasDeployResponse>;
|
|
3647
3764
|
rollback(appId: string, request: BaasRollbackRequest): Promise<BaasDeployResponse>;
|
|
@@ -4779,7 +4896,7 @@ export type CustomerSessionInfo = {
|
|
|
4779
4896
|
customerAddress: string;
|
|
4780
4897
|
subscriptionContext?: {
|
|
4781
4898
|
nftSerial: number;
|
|
4782
|
-
tier: "
|
|
4899
|
+
tier: "builder" | "growth" | "scale" | "enterprise";
|
|
4783
4900
|
expiresAt: string;
|
|
4784
4901
|
allowedAutomations?: string[];
|
|
4785
4902
|
};
|
|
@@ -12174,17 +12291,40 @@ type CreateTokenRequest$1 = {
|
|
|
12174
12291
|
initialSupply?: string;
|
|
12175
12292
|
ruleRef: RuleRef;
|
|
12176
12293
|
memo?: string;
|
|
12294
|
+
securityMode?: EntitySecurityMode;
|
|
12295
|
+
payerAccountId?: string;
|
|
12296
|
+
fundWith?: FundWith;
|
|
12177
12297
|
};
|
|
12298
|
+
export type EntitySecurityMode = "partial" | "full";
|
|
12299
|
+
export type PreparedEntityCreation = {
|
|
12300
|
+
entityId: string;
|
|
12301
|
+
chain: ChainType;
|
|
12302
|
+
address: string;
|
|
12303
|
+
reserveRequirement: string;
|
|
12304
|
+
prepared: PreparedTransaction[];
|
|
12305
|
+
};
|
|
12306
|
+
export type FundWith = (prepared: PreparedTransaction[], ctx: {
|
|
12307
|
+
address: string;
|
|
12308
|
+
reserveRequirement: string;
|
|
12309
|
+
}) => Promise<{
|
|
12310
|
+
signedFundingBlob?: string;
|
|
12311
|
+
} | void>;
|
|
12178
12312
|
type CreateAccountRequest$1 = {
|
|
12179
12313
|
chain: ChainType;
|
|
12180
12314
|
ruleRef: RuleRef;
|
|
12181
12315
|
initialBalance?: string;
|
|
12182
12316
|
publicKey?: string;
|
|
12317
|
+
securityMode?: EntitySecurityMode;
|
|
12318
|
+
payerAccountId?: string;
|
|
12319
|
+
fundWith?: FundWith;
|
|
12183
12320
|
};
|
|
12184
12321
|
export type CreateTopicRequest = {
|
|
12185
12322
|
chain: ChainType;
|
|
12186
12323
|
ruleRef: RuleRef;
|
|
12187
12324
|
memo?: string;
|
|
12325
|
+
securityMode?: EntitySecurityMode;
|
|
12326
|
+
payerAccountId?: string;
|
|
12327
|
+
fundWith?: FundWith;
|
|
12188
12328
|
};
|
|
12189
12329
|
export type CreateAgentRequest = {
|
|
12190
12330
|
primaryChain: ChainType;
|
|
@@ -12244,8 +12384,34 @@ export type LaunchpadEntityResult = {
|
|
|
12244
12384
|
export declare class EntitiesClient {
|
|
12245
12385
|
private readonly http;
|
|
12246
12386
|
constructor(http: HttpClient);
|
|
12387
|
+
private static readonly PAYER_FUNDED_TOKEN_CHAINS;
|
|
12388
|
+
prepareCreateToken(req: Omit<CreateTokenRequest$1, "fundWith">): Promise<PreparedEntityCreation>;
|
|
12389
|
+
executeCreateToken(req: {
|
|
12390
|
+
entityId: string;
|
|
12391
|
+
chain: ChainType;
|
|
12392
|
+
securityMode?: EntitySecurityMode;
|
|
12393
|
+
createTxId?: string;
|
|
12394
|
+
signedFundingBlob?: string;
|
|
12395
|
+
}): Promise<EntityCreationResult>;
|
|
12247
12396
|
createToken(req: CreateTokenRequest$1): Promise<EntityCreationResult>;
|
|
12397
|
+
prepareCreateAccount(req: Omit<CreateAccountRequest$1, "fundWith">): Promise<PreparedEntityCreation>;
|
|
12398
|
+
executeCreateAccount(req: {
|
|
12399
|
+
entityId: string;
|
|
12400
|
+
chain: ChainType;
|
|
12401
|
+
securityMode?: EntitySecurityMode;
|
|
12402
|
+
signedFundingBlob?: string;
|
|
12403
|
+
createTxId?: string;
|
|
12404
|
+
}): Promise<EntityCreationResult>;
|
|
12405
|
+
private static readonly PAYER_FUNDED_CREATE_CHAINS;
|
|
12406
|
+
private static readonly FUNDING_BLOB_RELAY_CHAINS;
|
|
12248
12407
|
createAccount(req: CreateAccountRequest$1): Promise<EntityCreationResult>;
|
|
12408
|
+
prepareCreateTopic(req: Omit<CreateTopicRequest, "fundWith">): Promise<PreparedEntityCreation>;
|
|
12409
|
+
executeCreateTopic(req: {
|
|
12410
|
+
entityId: string;
|
|
12411
|
+
chain: ChainType;
|
|
12412
|
+
createTxId: string;
|
|
12413
|
+
securityMode?: EntitySecurityMode;
|
|
12414
|
+
}): Promise<EntityCreationResult>;
|
|
12249
12415
|
createTopic(req: CreateTopicRequest): Promise<EntityCreationResult>;
|
|
12250
12416
|
createAgent(req: CreateAgentRequest): Promise<EntityCreationResult>;
|
|
12251
12417
|
launchpad(req: LaunchpadEntityRequest): Promise<LaunchpadEntityResult>;
|
|
@@ -12284,6 +12450,7 @@ declare class BaasClient {
|
|
|
12284
12450
|
private readonly timeout;
|
|
12285
12451
|
private readonly allowInsecure;
|
|
12286
12452
|
private readonly http;
|
|
12453
|
+
private readonly txHttp;
|
|
12287
12454
|
private lastHttpError?;
|
|
12288
12455
|
private authContext?;
|
|
12289
12456
|
readonly db: DatabaseClient;
|
|
@@ -12295,6 +12462,7 @@ declare class BaasClient {
|
|
|
12295
12462
|
readonly customerSession: CustomerSessionClient;
|
|
12296
12463
|
readonly rules: RulesClient;
|
|
12297
12464
|
readonly entities: EntitiesClient;
|
|
12465
|
+
readonly transactions: TransactionsClient;
|
|
12298
12466
|
constructor(config: BaasClientConfig);
|
|
12299
12467
|
static connectToCluster(config: BaasConnectToClusterConfig): Promise<BaasClient>;
|
|
12300
12468
|
setAppId(appId: string): void;
|