@twin.org/engine 0.0.1-next.41 → 0.0.1-next.45
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/cjs/index.cjs
CHANGED
|
@@ -363,6 +363,7 @@ function configureBlobStorageConnectors(coreConfig, envVars) {
|
|
|
363
363
|
* @param envVars The environment variables.
|
|
364
364
|
*/
|
|
365
365
|
function configureLoggingConnectors(coreConfig, envVars) {
|
|
366
|
+
coreConfig.types.loggingConnector ??= [];
|
|
366
367
|
const loggingConnectors = (envVars.loggingConnector ?? "").split(",");
|
|
367
368
|
for (const loggingConnector of loggingConnectors) {
|
|
368
369
|
if (loggingConnector === engineTypes.LoggingConnectorType.Console) {
|
|
@@ -373,12 +374,14 @@ function configureLoggingConnectors(coreConfig, envVars) {
|
|
|
373
374
|
translateMessages: true,
|
|
374
375
|
hideGroups: true
|
|
375
376
|
}
|
|
376
|
-
}
|
|
377
|
+
},
|
|
378
|
+
isDefault: loggingConnectors.length === 1
|
|
377
379
|
});
|
|
378
380
|
}
|
|
379
381
|
else if (loggingConnector === engineTypes.LoggingConnectorType.EntityStorage) {
|
|
380
382
|
coreConfig.types.loggingConnector?.push({
|
|
381
|
-
type: engineTypes.LoggingConnectorType.EntityStorage
|
|
383
|
+
type: engineTypes.LoggingConnectorType.EntityStorage,
|
|
384
|
+
isDefault: loggingConnectors.length === 1
|
|
382
385
|
});
|
|
383
386
|
}
|
|
384
387
|
}
|
|
@@ -553,32 +556,32 @@ function configureFaucetConnectors(coreConfig, envVars) {
|
|
|
553
556
|
type: engineTypes.FaucetConnectorType.EntityStorage
|
|
554
557
|
});
|
|
555
558
|
}
|
|
556
|
-
else if (envVars.faucetConnector === engineTypes.FaucetConnectorType.
|
|
559
|
+
else if (envVars.faucetConnector === engineTypes.FaucetConnectorType.IotaStardust) {
|
|
557
560
|
coreConfig.types.faucetConnector.push({
|
|
558
|
-
type: engineTypes.FaucetConnectorType.
|
|
561
|
+
type: engineTypes.FaucetConnectorType.IotaStardust,
|
|
559
562
|
options: {
|
|
560
563
|
config: {
|
|
561
|
-
endpoint: envVars.
|
|
564
|
+
endpoint: envVars.iotaStardustFaucetEndpoint ?? "",
|
|
562
565
|
clientOptions: {
|
|
563
|
-
nodes: [envVars.
|
|
566
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
564
567
|
},
|
|
565
|
-
bech32Hrp: envVars.
|
|
566
|
-
coinType: core.Coerce.number(envVars.
|
|
568
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
569
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
567
570
|
}
|
|
568
571
|
}
|
|
569
572
|
});
|
|
570
573
|
}
|
|
571
|
-
else if (envVars.faucetConnector === engineTypes.FaucetConnectorType.
|
|
574
|
+
else if (envVars.faucetConnector === engineTypes.FaucetConnectorType.Iota) {
|
|
572
575
|
coreConfig.types.faucetConnector.push({
|
|
573
|
-
type: engineTypes.FaucetConnectorType.
|
|
576
|
+
type: engineTypes.FaucetConnectorType.Iota,
|
|
574
577
|
options: {
|
|
575
578
|
config: {
|
|
576
|
-
endpoint: envVars.
|
|
579
|
+
endpoint: envVars.iotaFaucetEndpoint ?? "",
|
|
577
580
|
clientOptions: {
|
|
578
|
-
url: envVars.
|
|
581
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
579
582
|
},
|
|
580
|
-
network: envVars.
|
|
581
|
-
coinType: core.Coerce.number(envVars.
|
|
583
|
+
network: envVars.iotaNetwork ?? "",
|
|
584
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
582
585
|
}
|
|
583
586
|
}
|
|
584
587
|
});
|
|
@@ -596,30 +599,30 @@ function configureWalletConnectors(coreConfig, envVars) {
|
|
|
596
599
|
type: engineTypes.WalletConnectorType.EntityStorage
|
|
597
600
|
});
|
|
598
601
|
}
|
|
599
|
-
else if (envVars.walletConnector === engineTypes.WalletConnectorType.
|
|
602
|
+
else if (envVars.walletConnector === engineTypes.WalletConnectorType.IotaStardust) {
|
|
600
603
|
coreConfig.types.walletConnector.push({
|
|
601
|
-
type: engineTypes.WalletConnectorType.
|
|
604
|
+
type: engineTypes.WalletConnectorType.IotaStardust,
|
|
602
605
|
options: {
|
|
603
606
|
config: {
|
|
604
607
|
clientOptions: {
|
|
605
|
-
nodes: [envVars.
|
|
608
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
606
609
|
},
|
|
607
|
-
bech32Hrp: envVars.
|
|
608
|
-
coinType: core.Coerce.number(envVars.
|
|
610
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
611
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
609
612
|
}
|
|
610
613
|
}
|
|
611
614
|
});
|
|
612
615
|
}
|
|
613
|
-
else if (envVars.walletConnector === engineTypes.WalletConnectorType.
|
|
616
|
+
else if (envVars.walletConnector === engineTypes.WalletConnectorType.Iota) {
|
|
614
617
|
coreConfig.types.walletConnector.push({
|
|
615
|
-
type: engineTypes.WalletConnectorType.
|
|
618
|
+
type: engineTypes.WalletConnectorType.Iota,
|
|
616
619
|
options: {
|
|
617
620
|
config: {
|
|
618
621
|
clientOptions: {
|
|
619
|
-
url: envVars.
|
|
622
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
620
623
|
},
|
|
621
|
-
network: envVars.
|
|
622
|
-
coinType: core.Coerce.number(envVars.
|
|
624
|
+
network: envVars.iotaNetwork ?? "",
|
|
625
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
623
626
|
}
|
|
624
627
|
}
|
|
625
628
|
});
|
|
@@ -637,30 +640,30 @@ function configureNftConnectors(coreConfig, envVars) {
|
|
|
637
640
|
type: engineTypes.NftConnectorType.EntityStorage
|
|
638
641
|
});
|
|
639
642
|
}
|
|
640
|
-
else if (envVars.nftConnector === engineTypes.NftConnectorType.
|
|
643
|
+
else if (envVars.nftConnector === engineTypes.NftConnectorType.IotaStardust) {
|
|
641
644
|
coreConfig.types.nftConnector.push({
|
|
642
|
-
type: engineTypes.NftConnectorType.
|
|
645
|
+
type: engineTypes.NftConnectorType.IotaStardust,
|
|
643
646
|
options: {
|
|
644
647
|
config: {
|
|
645
648
|
clientOptions: {
|
|
646
|
-
nodes: [envVars.
|
|
649
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
647
650
|
},
|
|
648
|
-
bech32Hrp: envVars.
|
|
649
|
-
coinType: core.Coerce.number(envVars.
|
|
651
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
652
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
650
653
|
}
|
|
651
654
|
}
|
|
652
655
|
});
|
|
653
656
|
}
|
|
654
|
-
else if (envVars.nftConnector === engineTypes.NftConnectorType.
|
|
657
|
+
else if (envVars.nftConnector === engineTypes.NftConnectorType.Iota) {
|
|
655
658
|
coreConfig.types.nftConnector.push({
|
|
656
|
-
type: engineTypes.NftConnectorType.
|
|
659
|
+
type: engineTypes.NftConnectorType.Iota,
|
|
657
660
|
options: {
|
|
658
661
|
config: {
|
|
659
662
|
clientOptions: {
|
|
660
|
-
url: envVars.
|
|
663
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
661
664
|
},
|
|
662
|
-
network: envVars.
|
|
663
|
-
coinType: core.Coerce.number(envVars.
|
|
665
|
+
network: envVars.iotaNetwork ?? "",
|
|
666
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
664
667
|
}
|
|
665
668
|
}
|
|
666
669
|
});
|
|
@@ -682,30 +685,30 @@ function configureImmutableStorageConnectors(coreConfig, envVars) {
|
|
|
682
685
|
type: engineTypes.ImmutableStorageConnectorType.EntityStorage
|
|
683
686
|
});
|
|
684
687
|
}
|
|
685
|
-
else if (envVars.immutableStorageConnector === engineTypes.ImmutableStorageConnectorType.
|
|
688
|
+
else if (envVars.immutableStorageConnector === engineTypes.ImmutableStorageConnectorType.IotaStardust) {
|
|
686
689
|
coreConfig.types.immutableStorageConnector.push({
|
|
687
|
-
type: engineTypes.ImmutableStorageConnectorType.
|
|
690
|
+
type: engineTypes.ImmutableStorageConnectorType.IotaStardust,
|
|
688
691
|
options: {
|
|
689
692
|
config: {
|
|
690
693
|
clientOptions: {
|
|
691
|
-
nodes: [envVars.
|
|
694
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
692
695
|
},
|
|
693
|
-
bech32Hrp: envVars.
|
|
694
|
-
coinType: core.Coerce.number(envVars.
|
|
696
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
697
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
695
698
|
}
|
|
696
699
|
}
|
|
697
700
|
});
|
|
698
701
|
}
|
|
699
|
-
else if (envVars.immutableStorageConnector === engineTypes.ImmutableStorageConnectorType.
|
|
702
|
+
else if (envVars.immutableStorageConnector === engineTypes.ImmutableStorageConnectorType.Iota) {
|
|
700
703
|
coreConfig.types.immutableStorageConnector.push({
|
|
701
|
-
type: engineTypes.ImmutableStorageConnectorType.
|
|
704
|
+
type: engineTypes.ImmutableStorageConnectorType.Iota,
|
|
702
705
|
options: {
|
|
703
706
|
config: {
|
|
704
707
|
clientOptions: {
|
|
705
|
-
url: envVars.
|
|
708
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
706
709
|
},
|
|
707
|
-
network: envVars.
|
|
708
|
-
coinType: core.Coerce.number(envVars.
|
|
710
|
+
network: envVars.iotaNetwork ?? "",
|
|
711
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
709
712
|
}
|
|
710
713
|
}
|
|
711
714
|
});
|
|
@@ -743,30 +746,30 @@ function configureIdentityConnectors(coreConfig, envVars) {
|
|
|
743
746
|
type: engineTypes.IdentityConnectorType.EntityStorage
|
|
744
747
|
});
|
|
745
748
|
}
|
|
746
|
-
else if (envVars.identityConnector === engineTypes.IdentityConnectorType.
|
|
749
|
+
else if (envVars.identityConnector === engineTypes.IdentityConnectorType.IotaStardust) {
|
|
747
750
|
coreConfig.types.identityConnector.push({
|
|
748
|
-
type: engineTypes.IdentityConnectorType.
|
|
751
|
+
type: engineTypes.IdentityConnectorType.IotaStardust,
|
|
749
752
|
options: {
|
|
750
753
|
config: {
|
|
751
754
|
clientOptions: {
|
|
752
|
-
nodes: [envVars.
|
|
755
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
753
756
|
},
|
|
754
|
-
bech32Hrp: envVars.
|
|
755
|
-
coinType: core.Coerce.number(envVars.
|
|
757
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
758
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
756
759
|
}
|
|
757
760
|
}
|
|
758
761
|
});
|
|
759
762
|
}
|
|
760
|
-
else if (envVars.identityConnector === engineTypes.IdentityConnectorType.
|
|
763
|
+
else if (envVars.identityConnector === engineTypes.IdentityConnectorType.Iota) {
|
|
761
764
|
coreConfig.types.identityConnector.push({
|
|
762
|
-
type: engineTypes.IdentityConnectorType.
|
|
765
|
+
type: engineTypes.IdentityConnectorType.Iota,
|
|
763
766
|
options: {
|
|
764
767
|
config: {
|
|
765
768
|
clientOptions: {
|
|
766
|
-
url: envVars.
|
|
769
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
767
770
|
},
|
|
768
|
-
network: envVars.
|
|
769
|
-
coinType: core.Coerce.number(envVars.
|
|
771
|
+
network: envVars.iotaNetwork ?? "",
|
|
772
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
770
773
|
}
|
|
771
774
|
}
|
|
772
775
|
});
|
|
@@ -788,30 +791,30 @@ function configureIdentityResolverConnectors(coreConfig, envVars) {
|
|
|
788
791
|
type: engineTypes.IdentityResolverConnectorType.EntityStorage
|
|
789
792
|
});
|
|
790
793
|
}
|
|
791
|
-
else if (envVars.identityResolverConnector === engineTypes.IdentityResolverConnectorType.
|
|
794
|
+
else if (envVars.identityResolverConnector === engineTypes.IdentityResolverConnectorType.IotaStardust) {
|
|
792
795
|
coreConfig.types.identityResolverConnector.push({
|
|
793
|
-
type: engineTypes.IdentityResolverConnectorType.
|
|
796
|
+
type: engineTypes.IdentityResolverConnectorType.IotaStardust,
|
|
794
797
|
options: {
|
|
795
798
|
config: {
|
|
796
799
|
clientOptions: {
|
|
797
|
-
nodes: [envVars.
|
|
800
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
798
801
|
},
|
|
799
|
-
bech32Hrp: envVars.
|
|
800
|
-
coinType: core.Coerce.number(envVars.
|
|
802
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
803
|
+
coinType: core.Coerce.number(envVars.iotaStardustCoinType)
|
|
801
804
|
}
|
|
802
805
|
}
|
|
803
806
|
});
|
|
804
807
|
}
|
|
805
|
-
else if (envVars.identityResolverConnector === engineTypes.IdentityResolverConnectorType.
|
|
808
|
+
else if (envVars.identityResolverConnector === engineTypes.IdentityResolverConnectorType.Iota) {
|
|
806
809
|
coreConfig.types.identityResolverConnector.push({
|
|
807
|
-
type: engineTypes.IdentityResolverConnectorType.
|
|
810
|
+
type: engineTypes.IdentityResolverConnectorType.Iota,
|
|
808
811
|
options: {
|
|
809
812
|
config: {
|
|
810
813
|
clientOptions: {
|
|
811
|
-
url: envVars.
|
|
814
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
812
815
|
},
|
|
813
|
-
network: envVars.
|
|
814
|
-
coinType: core.Coerce.number(envVars.
|
|
816
|
+
network: envVars.iotaNetwork ?? "",
|
|
817
|
+
coinType: core.Coerce.number(envVars.iotaCoinType)
|
|
815
818
|
}
|
|
816
819
|
}
|
|
817
820
|
});
|
package/dist/esm/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EngineCore } from '@twin.org/engine-core';
|
|
2
2
|
import path from 'node:path';
|
|
3
3
|
import { Is, Coerce } from '@twin.org/core';
|
|
4
|
-
import { EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, LoggingConnectorType, LoggingComponentType,
|
|
4
|
+
import { EntityStorageConnectorType, BlobStorageConnectorType, BlobStorageComponentType, VaultConnectorType, LoggingConnectorType, LoggingComponentType, BackgroundTaskConnectorType, EventBusConnectorType, EventBusComponentType, TelemetryConnectorType, TelemetryComponentType, MessagingEmailConnectorType, MessagingSmsConnectorType, MessagingPushNotificationConnectorType, MessagingComponentType, FaucetConnectorType, WalletConnectorType, NftConnectorType, NftComponentType, ImmutableStorageConnectorType, ImmutableProofComponentType, AuditableItemGraphComponentType, AuditableItemStreamComponentType, IdentityConnectorType, IdentityComponentType, IdentityResolverConnectorType, IdentityResolverComponentType, IdentityProfileConnectorType, IdentityProfileComponentType, AttestationConnectorType, AttestationComponentType, DataConverterConnectorType, DataExtractorConnectorType, DataProcessingComponentType } from '@twin.org/engine-types';
|
|
5
5
|
|
|
6
6
|
// Copyright 2024 IOTA Stiftung.
|
|
7
7
|
// SPDX-License-Identifier: Apache-2.0.
|
|
@@ -361,6 +361,7 @@ function configureBlobStorageConnectors(coreConfig, envVars) {
|
|
|
361
361
|
* @param envVars The environment variables.
|
|
362
362
|
*/
|
|
363
363
|
function configureLoggingConnectors(coreConfig, envVars) {
|
|
364
|
+
coreConfig.types.loggingConnector ??= [];
|
|
364
365
|
const loggingConnectors = (envVars.loggingConnector ?? "").split(",");
|
|
365
366
|
for (const loggingConnector of loggingConnectors) {
|
|
366
367
|
if (loggingConnector === LoggingConnectorType.Console) {
|
|
@@ -371,12 +372,14 @@ function configureLoggingConnectors(coreConfig, envVars) {
|
|
|
371
372
|
translateMessages: true,
|
|
372
373
|
hideGroups: true
|
|
373
374
|
}
|
|
374
|
-
}
|
|
375
|
+
},
|
|
376
|
+
isDefault: loggingConnectors.length === 1
|
|
375
377
|
});
|
|
376
378
|
}
|
|
377
379
|
else if (loggingConnector === LoggingConnectorType.EntityStorage) {
|
|
378
380
|
coreConfig.types.loggingConnector?.push({
|
|
379
|
-
type: LoggingConnectorType.EntityStorage
|
|
381
|
+
type: LoggingConnectorType.EntityStorage,
|
|
382
|
+
isDefault: loggingConnectors.length === 1
|
|
380
383
|
});
|
|
381
384
|
}
|
|
382
385
|
}
|
|
@@ -551,32 +554,32 @@ function configureFaucetConnectors(coreConfig, envVars) {
|
|
|
551
554
|
type: FaucetConnectorType.EntityStorage
|
|
552
555
|
});
|
|
553
556
|
}
|
|
554
|
-
else if (envVars.faucetConnector === FaucetConnectorType.
|
|
557
|
+
else if (envVars.faucetConnector === FaucetConnectorType.IotaStardust) {
|
|
555
558
|
coreConfig.types.faucetConnector.push({
|
|
556
|
-
type: FaucetConnectorType.
|
|
559
|
+
type: FaucetConnectorType.IotaStardust,
|
|
557
560
|
options: {
|
|
558
561
|
config: {
|
|
559
|
-
endpoint: envVars.
|
|
562
|
+
endpoint: envVars.iotaStardustFaucetEndpoint ?? "",
|
|
560
563
|
clientOptions: {
|
|
561
|
-
nodes: [envVars.
|
|
564
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
562
565
|
},
|
|
563
|
-
bech32Hrp: envVars.
|
|
564
|
-
coinType: Coerce.number(envVars.
|
|
566
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
567
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
565
568
|
}
|
|
566
569
|
}
|
|
567
570
|
});
|
|
568
571
|
}
|
|
569
|
-
else if (envVars.faucetConnector === FaucetConnectorType.
|
|
572
|
+
else if (envVars.faucetConnector === FaucetConnectorType.Iota) {
|
|
570
573
|
coreConfig.types.faucetConnector.push({
|
|
571
|
-
type: FaucetConnectorType.
|
|
574
|
+
type: FaucetConnectorType.Iota,
|
|
572
575
|
options: {
|
|
573
576
|
config: {
|
|
574
|
-
endpoint: envVars.
|
|
577
|
+
endpoint: envVars.iotaFaucetEndpoint ?? "",
|
|
575
578
|
clientOptions: {
|
|
576
|
-
url: envVars.
|
|
579
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
577
580
|
},
|
|
578
|
-
network: envVars.
|
|
579
|
-
coinType: Coerce.number(envVars.
|
|
581
|
+
network: envVars.iotaNetwork ?? "",
|
|
582
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
580
583
|
}
|
|
581
584
|
}
|
|
582
585
|
});
|
|
@@ -594,30 +597,30 @@ function configureWalletConnectors(coreConfig, envVars) {
|
|
|
594
597
|
type: WalletConnectorType.EntityStorage
|
|
595
598
|
});
|
|
596
599
|
}
|
|
597
|
-
else if (envVars.walletConnector === WalletConnectorType.
|
|
600
|
+
else if (envVars.walletConnector === WalletConnectorType.IotaStardust) {
|
|
598
601
|
coreConfig.types.walletConnector.push({
|
|
599
|
-
type: WalletConnectorType.
|
|
602
|
+
type: WalletConnectorType.IotaStardust,
|
|
600
603
|
options: {
|
|
601
604
|
config: {
|
|
602
605
|
clientOptions: {
|
|
603
|
-
nodes: [envVars.
|
|
606
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
604
607
|
},
|
|
605
|
-
bech32Hrp: envVars.
|
|
606
|
-
coinType: Coerce.number(envVars.
|
|
608
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
609
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
607
610
|
}
|
|
608
611
|
}
|
|
609
612
|
});
|
|
610
613
|
}
|
|
611
|
-
else if (envVars.walletConnector === WalletConnectorType.
|
|
614
|
+
else if (envVars.walletConnector === WalletConnectorType.Iota) {
|
|
612
615
|
coreConfig.types.walletConnector.push({
|
|
613
|
-
type: WalletConnectorType.
|
|
616
|
+
type: WalletConnectorType.Iota,
|
|
614
617
|
options: {
|
|
615
618
|
config: {
|
|
616
619
|
clientOptions: {
|
|
617
|
-
url: envVars.
|
|
620
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
618
621
|
},
|
|
619
|
-
network: envVars.
|
|
620
|
-
coinType: Coerce.number(envVars.
|
|
622
|
+
network: envVars.iotaNetwork ?? "",
|
|
623
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
621
624
|
}
|
|
622
625
|
}
|
|
623
626
|
});
|
|
@@ -635,30 +638,30 @@ function configureNftConnectors(coreConfig, envVars) {
|
|
|
635
638
|
type: NftConnectorType.EntityStorage
|
|
636
639
|
});
|
|
637
640
|
}
|
|
638
|
-
else if (envVars.nftConnector === NftConnectorType.
|
|
641
|
+
else if (envVars.nftConnector === NftConnectorType.IotaStardust) {
|
|
639
642
|
coreConfig.types.nftConnector.push({
|
|
640
|
-
type: NftConnectorType.
|
|
643
|
+
type: NftConnectorType.IotaStardust,
|
|
641
644
|
options: {
|
|
642
645
|
config: {
|
|
643
646
|
clientOptions: {
|
|
644
|
-
nodes: [envVars.
|
|
647
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
645
648
|
},
|
|
646
|
-
bech32Hrp: envVars.
|
|
647
|
-
coinType: Coerce.number(envVars.
|
|
649
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
650
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
648
651
|
}
|
|
649
652
|
}
|
|
650
653
|
});
|
|
651
654
|
}
|
|
652
|
-
else if (envVars.nftConnector === NftConnectorType.
|
|
655
|
+
else if (envVars.nftConnector === NftConnectorType.Iota) {
|
|
653
656
|
coreConfig.types.nftConnector.push({
|
|
654
|
-
type: NftConnectorType.
|
|
657
|
+
type: NftConnectorType.Iota,
|
|
655
658
|
options: {
|
|
656
659
|
config: {
|
|
657
660
|
clientOptions: {
|
|
658
|
-
url: envVars.
|
|
661
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
659
662
|
},
|
|
660
|
-
network: envVars.
|
|
661
|
-
coinType: Coerce.number(envVars.
|
|
663
|
+
network: envVars.iotaNetwork ?? "",
|
|
664
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
662
665
|
}
|
|
663
666
|
}
|
|
664
667
|
});
|
|
@@ -680,30 +683,30 @@ function configureImmutableStorageConnectors(coreConfig, envVars) {
|
|
|
680
683
|
type: ImmutableStorageConnectorType.EntityStorage
|
|
681
684
|
});
|
|
682
685
|
}
|
|
683
|
-
else if (envVars.immutableStorageConnector === ImmutableStorageConnectorType.
|
|
686
|
+
else if (envVars.immutableStorageConnector === ImmutableStorageConnectorType.IotaStardust) {
|
|
684
687
|
coreConfig.types.immutableStorageConnector.push({
|
|
685
|
-
type: ImmutableStorageConnectorType.
|
|
688
|
+
type: ImmutableStorageConnectorType.IotaStardust,
|
|
686
689
|
options: {
|
|
687
690
|
config: {
|
|
688
691
|
clientOptions: {
|
|
689
|
-
nodes: [envVars.
|
|
692
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
690
693
|
},
|
|
691
|
-
bech32Hrp: envVars.
|
|
692
|
-
coinType: Coerce.number(envVars.
|
|
694
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
695
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
693
696
|
}
|
|
694
697
|
}
|
|
695
698
|
});
|
|
696
699
|
}
|
|
697
|
-
else if (envVars.immutableStorageConnector === ImmutableStorageConnectorType.
|
|
700
|
+
else if (envVars.immutableStorageConnector === ImmutableStorageConnectorType.Iota) {
|
|
698
701
|
coreConfig.types.immutableStorageConnector.push({
|
|
699
|
-
type: ImmutableStorageConnectorType.
|
|
702
|
+
type: ImmutableStorageConnectorType.Iota,
|
|
700
703
|
options: {
|
|
701
704
|
config: {
|
|
702
705
|
clientOptions: {
|
|
703
|
-
url: envVars.
|
|
706
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
704
707
|
},
|
|
705
|
-
network: envVars.
|
|
706
|
-
coinType: Coerce.number(envVars.
|
|
708
|
+
network: envVars.iotaNetwork ?? "",
|
|
709
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
707
710
|
}
|
|
708
711
|
}
|
|
709
712
|
});
|
|
@@ -741,30 +744,30 @@ function configureIdentityConnectors(coreConfig, envVars) {
|
|
|
741
744
|
type: IdentityConnectorType.EntityStorage
|
|
742
745
|
});
|
|
743
746
|
}
|
|
744
|
-
else if (envVars.identityConnector === IdentityConnectorType.
|
|
747
|
+
else if (envVars.identityConnector === IdentityConnectorType.IotaStardust) {
|
|
745
748
|
coreConfig.types.identityConnector.push({
|
|
746
|
-
type: IdentityConnectorType.
|
|
749
|
+
type: IdentityConnectorType.IotaStardust,
|
|
747
750
|
options: {
|
|
748
751
|
config: {
|
|
749
752
|
clientOptions: {
|
|
750
|
-
nodes: [envVars.
|
|
753
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
751
754
|
},
|
|
752
|
-
bech32Hrp: envVars.
|
|
753
|
-
coinType: Coerce.number(envVars.
|
|
755
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
756
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
754
757
|
}
|
|
755
758
|
}
|
|
756
759
|
});
|
|
757
760
|
}
|
|
758
|
-
else if (envVars.identityConnector === IdentityConnectorType.
|
|
761
|
+
else if (envVars.identityConnector === IdentityConnectorType.Iota) {
|
|
759
762
|
coreConfig.types.identityConnector.push({
|
|
760
|
-
type: IdentityConnectorType.
|
|
763
|
+
type: IdentityConnectorType.Iota,
|
|
761
764
|
options: {
|
|
762
765
|
config: {
|
|
763
766
|
clientOptions: {
|
|
764
|
-
url: envVars.
|
|
767
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
765
768
|
},
|
|
766
|
-
network: envVars.
|
|
767
|
-
coinType: Coerce.number(envVars.
|
|
769
|
+
network: envVars.iotaNetwork ?? "",
|
|
770
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
768
771
|
}
|
|
769
772
|
}
|
|
770
773
|
});
|
|
@@ -786,30 +789,30 @@ function configureIdentityResolverConnectors(coreConfig, envVars) {
|
|
|
786
789
|
type: IdentityResolverConnectorType.EntityStorage
|
|
787
790
|
});
|
|
788
791
|
}
|
|
789
|
-
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.
|
|
792
|
+
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.IotaStardust) {
|
|
790
793
|
coreConfig.types.identityResolverConnector.push({
|
|
791
|
-
type: IdentityResolverConnectorType.
|
|
794
|
+
type: IdentityResolverConnectorType.IotaStardust,
|
|
792
795
|
options: {
|
|
793
796
|
config: {
|
|
794
797
|
clientOptions: {
|
|
795
|
-
nodes: [envVars.
|
|
798
|
+
nodes: [envVars.iotaStardustNodeEndpoint ?? ""]
|
|
796
799
|
},
|
|
797
|
-
bech32Hrp: envVars.
|
|
798
|
-
coinType: Coerce.number(envVars.
|
|
800
|
+
bech32Hrp: envVars.iotaStardustBech32Hrp,
|
|
801
|
+
coinType: Coerce.number(envVars.iotaStardustCoinType)
|
|
799
802
|
}
|
|
800
803
|
}
|
|
801
804
|
});
|
|
802
805
|
}
|
|
803
|
-
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.
|
|
806
|
+
else if (envVars.identityResolverConnector === IdentityResolverConnectorType.Iota) {
|
|
804
807
|
coreConfig.types.identityResolverConnector.push({
|
|
805
|
-
type: IdentityResolverConnectorType.
|
|
808
|
+
type: IdentityResolverConnectorType.Iota,
|
|
806
809
|
options: {
|
|
807
810
|
config: {
|
|
808
811
|
clientOptions: {
|
|
809
|
-
url: envVars.
|
|
812
|
+
url: envVars.iotaNodeEndpoint ?? ""
|
|
810
813
|
},
|
|
811
|
-
network: envVars.
|
|
812
|
-
coinType: Coerce.number(envVars.
|
|
814
|
+
network: envVars.iotaNetwork ?? "",
|
|
815
|
+
coinType: Coerce.number(envVars.iotaCoinType)
|
|
813
816
|
}
|
|
814
817
|
}
|
|
815
818
|
});
|
|
@@ -303,11 +303,11 @@ export interface IEngineEnvironmentVariables {
|
|
|
303
303
|
*/
|
|
304
304
|
nftConnector?: string;
|
|
305
305
|
/**
|
|
306
|
-
* The type of identity connector: entity-storage, iota, iota-
|
|
306
|
+
* The type of identity connector: entity-storage, iota, iota-stardust.
|
|
307
307
|
*/
|
|
308
308
|
identityConnector?: string;
|
|
309
309
|
/**
|
|
310
|
-
* The type of identity resolver connector: entity-storage, iota, iota-
|
|
310
|
+
* The type of identity resolver connector: entity-storage, iota, iota-stardust.
|
|
311
311
|
*/
|
|
312
312
|
identityResolverConnector?: string;
|
|
313
313
|
/**
|
|
@@ -315,45 +315,45 @@ export interface IEngineEnvironmentVariables {
|
|
|
315
315
|
*/
|
|
316
316
|
immutableStorageConnector?: string;
|
|
317
317
|
/**
|
|
318
|
-
* IOTA Faucet Endpoint.
|
|
318
|
+
* IOTA Stardust Faucet Endpoint.
|
|
319
319
|
*/
|
|
320
|
-
|
|
320
|
+
iotaStardustFaucetEndpoint?: string;
|
|
321
321
|
/**
|
|
322
|
-
* IOTA Node Endpoint.
|
|
322
|
+
* IOTA Stardust Node Endpoint.
|
|
323
323
|
*/
|
|
324
|
-
|
|
324
|
+
iotaStardustNodeEndpoint?: string;
|
|
325
325
|
/**
|
|
326
|
-
* IOTA Bech32 HRP
|
|
326
|
+
* IOTA Stardust Bech32 HRP
|
|
327
327
|
*/
|
|
328
|
-
|
|
328
|
+
iotaStardustBech32Hrp?: string;
|
|
329
329
|
/**
|
|
330
|
-
* IOTA coin type.
|
|
330
|
+
* IOTA Stardust coin type.
|
|
331
331
|
*/
|
|
332
|
-
|
|
332
|
+
iotaStardustCoinType?: string;
|
|
333
333
|
/**
|
|
334
|
-
* IOTA Explorer Endpoint.
|
|
334
|
+
* IOTA Stardust Explorer Endpoint.
|
|
335
335
|
*/
|
|
336
|
-
|
|
336
|
+
iotaStardustExplorerEndpoint?: string;
|
|
337
337
|
/**
|
|
338
|
-
* IOTA
|
|
338
|
+
* IOTA Faucet Endpoint.
|
|
339
339
|
*/
|
|
340
|
-
|
|
340
|
+
iotaFaucetEndpoint?: string;
|
|
341
341
|
/**
|
|
342
|
-
* IOTA
|
|
342
|
+
* IOTA Node Endpoint.
|
|
343
343
|
*/
|
|
344
|
-
|
|
344
|
+
iotaNodeEndpoint?: string;
|
|
345
345
|
/**
|
|
346
|
-
* IOTA
|
|
346
|
+
* IOTA network.
|
|
347
347
|
*/
|
|
348
|
-
|
|
348
|
+
iotaNetwork?: string;
|
|
349
349
|
/**
|
|
350
|
-
* IOTA
|
|
350
|
+
* IOTA coin type.
|
|
351
351
|
*/
|
|
352
|
-
|
|
352
|
+
iotaCoinType?: string;
|
|
353
353
|
/**
|
|
354
|
-
* IOTA
|
|
354
|
+
* IOTA Explorer Endpoint.
|
|
355
355
|
*/
|
|
356
|
-
|
|
356
|
+
iotaExplorerEndpoint?: string;
|
|
357
357
|
/**
|
|
358
358
|
* The type of identity profile connector: entity-storage.
|
|
359
359
|
*/
|
|
@@ -608,7 +608,7 @@ The type of NFT connector: entity-storage, iota.
|
|
|
608
608
|
|
|
609
609
|
> `optional` **identityConnector**: `string`
|
|
610
610
|
|
|
611
|
-
The type of identity connector: entity-storage, iota, iota-
|
|
611
|
+
The type of identity connector: entity-storage, iota, iota-stardust.
|
|
612
612
|
|
|
613
613
|
***
|
|
614
614
|
|
|
@@ -616,7 +616,7 @@ The type of identity connector: entity-storage, iota, iota-rebased.
|
|
|
616
616
|
|
|
617
617
|
> `optional` **identityResolverConnector**: `string`
|
|
618
618
|
|
|
619
|
-
The type of identity resolver connector: entity-storage, iota, iota-
|
|
619
|
+
The type of identity resolver connector: entity-storage, iota, iota-stardust.
|
|
620
620
|
|
|
621
621
|
***
|
|
622
622
|
|
|
@@ -628,83 +628,83 @@ The type of immutable storage connector: entity-storage, iota.
|
|
|
628
628
|
|
|
629
629
|
***
|
|
630
630
|
|
|
631
|
-
###
|
|
631
|
+
### iotaStardustFaucetEndpoint?
|
|
632
632
|
|
|
633
|
-
> `optional` **
|
|
633
|
+
> `optional` **iotaStardustFaucetEndpoint**: `string`
|
|
634
634
|
|
|
635
|
-
IOTA Faucet Endpoint.
|
|
635
|
+
IOTA Stardust Faucet Endpoint.
|
|
636
636
|
|
|
637
637
|
***
|
|
638
638
|
|
|
639
|
-
###
|
|
639
|
+
### iotaStardustNodeEndpoint?
|
|
640
640
|
|
|
641
|
-
> `optional` **
|
|
641
|
+
> `optional` **iotaStardustNodeEndpoint**: `string`
|
|
642
642
|
|
|
643
|
-
IOTA Node Endpoint.
|
|
643
|
+
IOTA Stardust Node Endpoint.
|
|
644
644
|
|
|
645
645
|
***
|
|
646
646
|
|
|
647
|
-
###
|
|
647
|
+
### iotaStardustBech32Hrp?
|
|
648
648
|
|
|
649
|
-
> `optional` **
|
|
649
|
+
> `optional` **iotaStardustBech32Hrp**: `string`
|
|
650
650
|
|
|
651
|
-
IOTA Bech32 HRP
|
|
651
|
+
IOTA Stardust Bech32 HRP
|
|
652
652
|
|
|
653
653
|
***
|
|
654
654
|
|
|
655
|
-
###
|
|
655
|
+
### iotaStardustCoinType?
|
|
656
656
|
|
|
657
|
-
> `optional` **
|
|
657
|
+
> `optional` **iotaStardustCoinType**: `string`
|
|
658
658
|
|
|
659
|
-
IOTA coin type.
|
|
659
|
+
IOTA Stardust coin type.
|
|
660
660
|
|
|
661
661
|
***
|
|
662
662
|
|
|
663
|
-
###
|
|
663
|
+
### iotaStardustExplorerEndpoint?
|
|
664
664
|
|
|
665
|
-
> `optional` **
|
|
665
|
+
> `optional` **iotaStardustExplorerEndpoint**: `string`
|
|
666
666
|
|
|
667
|
-
IOTA Explorer Endpoint.
|
|
667
|
+
IOTA Stardust Explorer Endpoint.
|
|
668
668
|
|
|
669
669
|
***
|
|
670
670
|
|
|
671
|
-
###
|
|
671
|
+
### iotaFaucetEndpoint?
|
|
672
672
|
|
|
673
|
-
> `optional` **
|
|
673
|
+
> `optional` **iotaFaucetEndpoint**: `string`
|
|
674
674
|
|
|
675
|
-
IOTA
|
|
675
|
+
IOTA Faucet Endpoint.
|
|
676
676
|
|
|
677
677
|
***
|
|
678
678
|
|
|
679
|
-
###
|
|
679
|
+
### iotaNodeEndpoint?
|
|
680
680
|
|
|
681
|
-
> `optional` **
|
|
681
|
+
> `optional` **iotaNodeEndpoint**: `string`
|
|
682
682
|
|
|
683
|
-
IOTA
|
|
683
|
+
IOTA Node Endpoint.
|
|
684
684
|
|
|
685
685
|
***
|
|
686
686
|
|
|
687
|
-
###
|
|
687
|
+
### iotaNetwork?
|
|
688
688
|
|
|
689
|
-
> `optional` **
|
|
689
|
+
> `optional` **iotaNetwork**: `string`
|
|
690
690
|
|
|
691
|
-
IOTA
|
|
691
|
+
IOTA network.
|
|
692
692
|
|
|
693
693
|
***
|
|
694
694
|
|
|
695
|
-
###
|
|
695
|
+
### iotaCoinType?
|
|
696
696
|
|
|
697
|
-
> `optional` **
|
|
697
|
+
> `optional` **iotaCoinType**: `string`
|
|
698
698
|
|
|
699
|
-
IOTA
|
|
699
|
+
IOTA coin type.
|
|
700
700
|
|
|
701
701
|
***
|
|
702
702
|
|
|
703
|
-
###
|
|
703
|
+
### iotaExplorerEndpoint?
|
|
704
704
|
|
|
705
|
-
> `optional` **
|
|
705
|
+
> `optional` **iotaExplorerEndpoint**: `string`
|
|
706
706
|
|
|
707
|
-
IOTA
|
|
707
|
+
IOTA Explorer Endpoint.
|
|
708
708
|
|
|
709
709
|
***
|
|
710
710
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@twin.org/engine",
|
|
3
|
-
"version": "0.0.1-next.
|
|
3
|
+
"version": "0.0.1-next.45",
|
|
4
4
|
"description": "Engine implementation.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@twin.org/core": "next",
|
|
18
|
-
"@twin.org/engine-core": "0.0.1-next.
|
|
19
|
-
"@twin.org/engine-types": "0.0.1-next.
|
|
18
|
+
"@twin.org/engine-core": "0.0.1-next.45",
|
|
19
|
+
"@twin.org/engine-types": "0.0.1-next.45"
|
|
20
20
|
},
|
|
21
21
|
"main": "./dist/cjs/index.cjs",
|
|
22
22
|
"module": "./dist/esm/index.mjs",
|