@herd-labs/sdk 0.0.4 → 0.0.5
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/index.d.ts +14 -3
- package/dist/index.js +14 -3
- package/dist/src/live/AgentSafesServiceLive.d.ts +9 -0
- package/dist/src/live/AgentSafesServiceLive.js +19 -0
- package/dist/src/live/AgentWalletsServiceLive.d.ts +9 -0
- package/dist/src/live/AgentWalletsServiceLive.js +18 -0
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +9 -0
- package/dist/src/live/AgentWorkflowsServiceLive.js +33 -0
- package/dist/src/live/AuthServiceLive.d.ts +2 -2
- package/dist/src/live/BookmarksServiceLive.d.ts +2 -2
- package/dist/src/live/CodeBlocksServiceLive.d.ts +2 -2
- package/dist/src/live/ContractsServiceLive.d.ts +2 -2
- package/dist/src/live/ContractsServiceLive.js +1 -6
- package/dist/src/live/DocsServiceLive.d.ts +2 -2
- package/dist/src/live/GroupsServiceLive.d.ts +9 -0
- package/dist/src/live/GroupsServiceLive.js +26 -0
- package/dist/src/live/HalServiceLive.d.ts +2 -2
- package/dist/src/live/TransactionsServiceLive.d.ts +2 -2
- package/dist/src/live/WalletsServiceLive.d.ts +2 -2
- package/dist/src/schemas/actions.d.ts +9 -9
- package/dist/src/schemas/agent-wallets.d.ts +226 -0
- package/dist/src/schemas/agent-wallets.js +68 -0
- package/dist/src/schemas/agent-workflows.d.ts +245 -0
- package/dist/src/schemas/agent-workflows.js +72 -0
- package/dist/src/schemas/auth.d.ts +15 -1
- package/dist/src/schemas/auth.js +4 -2
- package/dist/src/schemas/bookmarks.d.ts +5 -5
- package/dist/src/schemas/codeblocks.d.ts +5 -5
- package/dist/src/schemas/collections.d.ts +1 -1
- package/dist/src/schemas/contracts.d.ts +19 -232
- package/dist/src/schemas/contracts.js +1 -62
- package/dist/src/schemas/groups.d.ts +94 -0
- package/dist/src/schemas/groups.js +62 -0
- package/dist/src/schemas/hal.d.ts +9 -9
- package/dist/src/schemas/transactions.d.ts +86 -86
- package/dist/src/schemas/wallets.d.ts +50 -50
- package/dist/src/services/AgentSafesService.d.ts +14 -0
- package/dist/src/services/AgentSafesService.js +7 -0
- package/dist/src/services/AgentWalletsService.d.ts +13 -0
- package/dist/src/services/AgentWalletsService.js +7 -0
- package/dist/src/services/AgentWorkflowsService.d.ts +26 -0
- package/dist/src/services/AgentWorkflowsService.js +21 -0
- package/dist/src/services/ContractsService.d.ts +1 -2
- package/dist/src/services/GroupsService.d.ts +34 -0
- package/dist/src/services/GroupsService.js +14 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -3,35 +3,46 @@ import { ActionNotFoundError, AuthError, CodeBlockNotFoundError, CollectionNotFo
|
|
|
3
3
|
import { Blockchain, BlockchainType, EvmAddress, EvmAddressType, PaginationParams } from "./src/schemas/common.js";
|
|
4
4
|
import { Action, ActionExpression, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, UpdateActionMetadataParams, UpdateExpressionParams } from "./src/schemas/actions.js";
|
|
5
5
|
import { CreateAdapterParams } from "./src/schemas/adapters.js";
|
|
6
|
-
import {
|
|
6
|
+
import { AgentSafe, AgentSafeMetadata, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, EditAgentSafeMetadataParams, LinkedAgentWallet, SetSafeProposerParams, SetSafeProposerResponse } from "./src/schemas/agent-wallets.js";
|
|
7
|
+
import { ApiKeyResponse, FeatureFlags, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
|
|
7
8
|
import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, ContractBookmark, DeleteBookmarkParams, TransactionBookmark, UpdateBookmarkLabelParams, WalletBookmark } from "./src/schemas/bookmarks.js";
|
|
8
9
|
import { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams } from "./src/schemas/codeblocks.js";
|
|
9
10
|
import { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams } from "./src/schemas/collections.js";
|
|
10
|
-
import { AddressDetails, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, DiffEntry, DiffVersionInfo, DiffVersionsParams, EventSummary, FunctionSummary, GetContractCodeParams, GetContractCodeResponse, HistoricalImplementation,
|
|
11
|
+
import { AddressDetails, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, DiffEntry, DiffVersionInfo, DiffVersionsParams, EventSummary, FunctionSummary, GetContractCodeParams, GetContractCodeResponse, HistoricalImplementation, TokenDetails, TokenImage, TopHolder } from "./src/schemas/contracts.js";
|
|
11
12
|
import { DocContent, DocEntry } from "./src/schemas/docs.js";
|
|
13
|
+
import { CreateGroupParams, CreateGroupResponse, EditGroupMetadataParams, EditGroupMetadataResponse, GroupDetails, GroupIdParams, GroupMember, GroupSummary, GroupWallet, ListGroupsResponse, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams } from "./src/schemas/groups.js";
|
|
14
|
+
import { AgentWorkflow, AgentWorkflowDecision, AgentWorkflowRun, AgentWorkflowWithRuns, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, GetAgentWorkflowParams, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse } from "./src/schemas/agent-workflows.js";
|
|
12
15
|
import { EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, TransactionStatus } from "./src/schemas/hal.js";
|
|
13
16
|
import { DecodedTrace, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, Transaction, TransactionQueryResponse } from "./src/schemas/transactions.js";
|
|
14
17
|
import { DeployedContract, DeployedContracts, DeployedContractsPagination, Erc7702Delegation, MultisigDetails, MultisigSigner, PendingTransaction, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenTransfer, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, WalletBalance, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer } from "./src/schemas/wallets.js";
|
|
15
18
|
import { ActionsService } from "./src/services/ActionsService.js";
|
|
16
19
|
import { AdaptersService } from "./src/services/AdaptersService.js";
|
|
20
|
+
import { AgentWalletsService } from "./src/services/AgentWalletsService.js";
|
|
21
|
+
import { AgentSafesService } from "./src/services/AgentSafesService.js";
|
|
17
22
|
import { AuthService } from "./src/services/AuthService.js";
|
|
18
23
|
import { BookmarksService } from "./src/services/BookmarksService.js";
|
|
19
24
|
import { CodeBlocksService } from "./src/services/CodeBlocksService.js";
|
|
20
25
|
import { CollectionsService } from "./src/services/CollectionsService.js";
|
|
21
26
|
import { ContractsService } from "./src/services/ContractsService.js";
|
|
22
27
|
import { DocsService } from "./src/services/DocsService.js";
|
|
28
|
+
import { GroupNotFoundError, GroupsService } from "./src/services/GroupsService.js";
|
|
29
|
+
import { AgentWorkflowNotFoundError, AgentWorkflowRunNotFoundError, AgentWorkflowsService } from "./src/services/AgentWorkflowsService.js";
|
|
23
30
|
import { HalService } from "./src/services/HalService.js";
|
|
24
31
|
import { TransactionsService } from "./src/services/TransactionsService.js";
|
|
25
32
|
import { WalletsService } from "./src/services/WalletsService.js";
|
|
26
33
|
import { ActionsServiceLive } from "./src/live/ActionsServiceLive.js";
|
|
27
34
|
import { AdaptersServiceLive } from "./src/live/AdaptersServiceLive.js";
|
|
35
|
+
import { AgentSafesServiceLive } from "./src/live/AgentSafesServiceLive.js";
|
|
36
|
+
import { AgentWalletsServiceLive } from "./src/live/AgentWalletsServiceLive.js";
|
|
37
|
+
import { AgentWorkflowsServiceLive } from "./src/live/AgentWorkflowsServiceLive.js";
|
|
28
38
|
import { AuthServiceLive } from "./src/live/AuthServiceLive.js";
|
|
29
39
|
import { BookmarksServiceLive } from "./src/live/BookmarksServiceLive.js";
|
|
30
40
|
import { CodeBlocksServiceLive } from "./src/live/CodeBlocksServiceLive.js";
|
|
31
41
|
import { CollectionsServiceLive } from "./src/live/CollectionsServiceLive.js";
|
|
32
42
|
import { ContractsServiceLive } from "./src/live/ContractsServiceLive.js";
|
|
33
43
|
import { DocsServiceLive } from "./src/live/DocsServiceLive.js";
|
|
44
|
+
import { GroupsServiceLive } from "./src/live/GroupsServiceLive.js";
|
|
34
45
|
import { HalServiceLive } from "./src/live/HalServiceLive.js";
|
|
35
46
|
import { TransactionsServiceLive } from "./src/live/TransactionsServiceLive.js";
|
|
36
47
|
import { WalletsServiceLive } from "./src/live/WalletsServiceLive.js";
|
|
37
|
-
export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, type BlockchainType, BookmarkObjectType, type BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, type DecodedTrace, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, type EvmAddressType, ExecuteCodeBlockParams, FunctionSummary, GetActionVersionsParams, GetContractCodeParams, GetContractCodeResponse, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams,
|
|
48
|
+
export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, type BlockchainType, BookmarkObjectType, type BookmarkObjectTypeValue, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, type DecodedTrace, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, type EvmAddressType, ExecuteCodeBlockParams, type FeatureFlags, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
|
package/dist/index.js
CHANGED
|
@@ -3,36 +3,47 @@ import { ActionNotFoundError, AuthError, CodeBlockNotFoundError, CollectionNotFo
|
|
|
3
3
|
import { Blockchain, EvmAddress, PaginationParams } from "./src/schemas/common.js";
|
|
4
4
|
import { Action, ActionExpression, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, UpdateActionMetadataParams, UpdateExpressionParams } from "./src/schemas/actions.js";
|
|
5
5
|
import { CreateAdapterParams } from "./src/schemas/adapters.js";
|
|
6
|
-
import {
|
|
6
|
+
import { AgentSafe, AgentSafeMetadata, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, EditAgentSafeMetadataParams, LinkedAgentWallet, SetSafeProposerParams, SetSafeProposerResponse } from "./src/schemas/agent-wallets.js";
|
|
7
|
+
import { ApiKeyResponse, FeatureFlagsSchema, TokenResponse, WhoamiResponse } from "./src/schemas/auth.js";
|
|
7
8
|
import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkResponse, BookmarksList, ContractBookmark, DeleteBookmarkParams, TransactionBookmark, UpdateBookmarkLabelParams, WalletBookmark } from "./src/schemas/bookmarks.js";
|
|
8
9
|
import { CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, ExecuteCodeBlockParams, PublishCodeBlockResponse, PublishCodeParams, UpdateCodeBlockMetadataParams, UpdateCodeParams } from "./src/schemas/codeblocks.js";
|
|
9
10
|
import { Collection, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CreateCollectionParams, CreateCollectionResponse, UpdateCollectionParams } from "./src/schemas/collections.js";
|
|
10
|
-
import { AddressDetails, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, DiffEntry, DiffVersionInfo, DiffVersionsParams, EventSummary, FunctionSummary, GetContractCodeParams, GetContractCodeResponse, HistoricalImplementation,
|
|
11
|
+
import { AddressDetails, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, DiffEntry, DiffVersionInfo, DiffVersionsParams, EventSummary, FunctionSummary, GetContractCodeParams, GetContractCodeResponse, HistoricalImplementation, TokenDetails, TokenImage, TopHolder } from "./src/schemas/contracts.js";
|
|
11
12
|
import { DocContent, DocEntry } from "./src/schemas/docs.js";
|
|
13
|
+
import { CreateGroupParams, CreateGroupResponse, EditGroupMetadataParams, EditGroupMetadataResponse, GroupDetails, GroupIdParams, GroupMember, GroupSummary, GroupWallet, ListGroupsResponse, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams } from "./src/schemas/groups.js";
|
|
14
|
+
import { AgentWorkflow, AgentWorkflowDecision, AgentWorkflowRun, AgentWorkflowWithRuns, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, GetAgentWorkflowParams, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse } from "./src/schemas/agent-workflows.js";
|
|
12
15
|
import { EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, TransactionStatus } from "./src/schemas/hal.js";
|
|
13
16
|
import { LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, Transaction, TransactionQueryResponse } from "./src/schemas/transactions.js";
|
|
14
17
|
import { DeployedContract, DeployedContracts, DeployedContractsPagination, Erc7702Delegation, MultisigDetails, MultisigSigner, PendingTransaction, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenTransfer, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, WalletBalance, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer } from "./src/schemas/wallets.js";
|
|
15
18
|
import { ActionsService } from "./src/services/ActionsService.js";
|
|
16
19
|
import { AdaptersService } from "./src/services/AdaptersService.js";
|
|
20
|
+
import { AgentWalletsService } from "./src/services/AgentWalletsService.js";
|
|
21
|
+
import { AgentSafesService } from "./src/services/AgentSafesService.js";
|
|
17
22
|
import { AuthService } from "./src/services/AuthService.js";
|
|
18
23
|
import { BookmarksService } from "./src/services/BookmarksService.js";
|
|
19
24
|
import { CodeBlocksService } from "./src/services/CodeBlocksService.js";
|
|
20
25
|
import { CollectionsService } from "./src/services/CollectionsService.js";
|
|
21
26
|
import { ContractsService } from "./src/services/ContractsService.js";
|
|
22
27
|
import { DocsService } from "./src/services/DocsService.js";
|
|
28
|
+
import { GroupNotFoundError, GroupsService } from "./src/services/GroupsService.js";
|
|
29
|
+
import { AgentWorkflowNotFoundError, AgentWorkflowRunNotFoundError, AgentWorkflowsService } from "./src/services/AgentWorkflowsService.js";
|
|
23
30
|
import { HalService } from "./src/services/HalService.js";
|
|
24
31
|
import { TransactionsService } from "./src/services/TransactionsService.js";
|
|
25
32
|
import { WalletsService } from "./src/services/WalletsService.js";
|
|
26
33
|
import { ActionsServiceLive } from "./src/live/ActionsServiceLive.js";
|
|
27
34
|
import { AdaptersServiceLive } from "./src/live/AdaptersServiceLive.js";
|
|
35
|
+
import { AgentSafesServiceLive } from "./src/live/AgentSafesServiceLive.js";
|
|
36
|
+
import { AgentWalletsServiceLive } from "./src/live/AgentWalletsServiceLive.js";
|
|
37
|
+
import { AgentWorkflowsServiceLive } from "./src/live/AgentWorkflowsServiceLive.js";
|
|
28
38
|
import { AuthServiceLive } from "./src/live/AuthServiceLive.js";
|
|
29
39
|
import { BookmarksServiceLive } from "./src/live/BookmarksServiceLive.js";
|
|
30
40
|
import { CodeBlocksServiceLive } from "./src/live/CodeBlocksServiceLive.js";
|
|
31
41
|
import { CollectionsServiceLive } from "./src/live/CollectionsServiceLive.js";
|
|
32
42
|
import { ContractsServiceLive } from "./src/live/ContractsServiceLive.js";
|
|
33
43
|
import { DocsServiceLive } from "./src/live/DocsServiceLive.js";
|
|
44
|
+
import { GroupsServiceLive } from "./src/live/GroupsServiceLive.js";
|
|
34
45
|
import { HalServiceLive } from "./src/live/HalServiceLive.js";
|
|
35
46
|
import { TransactionsServiceLive } from "./src/live/TransactionsServiceLive.js";
|
|
36
47
|
import { WalletsServiceLive } from "./src/live/WalletsServiceLive.js";
|
|
37
48
|
|
|
38
|
-
export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, BookmarkObjectType, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, ExecuteCodeBlockParams, FunctionSummary, GetActionVersionsParams, GetContractCodeParams, GetContractCodeResponse, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams,
|
|
49
|
+
export { Action, ActionExpression, ActionNotFoundError, ActionVersion, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, ActionsService, ActionsServiceLive, AdaptersService, AdaptersServiceLive, AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, AddressDetails, AgentSafe, AgentSafeMetadata, AgentSafesService, AgentSafesServiceLive, AgentWallet, AgentWalletSafe, AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams, AgentWalletsService, AgentWalletsServiceLive, AgentWorkflow, AgentWorkflowDecision, AgentWorkflowNotFoundError, AgentWorkflowRun, AgentWorkflowRunNotFoundError, AgentWorkflowWithRuns, AgentWorkflowsService, AgentWorkflowsServiceLive, ApiKeyResponse, AuthError, AuthService, AuthServiceLive, Blockchain, BookmarkObjectType, BookmarkResponse, BookmarksList, BookmarksService, BookmarksServiceLive, CodeBlockCode, CodeBlockDefinition, CodeBlockExecuteResponse, CodeBlockLogEntry, CodeBlockNotFoundError, CodeBlockVersion, CodeBlocksSearchParams, CodeBlocksSearchResponse, CodeBlocksService, CodeBlocksServiceLive, Collection, CollectionNotFoundError, CollectionSpec, CollectionSpecItem, CollectionVersion, CollectionsSearchParams, CollectionsSearchResponse, CollectionsService, CollectionsServiceLive, ContractBookmark, ContractCodeMatchBlock, ContractCodeSearchResult, ContractDiff, ContractMetadata, ContractsService, ContractsServiceLive, CreateActionParams, CreateActionResponse, CreateAdapterParams, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, CreateCodeBlockParams, CreateCodeBlockResponse, CreateCodeVersionParams, CreateCodeVersionResponse, CreateCollectionParams, CreateCollectionResponse, CreateGroupParams, CreateGroupResponse, DeleteBookmarkParams, DeployedContract, DeployedContracts, DeployedContractsPagination, DiffEntry, DiffVersionInfo, DiffVersionsParams, DocContent, DocEntry, DocNotFoundError, DocsService, DocsServiceLive, EditAgentSafeMetadataParams, EditGroupMetadataParams, EditGroupMetadataResponse, Erc7702Delegation, EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, EventSummary, EvmAddress, ExecuteCodeBlockParams, FeatureFlagsSchema, FunctionSummary, GetActionVersionsParams, GetAgentWorkflowParams, GetContractCodeParams, GetContractCodeResponse, GroupDetails, GroupIdParams, GroupMember, GroupNotFoundError, GroupSummary, GroupWallet, GroupsService, GroupsServiceLive, HalService, HalServiceLive, HerdConfig, HistoricalImplementation, LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, LinkedAgentWallet, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, ListGroupsResponse, MultisigDetails, MultisigSigner, PaginationParams, PendingTransaction, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams, PublishCodeBlockResponse, PublishCodeParams, PublishExpressionParams, PublishExpressionResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, RelatedAdapterItem, RelatedAdaptersContract, RelatedAdaptersFunctionSignature, RelatedAdaptersResponse, RelatedAdaptersSearchParams, ServiceError, SetSafeProposerParams, SetSafeProposerResponse, SimulationError, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse, TokenActivity, TokenActivityPagination, TokenActivityParams, TokenBalanceInfo, TokenDetails, TokenImage, TokenResponse, TokenTransfer, TopHolder, Transaction, TransactionActivity, TransactionActivityPagination, TransactionActivityQuery, TransactionBookmark, TransactionNotFoundError, TransactionQueryResponse, TransactionStatus, TransactionsService, TransactionsServiceLive, UpdateActionMetadataParams, UpdateBookmarkLabelParams, UpdateCodeBlockMetadataParams, UpdateCodeParams, UpdateCollectionParams, UpdateExpressionParams, WalletBalance, WalletBookmark, WalletOverview, WalletTransaction, WalletTxActionExecution, WalletTxBalanceChange, WalletTxCall, WalletTxTransfer, WalletsService, WalletsServiceLive, WhoamiResponse };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HerdConfig } from "../config.js";
|
|
2
|
+
import { AgentSafesService } from "../services/AgentSafesService.js";
|
|
3
|
+
import { Layer } from "effect";
|
|
4
|
+
import * as _effect_platform_HttpClient2 from "@effect/platform/HttpClient";
|
|
5
|
+
|
|
6
|
+
//#region src/live/AgentSafesServiceLive.d.ts
|
|
7
|
+
declare const AgentSafesServiceLive: Layer.Layer<AgentSafesService, never, HerdConfig | _effect_platform_HttpClient2.HttpClient>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AgentSafesServiceLive };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ensureServiceError } from "../errors.js";
|
|
2
|
+
import { AgentSafe, AgentSafeMetadata, SetSafeProposerResponse } from "../schemas/agent-wallets.js";
|
|
3
|
+
import { AgentSafesService } from "../services/AgentSafesService.js";
|
|
4
|
+
import { authorizedClient, checkStatus, jsonBody, makeUrl } from "./http.js";
|
|
5
|
+
import { Effect, Layer, pipe } from "effect";
|
|
6
|
+
import { HttpClientResponse } from "@effect/platform";
|
|
7
|
+
|
|
8
|
+
//#region src/live/AgentSafesServiceLive.ts
|
|
9
|
+
const AgentSafesServiceLive = Layer.effect(AgentSafesService, Effect.gen(function* () {
|
|
10
|
+
const { config, client } = yield* authorizedClient;
|
|
11
|
+
return {
|
|
12
|
+
getAgentSafe: (blockchain, safeAddress) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafe)), Effect.mapError(ensureServiceError("Failed to get agent Safe"))),
|
|
13
|
+
setSafeProposer: (blockchain, safeAddress, params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}/proposers`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SetSafeProposerResponse)), Effect.mapError(ensureServiceError("Failed to set agent Safe proposer"))),
|
|
14
|
+
editAgentSafeMetadata: (blockchain, safeAddress, params) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/agent-safes/${blockchain}/${safeAddress}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentSafeMetadata)), Effect.mapError(ensureServiceError("Failed to edit agent Safe metadata")))
|
|
15
|
+
};
|
|
16
|
+
}));
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { AgentSafesServiceLive };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HerdConfig } from "../config.js";
|
|
2
|
+
import { AgentWalletsService } from "../services/AgentWalletsService.js";
|
|
3
|
+
import { Layer } from "effect";
|
|
4
|
+
import * as _effect_platform_HttpClient1 from "@effect/platform/HttpClient";
|
|
5
|
+
|
|
6
|
+
//#region src/live/AgentWalletsServiceLive.d.ts
|
|
7
|
+
declare const AgentWalletsServiceLive: Layer.Layer<AgentWalletsService, never, HerdConfig | _effect_platform_HttpClient1.HttpClient>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AgentWalletsServiceLive };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ensureServiceError } from "../errors.js";
|
|
2
|
+
import { AgentWalletSafesList, AgentWalletsList } from "../schemas/agent-wallets.js";
|
|
3
|
+
import { AgentWalletsService } from "../services/AgentWalletsService.js";
|
|
4
|
+
import { authorizedClient, checkStatus, makeUrl } from "./http.js";
|
|
5
|
+
import { Effect, Layer, pipe } from "effect";
|
|
6
|
+
import { HttpClientResponse } from "@effect/platform";
|
|
7
|
+
|
|
8
|
+
//#region src/live/AgentWalletsServiceLive.ts
|
|
9
|
+
const AgentWalletsServiceLive = Layer.effect(AgentWalletsService, Effect.gen(function* () {
|
|
10
|
+
const { config, client } = yield* authorizedClient;
|
|
11
|
+
return {
|
|
12
|
+
listAgentWallets: (params) => pipe(client.get(makeUrl(config.baseUrl, "/v1/agent-wallets", { groupId: params?.groupId })), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletsList)), Effect.mapError(ensureServiceError("Failed to list agent wallets"))),
|
|
13
|
+
listAgentWalletSafes: (agentWalletAddress) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-wallets/${agentWalletAddress}/safes`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWalletSafesList)), Effect.mapError(ensureServiceError("Failed to list agent wallet Safes")))
|
|
14
|
+
};
|
|
15
|
+
}));
|
|
16
|
+
|
|
17
|
+
//#endregion
|
|
18
|
+
export { AgentWalletsServiceLive };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HerdConfig } from "../config.js";
|
|
2
|
+
import { AgentWorkflowsService } from "../services/AgentWorkflowsService.js";
|
|
3
|
+
import { Layer } from "effect";
|
|
4
|
+
import * as _effect_platform_HttpClient3 from "@effect/platform/HttpClient";
|
|
5
|
+
|
|
6
|
+
//#region src/live/AgentWorkflowsServiceLive.d.ts
|
|
7
|
+
declare const AgentWorkflowsServiceLive: Layer.Layer<AgentWorkflowsService, never, HerdConfig | _effect_platform_HttpClient3.HttpClient>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { AgentWorkflowsServiceLive };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ServiceError, ensureServiceError } from "../errors.js";
|
|
2
|
+
import { AgentWorkflowWithRuns, CreateAgentWorkflowResponse, CreateAgentWorkflowRunResponse, ListAgentWorkflowsResponse, PushAgentWorkflowResponse, SubmitAgentWorkflowDecisionResponse } from "../schemas/agent-workflows.js";
|
|
3
|
+
import { AgentWorkflowNotFoundError, AgentWorkflowRunNotFoundError, AgentWorkflowsService } from "../services/AgentWorkflowsService.js";
|
|
4
|
+
import { authorizedClient, checkStatus, jsonBody, makeUrl } from "./http.js";
|
|
5
|
+
import { Effect, Layer, pipe } from "effect";
|
|
6
|
+
import { HttpClientResponse } from "@effect/platform";
|
|
7
|
+
|
|
8
|
+
//#region src/live/AgentWorkflowsServiceLive.ts
|
|
9
|
+
const mapWorkflowNotFound = (workflowId) => Effect.catchAll((error) => {
|
|
10
|
+
if (error instanceof ServiceError && error.metadata["status"] === 404) return Effect.fail(new AgentWorkflowNotFoundError(workflowId));
|
|
11
|
+
return Effect.fail(error);
|
|
12
|
+
});
|
|
13
|
+
const mapRunNotFound = (runId) => Effect.catchAll((error) => {
|
|
14
|
+
if (error instanceof ServiceError && error.metadata["status"] === 404) return Effect.fail(new AgentWorkflowRunNotFoundError(runId));
|
|
15
|
+
return Effect.fail(error);
|
|
16
|
+
});
|
|
17
|
+
const AgentWorkflowsServiceLive = Layer.effect(AgentWorkflowsService, Effect.gen(function* () {
|
|
18
|
+
const { config, client } = yield* authorizedClient;
|
|
19
|
+
return {
|
|
20
|
+
create: (params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/agent-workflows"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to create agent workflow"))),
|
|
21
|
+
list: (params) => pipe(client.get(makeUrl(config.baseUrl, "/v1/agent-workflows", {
|
|
22
|
+
groupId: params.groupId,
|
|
23
|
+
type: params.type
|
|
24
|
+
})), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ListAgentWorkflowsResponse)), Effect.mapError(ensureServiceError("Failed to list agent workflows"))),
|
|
25
|
+
get: (agentWorkflowId) => pipe(client.get(makeUrl(config.baseUrl, `/v1/agent-workflows/${agentWorkflowId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(AgentWorkflowWithRuns)), Effect.mapError(ensureServiceError("Failed to get agent workflow")), mapWorkflowNotFound(agentWorkflowId)),
|
|
26
|
+
createRun: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/${params.agentWorkflowId}/runs`), { body: jsonBody({ outputs: params.outputs }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateAgentWorkflowRunResponse)), Effect.mapError(ensureServiceError("Failed to create agent workflow run")), mapWorkflowNotFound(params.agentWorkflowId)),
|
|
27
|
+
submitDecision: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/decisions`), { body: jsonBody({ decision: params.decision }) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(SubmitAgentWorkflowDecisionResponse)), Effect.mapError(ensureServiceError("Failed to submit agent workflow decision")), mapRunNotFound(params.agentWorkflowRunId)),
|
|
28
|
+
push: (params) => pipe(client.post(makeUrl(config.baseUrl, `/v1/agent-workflows/runs/${params.agentWorkflowRunId}/push`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(PushAgentWorkflowResponse)), Effect.mapError(ensureServiceError("Failed to push agent workflow")), mapRunNotFound(params.agentWorkflowRunId))
|
|
29
|
+
};
|
|
30
|
+
}));
|
|
31
|
+
|
|
32
|
+
//#endregion
|
|
33
|
+
export { AgentWorkflowsServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { AuthService } from "../services/AuthService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient11 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/AuthServiceLive.d.ts
|
|
7
|
-
declare const AuthServiceLive: Layer.Layer<AuthService, never, HerdConfig |
|
|
7
|
+
declare const AuthServiceLive: Layer.Layer<AuthService, never, HerdConfig | _effect_platform_HttpClient11.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { AuthServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { BookmarksService } from "../services/BookmarksService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient12 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/BookmarksServiceLive.d.ts
|
|
7
|
-
declare const BookmarksServiceLive: Layer.Layer<BookmarksService, never, HerdConfig |
|
|
7
|
+
declare const BookmarksServiceLive: Layer.Layer<BookmarksService, never, HerdConfig | _effect_platform_HttpClient12.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { BookmarksServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { CodeBlocksService } from "../services/CodeBlocksService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient13 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/CodeBlocksServiceLive.d.ts
|
|
7
|
-
declare const CodeBlocksServiceLive: Layer.Layer<CodeBlocksService, never, HerdConfig |
|
|
7
|
+
declare const CodeBlocksServiceLive: Layer.Layer<CodeBlocksService, never, HerdConfig | _effect_platform_HttpClient13.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { CodeBlocksServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { ContractsService } from "../services/ContractsService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient6 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/ContractsServiceLive.d.ts
|
|
7
|
-
declare const ContractsServiceLive: Layer.Layer<ContractsService, never, HerdConfig |
|
|
7
|
+
declare const ContractsServiceLive: Layer.Layer<ContractsService, never, HerdConfig | _effect_platform_HttpClient6.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { ContractsServiceLive };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ensureServiceError } from "../errors.js";
|
|
2
|
-
import { ContractDiff, ContractMetadata, GetContractCodeResponse
|
|
2
|
+
import { ContractDiff, ContractMetadata, GetContractCodeResponse } from "../schemas/contracts.js";
|
|
3
3
|
import { DeployedContracts } from "../schemas/wallets.js";
|
|
4
4
|
import { ContractsService } from "../services/ContractsService.js";
|
|
5
5
|
import { authorizedClient, checkStatus, jsonBody, makeUrl } from "./http.js";
|
|
@@ -14,11 +14,6 @@ const ContractsServiceLive = Layer.effect(ContractsService, Effect.gen(function*
|
|
|
14
14
|
contractAddress: address,
|
|
15
15
|
blockchain
|
|
16
16
|
}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ContractMetadata)), Effect.mapError(ensureServiceError("Failed to get contract metadata"))),
|
|
17
|
-
getRolesTopology: (address, blockchain) => pipe(client.post(makeUrl(config.baseUrl, "/v1/contracts/roles_topology"), { body: jsonBody({
|
|
18
|
-
contracts: [address],
|
|
19
|
-
blockchain,
|
|
20
|
-
bustCache: true
|
|
21
|
-
}) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(RolesTopology)), Effect.mapError(ensureServiceError("Failed to get roles topology"))),
|
|
22
17
|
diffVersions: (address, blockchain, params) => pipe(client.post(makeUrl(config.baseUrl, "/v1/contracts/diff_versions"), { body: jsonBody({
|
|
23
18
|
contractAddress: address,
|
|
24
19
|
blockchain,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { DocsService } from "../services/DocsService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient7 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/DocsServiceLive.d.ts
|
|
7
|
-
declare const DocsServiceLive: Layer.Layer<DocsService, never, HerdConfig |
|
|
7
|
+
declare const DocsServiceLive: Layer.Layer<DocsService, never, HerdConfig | _effect_platform_HttpClient7.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { DocsServiceLive };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { HerdConfig } from "../config.js";
|
|
2
|
+
import { GroupsService } from "../services/GroupsService.js";
|
|
3
|
+
import { Layer } from "effect";
|
|
4
|
+
import * as _effect_platform_HttpClient8 from "@effect/platform/HttpClient";
|
|
5
|
+
|
|
6
|
+
//#region src/live/GroupsServiceLive.d.ts
|
|
7
|
+
declare const GroupsServiceLive: Layer.Layer<GroupsService, never, HerdConfig | _effect_platform_HttpClient8.HttpClient>;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { GroupsServiceLive };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ServiceError, ensureServiceError } from "../errors.js";
|
|
2
|
+
import { CreateGroupResponse, EditGroupMetadataResponse, GroupDetails, ListGroupsResponse, ProposalResponse } from "../schemas/groups.js";
|
|
3
|
+
import { GroupNotFoundError, GroupsService } from "../services/GroupsService.js";
|
|
4
|
+
import { authorizedClient, checkStatus, jsonBody, makeUrl } from "./http.js";
|
|
5
|
+
import { Effect, Layer, pipe } from "effect";
|
|
6
|
+
import { HttpClientResponse } from "@effect/platform";
|
|
7
|
+
|
|
8
|
+
//#region src/live/GroupsServiceLive.ts
|
|
9
|
+
const mapNotFound = (groupId) => Effect.catchAll((error) => {
|
|
10
|
+
if (error instanceof ServiceError && error.metadata["status"] === 404) return Effect.fail(new GroupNotFoundError(groupId));
|
|
11
|
+
return Effect.fail(error);
|
|
12
|
+
});
|
|
13
|
+
const GroupsServiceLive = Layer.effect(GroupsService, Effect.gen(function* () {
|
|
14
|
+
const { config, client } = yield* authorizedClient;
|
|
15
|
+
return {
|
|
16
|
+
create: ({ params }) => pipe(client.post(makeUrl(config.baseUrl, "/v1/groups"), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(CreateGroupResponse)), Effect.mapError(ensureServiceError("Failed to create group"))),
|
|
17
|
+
list: () => pipe(client.get(makeUrl(config.baseUrl, "/v1/groups")), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ListGroupsResponse)), Effect.mapError(ensureServiceError("Failed to list groups"))),
|
|
18
|
+
get: ({ groupId }) => pipe(client.get(makeUrl(config.baseUrl, `/v1/groups/${groupId}`)), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(GroupDetails)), Effect.mapError(ensureServiceError("Failed to get group")), mapNotFound(groupId)),
|
|
19
|
+
proposeMemberChange: ({ groupId, params }) => pipe(client.post(makeUrl(config.baseUrl, `/v1/groups/${groupId}/proposals/member`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ProposalResponse)), Effect.mapError(ensureServiceError("Failed to propose member change")), mapNotFound(groupId)),
|
|
20
|
+
proposeQuorumChange: ({ groupId, params }) => pipe(client.post(makeUrl(config.baseUrl, `/v1/groups/${groupId}/proposals/quorum`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(ProposalResponse)), Effect.mapError(ensureServiceError("Failed to propose quorum change")), mapNotFound(groupId)),
|
|
21
|
+
editMetadata: ({ groupId, params }) => pipe(client.patch(makeUrl(config.baseUrl, `/v1/groups/${groupId}`), { body: jsonBody(params) }), Effect.flatMap(checkStatus), Effect.flatMap(HttpClientResponse.schemaBodyJson(EditGroupMetadataResponse)), Effect.mapError(ensureServiceError("Failed to edit group metadata")), mapNotFound(groupId))
|
|
22
|
+
};
|
|
23
|
+
}));
|
|
24
|
+
|
|
25
|
+
//#endregion
|
|
26
|
+
export { GroupsServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { HalService } from "../services/HalService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient10 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/HalServiceLive.d.ts
|
|
7
|
-
declare const HalServiceLive: Layer.Layer<HalService, never, HerdConfig |
|
|
7
|
+
declare const HalServiceLive: Layer.Layer<HalService, never, HerdConfig | _effect_platform_HttpClient10.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { HalServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { TransactionsService } from "../services/TransactionsService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient9 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/TransactionsServiceLive.d.ts
|
|
7
|
-
declare const TransactionsServiceLive: Layer.Layer<TransactionsService, never, HerdConfig |
|
|
7
|
+
declare const TransactionsServiceLive: Layer.Layer<TransactionsService, never, HerdConfig | _effect_platform_HttpClient9.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { TransactionsServiceLive };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { HerdConfig } from "../config.js";
|
|
2
2
|
import { WalletsService } from "../services/WalletsService.js";
|
|
3
3
|
import { Layer } from "effect";
|
|
4
|
-
import * as
|
|
4
|
+
import * as _effect_platform_HttpClient4 from "@effect/platform/HttpClient";
|
|
5
5
|
|
|
6
6
|
//#region src/live/WalletsServiceLive.d.ts
|
|
7
|
-
declare const WalletsServiceLive: Layer.Layer<WalletsService, never, HerdConfig |
|
|
7
|
+
declare const WalletsServiceLive: Layer.Layer<WalletsService, never, HerdConfig | _effect_platform_HttpClient4.HttpClient>;
|
|
8
8
|
//#endregion
|
|
9
9
|
export { WalletsServiceLive };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
|
-
import * as
|
|
2
|
+
import * as effect_Brand12 from "effect/Brand";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/actions.d.ts
|
|
5
5
|
declare const ActionExpression_base: Schema.Class<ActionExpression, {
|
|
@@ -28,10 +28,10 @@ declare const ActionExpression_base: Schema.Class<ActionExpression, {
|
|
|
28
28
|
readonly name: string;
|
|
29
29
|
} & {
|
|
30
30
|
readonly intent?: string | undefined;
|
|
31
|
-
} & {
|
|
32
|
-
readonly expression: unknown;
|
|
33
31
|
} & {
|
|
34
32
|
readonly publishedAt?: string | null | undefined;
|
|
33
|
+
} & {
|
|
34
|
+
readonly expression: unknown;
|
|
35
35
|
}, {}, {}>;
|
|
36
36
|
declare class ActionExpression extends ActionExpression_base {}
|
|
37
37
|
declare const Action_base: Schema.Class<Action, {
|
|
@@ -104,10 +104,10 @@ declare const ActionVersion_base: Schema.Class<ActionVersion, {
|
|
|
104
104
|
readonly name: string;
|
|
105
105
|
} & {
|
|
106
106
|
readonly intent?: string | undefined;
|
|
107
|
-
} & {
|
|
108
|
-
readonly expression: unknown;
|
|
109
107
|
} & {
|
|
110
108
|
readonly publishedAt?: string | null | undefined;
|
|
109
|
+
} & {
|
|
110
|
+
readonly expression: unknown;
|
|
111
111
|
}, {}, {}>;
|
|
112
112
|
declare class ActionVersion extends ActionVersion_base {}
|
|
113
113
|
declare const ActionsSearchParams_base: Schema.Class<ActionsSearchParams, {
|
|
@@ -129,7 +129,7 @@ declare const ActionsSearchParams_base: Schema.Class<ActionsSearchParams, {
|
|
|
129
129
|
}>, never, {
|
|
130
130
|
readonly limit: number;
|
|
131
131
|
} & {
|
|
132
|
-
readonly scope: readonly ("yours" | "
|
|
132
|
+
readonly scope: readonly ("yours" | "verified" | "all_published")[];
|
|
133
133
|
} & {
|
|
134
134
|
readonly filters?: {
|
|
135
135
|
readonly name?: string | undefined;
|
|
@@ -149,10 +149,10 @@ declare const ActionsSearchResponse_base: Schema.Class<ActionsSearchResponse, {
|
|
|
149
149
|
nextCursor: Schema.optional<Schema.NullOr<typeof Schema.String>>;
|
|
150
150
|
}>, never, {
|
|
151
151
|
readonly items: readonly Action[];
|
|
152
|
-
} & {
|
|
153
|
-
readonly totalCount?: number | undefined;
|
|
154
152
|
} & {
|
|
155
153
|
readonly nextCursor?: string | null | undefined;
|
|
154
|
+
} & {
|
|
155
|
+
readonly totalCount?: number | undefined;
|
|
156
156
|
}, {}, {}>;
|
|
157
157
|
declare class ActionsSearchResponse extends ActionsSearchResponse_base {}
|
|
158
158
|
declare const ActionVersionsResponse_base: Schema.Class<ActionVersionsResponse, {
|
|
@@ -238,7 +238,7 @@ declare const RelatedAdaptersSearchParams_base: Schema.Class<RelatedAdaptersSear
|
|
|
238
238
|
readonly contracts: readonly {
|
|
239
239
|
readonly blockchain?: "ethereum" | "base" | undefined;
|
|
240
240
|
readonly functionSignatures?: readonly string[] | undefined;
|
|
241
|
-
readonly address: string &
|
|
241
|
+
readonly address: string & effect_Brand12.Brand<"EvmAddress">;
|
|
242
242
|
}[];
|
|
243
243
|
}, {}, {}>;
|
|
244
244
|
declare class RelatedAdaptersSearchParams extends RelatedAdaptersSearchParams_base {}
|