@herd-labs/sdk 0.4.0 → 0.5.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/dist/index.d.ts +17 -17
- package/dist/index.js +17 -17
- package/dist/src/config.d.ts +4 -4
- package/dist/src/config.js +2 -2
- package/dist/src/errors.d.ts +6 -0
- package/dist/src/errors.js +7 -1
- package/dist/src/live/ActionsServiceLive.d.ts +3 -3
- package/dist/src/live/ActionsServiceLive.js +7 -7
- package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
- package/dist/src/live/AdaptersServiceLive.js +4 -4
- package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
- package/dist/src/live/AgentSafesServiceLive.js +4 -4
- package/dist/src/live/AgentWalletsServiceLive.d.ts +2 -2
- package/dist/src/live/AgentWalletsServiceLive.js +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.js +8 -8
- package/dist/src/live/AuthServiceLive.d.ts +3 -3
- package/dist/src/live/AuthServiceLive.js +5 -5
- package/dist/src/live/BookmarksServiceLive.d.ts +3 -3
- package/dist/src/live/BookmarksServiceLive.js +6 -6
- package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
- package/dist/src/live/CodeBlocksServiceLive.js +7 -7
- package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
- package/dist/src/live/CollectionsServiceLive.js +4 -4
- package/dist/src/live/ContractsServiceLive.d.ts +3 -3
- package/dist/src/live/ContractsServiceLive.js +6 -6
- package/dist/src/live/DocsServiceLive.d.ts +3 -3
- package/dist/src/live/DocsServiceLive.js +3 -3
- package/dist/src/live/GroupsServiceLive.d.ts +3 -3
- package/dist/src/live/GroupsServiceLive.js +7 -7
- package/dist/src/live/HalServiceLive.d.ts +3 -3
- package/dist/src/live/HalServiceLive.js +3 -3
- package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
- package/dist/src/live/TransactionsServiceLive.js +4 -4
- package/dist/src/live/WalletsServiceLive.d.ts +3 -3
- package/dist/src/live/WalletsServiceLive.js +5 -5
- package/dist/src/live/http.d.ts +2 -2
- package/dist/src/live/http.js +2 -2
- package/dist/src/schemas/actions.d.ts +127 -59
- package/dist/src/schemas/actions.js +42 -42
- package/dist/src/schemas/adapters.d.ts +4 -4
- package/dist/src/schemas/adapters.js +3 -3
- package/dist/src/schemas/agent-wallets.d.ts +57 -37
- package/dist/src/schemas/agent-wallets.js +35 -35
- package/dist/src/schemas/agent-workflows.d.ts +35 -35
- package/dist/src/schemas/agent-workflows.js +19 -19
- package/dist/src/schemas/auth.d.ts +19 -19
- package/dist/src/schemas/auth.js +10 -10
- package/dist/src/schemas/bookmarks.d.ts +58 -36
- package/dist/src/schemas/bookmarks.js +34 -34
- package/dist/src/schemas/codeblocks.d.ts +89 -52
- package/dist/src/schemas/codeblocks.js +34 -34
- package/dist/src/schemas/collections.d.ts +76 -32
- package/dist/src/schemas/collections.js +23 -23
- package/dist/src/schemas/common.d.ts +8 -8
- package/dist/src/schemas/common.js +5 -5
- package/dist/src/schemas/contracts.d.ts +176 -61
- package/dist/src/schemas/contracts.js +47 -47
- package/dist/src/schemas/docs.d.ts +7 -7
- package/dist/src/schemas/docs.js +5 -5
- package/dist/src/schemas/groups.d.ts +27 -27
- package/dist/src/schemas/groups.js +16 -16
- package/dist/src/schemas/hal.d.ts +64 -18
- package/dist/src/schemas/hal.js +18 -18
- package/dist/src/schemas/transactions.d.ts +264 -56
- package/dist/src/schemas/transactions.js +50 -50
- package/dist/src/schemas/wallets.d.ts +434 -84
- package/dist/src/schemas/wallets.js +114 -69
- package/dist/src/services/ActionsService.d.ts +2 -2
- package/dist/src/services/AgentSafesService.d.ts +4 -4
- package/dist/src/services/AgentWalletsService.d.ts +2 -2
- package/dist/src/services/AgentWorkflowsService.d.ts +8 -8
- package/dist/src/services/AuthService.d.ts +3 -3
- package/dist/src/services/BookmarksService.d.ts +2 -2
- package/dist/src/services/ContractsService.d.ts +5 -5
- package/dist/src/services/GroupsService.d.ts +11 -11
- package/dist/src/services/TransactionsService.d.ts +4 -4
- package/dist/src/services/WalletsService.d.ts +4 -4
- package/package.json +2 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockchainSchema } from "./common.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/wallets.ts
|
|
5
|
-
|
|
5
|
+
const WalletBalanceSchema = Schema.Struct({
|
|
6
6
|
address: Schema.String,
|
|
7
7
|
amount: Schema.Union([Schema.String, Schema.Number]),
|
|
8
8
|
decimals: Schema.NullOr(Schema.Number),
|
|
9
9
|
logoUrl: Schema.NullOr(Schema.String),
|
|
10
10
|
symbol: Schema.NullOr(Schema.String),
|
|
11
11
|
valueUsd: Schema.NullOr(Schema.Number)
|
|
12
|
-
})
|
|
13
|
-
|
|
12
|
+
});
|
|
13
|
+
const Erc7702DelegationSchema = Schema.Struct({
|
|
14
14
|
address: Schema.String,
|
|
15
15
|
contractName: Schema.String,
|
|
16
16
|
functions: Schema.Array(Schema.String)
|
|
17
|
-
})
|
|
18
|
-
|
|
17
|
+
});
|
|
18
|
+
const MultisigSignerSchema = Schema.Struct({
|
|
19
19
|
address: Schema.String,
|
|
20
20
|
isContract: Schema.Boolean
|
|
21
|
-
})
|
|
22
|
-
|
|
21
|
+
});
|
|
22
|
+
const PendingTransactionSchema = Schema.Struct({
|
|
23
23
|
confirmationsReceived: Schema.optional(Schema.Number),
|
|
24
24
|
confirmationsRequired: Schema.optional(Schema.Number),
|
|
25
25
|
data: Schema.NullOr(Schema.String),
|
|
@@ -30,19 +30,19 @@ var PendingTransaction = class extends Schema.Class("PendingTransaction")({
|
|
|
30
30
|
submissionDate: Schema.optional(Schema.String),
|
|
31
31
|
to: Schema.String,
|
|
32
32
|
value: Schema.String
|
|
33
|
-
})
|
|
34
|
-
|
|
35
|
-
pendingTransactions: Schema.Array(
|
|
36
|
-
signers: Schema.Array(
|
|
33
|
+
});
|
|
34
|
+
const MultisigDetailsSchema = Schema.Struct({
|
|
35
|
+
pendingTransactions: Schema.Array(PendingTransactionSchema),
|
|
36
|
+
signers: Schema.Array(MultisigSignerSchema),
|
|
37
37
|
threshold: Schema.Number
|
|
38
|
-
})
|
|
39
|
-
|
|
40
|
-
balances: Schema.Array(
|
|
41
|
-
blockchain:
|
|
38
|
+
});
|
|
39
|
+
const WalletOverviewSchema = Schema.Struct({
|
|
40
|
+
balances: Schema.Array(WalletBalanceSchema),
|
|
41
|
+
blockchain: BlockchainSchema,
|
|
42
42
|
earliestTx: Schema.NullOr(Schema.Number),
|
|
43
|
-
erc7702Delegation: Schema.optional(
|
|
43
|
+
erc7702Delegation: Schema.optional(Erc7702DelegationSchema),
|
|
44
44
|
implementationAddress: Schema.optional(Schema.String),
|
|
45
|
-
multisigDetails: Schema.optional(
|
|
45
|
+
multisigDetails: Schema.optional(MultisigDetailsSchema),
|
|
46
46
|
totalDeployedContractsCount: Schema.Number,
|
|
47
47
|
totalTransactionCount: Schema.Number,
|
|
48
48
|
walletAddress: Schema.String,
|
|
@@ -53,52 +53,97 @@ var WalletOverview = class extends Schema.Class("WalletOverview")({
|
|
|
53
53
|
"multisig",
|
|
54
54
|
"contract"
|
|
55
55
|
])
|
|
56
|
-
})
|
|
57
|
-
|
|
56
|
+
});
|
|
57
|
+
const TokenTypeSchema = Schema.Literals([
|
|
58
|
+
"ERC20",
|
|
59
|
+
"ERC721",
|
|
60
|
+
"ERC1155"
|
|
61
|
+
]);
|
|
62
|
+
const Erc20BalanceInfoSchema = Schema.Struct({
|
|
63
|
+
tokenType: Schema.Literal("ERC20"),
|
|
58
64
|
decimals: Schema.NullOr(Schema.Number),
|
|
59
65
|
formatted: Schema.String,
|
|
60
66
|
raw: Schema.String,
|
|
61
67
|
symbol: Schema.NullOr(Schema.String)
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
|
|
68
|
+
});
|
|
69
|
+
const Erc721BalanceInfoSchema = Schema.Struct({
|
|
70
|
+
tokenType: Schema.Literal("ERC721"),
|
|
71
|
+
count: Schema.String,
|
|
72
|
+
symbol: Schema.NullOr(Schema.String)
|
|
73
|
+
});
|
|
74
|
+
const Erc1155BalanceInfoSchema = Schema.Struct({
|
|
75
|
+
tokenType: Schema.Literal("ERC1155"),
|
|
76
|
+
symbol: Schema.NullOr(Schema.String),
|
|
77
|
+
holdings: Schema.Array(Schema.Struct({
|
|
78
|
+
amount: Schema.String,
|
|
79
|
+
tokenId: Schema.String
|
|
80
|
+
}))
|
|
81
|
+
});
|
|
82
|
+
const TokenBalanceInfoSchema = Schema.Union([
|
|
83
|
+
Erc20BalanceInfoSchema,
|
|
84
|
+
Erc721BalanceInfoSchema,
|
|
85
|
+
Erc1155BalanceInfoSchema
|
|
86
|
+
]);
|
|
87
|
+
const TokenTransferBase = Schema.Struct({
|
|
65
88
|
blockNumber: Schema.Number,
|
|
66
89
|
blockTimestamp: Schema.Number,
|
|
67
90
|
blockTimestampUtc: Schema.String,
|
|
68
91
|
direction: Schema.Literals(["in", "out"]),
|
|
69
|
-
formattedAmount: Schema.String,
|
|
70
92
|
fromAddress: Schema.String,
|
|
71
93
|
logIndex: Schema.Number,
|
|
72
94
|
toAddress: Schema.String,
|
|
73
95
|
txHash: Schema.String
|
|
74
|
-
})
|
|
75
|
-
|
|
96
|
+
});
|
|
97
|
+
const Erc20TransferSchema = Schema.Struct({
|
|
98
|
+
...TokenTransferBase.fields,
|
|
99
|
+
tokenType: Schema.Literal("ERC20"),
|
|
100
|
+
amount: Schema.String,
|
|
101
|
+
formattedAmount: Schema.String
|
|
102
|
+
});
|
|
103
|
+
const Erc721TransferSchema = Schema.Struct({
|
|
104
|
+
...TokenTransferBase.fields,
|
|
105
|
+
tokenType: Schema.Literal("ERC721"),
|
|
106
|
+
tokenId: Schema.String
|
|
107
|
+
});
|
|
108
|
+
const Erc1155TransferSchema = Schema.Struct({
|
|
109
|
+
...TokenTransferBase.fields,
|
|
110
|
+
tokenType: Schema.Literal("ERC1155"),
|
|
111
|
+
tokenId: Schema.String,
|
|
112
|
+
amount: Schema.String
|
|
113
|
+
});
|
|
114
|
+
const TokenTransferSchema = Schema.Union([
|
|
115
|
+
Erc20TransferSchema,
|
|
116
|
+
Erc721TransferSchema,
|
|
117
|
+
Erc1155TransferSchema
|
|
118
|
+
]);
|
|
119
|
+
const TokenActivityPaginationSchema = Schema.Struct({
|
|
76
120
|
hasMore: Schema.Boolean,
|
|
77
121
|
page: Schema.Number,
|
|
78
122
|
pageSize: Schema.Number
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
balance:
|
|
82
|
-
blockchain:
|
|
123
|
+
});
|
|
124
|
+
const TokenActivitySchema = Schema.Struct({
|
|
125
|
+
balance: TokenBalanceInfoSchema,
|
|
126
|
+
blockchain: BlockchainSchema,
|
|
83
127
|
holderAddress: Schema.String,
|
|
84
|
-
pagination:
|
|
128
|
+
pagination: TokenActivityPaginationSchema,
|
|
85
129
|
tokenAddress: Schema.String,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
130
|
+
tokenType: TokenTypeSchema,
|
|
131
|
+
transfers: Schema.Array(TokenTransferSchema)
|
|
132
|
+
});
|
|
133
|
+
const WalletTxCallSchema = Schema.Struct({
|
|
89
134
|
callee: Schema.String,
|
|
90
135
|
contractName: Schema.NullOr(Schema.String),
|
|
91
136
|
entityLabel: Schema.NullOr(Schema.String),
|
|
92
137
|
functionName: Schema.String,
|
|
93
138
|
functionSignature: Schema.String
|
|
94
|
-
})
|
|
95
|
-
|
|
139
|
+
});
|
|
140
|
+
const WalletTxActionExecutionSchema = Schema.Struct({
|
|
96
141
|
actionId: Schema.String,
|
|
97
142
|
actionName: Schema.String,
|
|
98
143
|
executionId: Schema.String,
|
|
99
144
|
versionId: Schema.String
|
|
100
|
-
})
|
|
101
|
-
|
|
145
|
+
});
|
|
146
|
+
const WalletTxTransferSchema = Schema.Struct({
|
|
102
147
|
amount: Schema.Number,
|
|
103
148
|
blockNumber: Schema.Number,
|
|
104
149
|
blockTimestamp: Schema.Number,
|
|
@@ -123,8 +168,8 @@ var WalletTxTransfer = class extends Schema.Class("WalletTxTransfer")({
|
|
|
123
168
|
"ERC1155"
|
|
124
169
|
]),
|
|
125
170
|
txHash: Schema.String
|
|
126
|
-
})
|
|
127
|
-
|
|
171
|
+
});
|
|
172
|
+
const WalletTxBalanceChangeSchema = Schema.Struct({
|
|
128
173
|
balanceChange: Schema.Number,
|
|
129
174
|
blockNumber: Schema.Number,
|
|
130
175
|
blockTimestamp: Schema.Number,
|
|
@@ -146,15 +191,15 @@ var WalletTxBalanceChange = class extends Schema.Class("WalletTxBalanceChange")(
|
|
|
146
191
|
"ERC721",
|
|
147
192
|
"ERC1155"
|
|
148
193
|
]),
|
|
149
|
-
transfers: Schema.Array(
|
|
194
|
+
transfers: Schema.Array(WalletTxTransferSchema),
|
|
150
195
|
txHash: Schema.optional(Schema.String)
|
|
151
|
-
})
|
|
152
|
-
|
|
153
|
-
actionExecution: Schema.optional(
|
|
196
|
+
});
|
|
197
|
+
const WalletTransactionSchema = Schema.Struct({
|
|
198
|
+
actionExecution: Schema.optional(WalletTxActionExecutionSchema),
|
|
154
199
|
blockNumber: Schema.Number,
|
|
155
200
|
blockTimestamp: Schema.Number,
|
|
156
201
|
blockTimestampUtc: Schema.String,
|
|
157
|
-
calls: Schema.Array(
|
|
202
|
+
calls: Schema.Array(WalletTxCallSchema),
|
|
158
203
|
createdContracts: Schema.Array(Schema.Struct({
|
|
159
204
|
address: Schema.String,
|
|
160
205
|
contractName: Schema.NullOr(Schema.String),
|
|
@@ -163,23 +208,23 @@ var WalletTransaction = class extends Schema.Class("WalletTransaction")({
|
|
|
163
208
|
errorMessage: Schema.optional(Schema.String),
|
|
164
209
|
success: Schema.Boolean,
|
|
165
210
|
txHash: Schema.String,
|
|
166
|
-
walletBalanceChanges: Schema.Array(
|
|
167
|
-
})
|
|
168
|
-
|
|
211
|
+
walletBalanceChanges: Schema.Array(WalletTxBalanceChangeSchema)
|
|
212
|
+
});
|
|
213
|
+
const TransactionActivityPaginationSchema = Schema.Struct({
|
|
169
214
|
hasMore: Schema.Boolean,
|
|
170
215
|
page: Schema.Number,
|
|
171
216
|
pageSize: Schema.Number
|
|
172
|
-
})
|
|
173
|
-
|
|
174
|
-
blockchain:
|
|
217
|
+
});
|
|
218
|
+
const TransactionActivitySchema = Schema.Struct({
|
|
219
|
+
blockchain: BlockchainSchema,
|
|
175
220
|
earliestTx: Schema.NullOr(Schema.Number),
|
|
176
221
|
fromAddress: Schema.String,
|
|
177
|
-
pagination:
|
|
222
|
+
pagination: TransactionActivityPaginationSchema,
|
|
178
223
|
toAddressesFilter: Schema.optional(Schema.Array(Schema.String)),
|
|
179
224
|
totalTransactionCount: Schema.Number,
|
|
180
|
-
transactions: Schema.Array(
|
|
181
|
-
})
|
|
182
|
-
|
|
225
|
+
transactions: Schema.Array(WalletTransactionSchema)
|
|
226
|
+
});
|
|
227
|
+
const DeployedContractSchema = Schema.Struct({
|
|
183
228
|
blockNumber: Schema.Number,
|
|
184
229
|
blockTimestamp: Schema.Number,
|
|
185
230
|
blockTimestampUtc: Schema.String,
|
|
@@ -190,21 +235,21 @@ var DeployedContract = class extends Schema.Class("DeployedContract")({
|
|
|
190
235
|
factoryAddress: Schema.NullOr(Schema.String),
|
|
191
236
|
factoryName: Schema.NullOr(Schema.String),
|
|
192
237
|
symbol: Schema.NullOr(Schema.String)
|
|
193
|
-
})
|
|
194
|
-
|
|
238
|
+
});
|
|
239
|
+
const DeployedContractsPaginationSchema = Schema.Struct({
|
|
195
240
|
hasMore: Schema.Boolean,
|
|
196
241
|
page: Schema.Number,
|
|
197
242
|
pageSize: Schema.Number
|
|
198
|
-
})
|
|
199
|
-
|
|
200
|
-
blockchain:
|
|
201
|
-
deployedContracts: Schema.Array(
|
|
243
|
+
});
|
|
244
|
+
const DeployedContractsSchema = Schema.Struct({
|
|
245
|
+
blockchain: BlockchainSchema,
|
|
246
|
+
deployedContracts: Schema.Array(DeployedContractSchema),
|
|
202
247
|
deployerAddress: Schema.String,
|
|
203
248
|
isEOA: Schema.Boolean,
|
|
204
|
-
pagination:
|
|
249
|
+
pagination: DeployedContractsPaginationSchema,
|
|
205
250
|
totalDeployedContractsCount: Schema.Number
|
|
206
|
-
})
|
|
207
|
-
|
|
251
|
+
});
|
|
252
|
+
const TokenActivityParamsSchema = Schema.Struct({
|
|
208
253
|
afterBlocknumber: Schema.optional(Schema.Number),
|
|
209
254
|
afterTimestamp: Schema.optional(Schema.Number),
|
|
210
255
|
beforeBlocknumber: Schema.optional(Schema.Number),
|
|
@@ -212,19 +257,19 @@ var TokenActivityParams = class extends Schema.Class("TokenActivityParams")({
|
|
|
212
257
|
fromAddress: Schema.optional(Schema.String),
|
|
213
258
|
page: Schema.optional(Schema.Number),
|
|
214
259
|
toAddress: Schema.optional(Schema.String)
|
|
215
|
-
})
|
|
260
|
+
});
|
|
216
261
|
/** Same fields as MCP `getTransactionActivityTool` inputs (camelCase); POST `/v1/wallets/transaction-activity` body uses snake_case. */
|
|
217
|
-
|
|
262
|
+
const TransactionActivityQuerySchema = Schema.Struct({
|
|
218
263
|
afterBlocknumber: Schema.optional(Schema.Number),
|
|
219
264
|
afterTimestamp: Schema.optional(Schema.Number),
|
|
220
265
|
beforeBlocknumber: Schema.optional(Schema.Number),
|
|
221
266
|
beforeTimestamp: Schema.optional(Schema.Number),
|
|
222
|
-
blockchain:
|
|
267
|
+
blockchain: BlockchainSchema,
|
|
223
268
|
fromAddress: Schema.optional(Schema.String),
|
|
224
269
|
page: Schema.optional(Schema.Number),
|
|
225
270
|
successOnly: Schema.optional(Schema.Boolean),
|
|
226
271
|
toAddresses: Schema.optional(Schema.Array(Schema.String))
|
|
227
|
-
})
|
|
272
|
+
});
|
|
228
273
|
|
|
229
274
|
//#endregion
|
|
230
|
-
export {
|
|
275
|
+
export { DeployedContractSchema, DeployedContractsPaginationSchema, DeployedContractsSchema, Erc1155BalanceInfoSchema, Erc1155TransferSchema, Erc20BalanceInfoSchema, Erc20TransferSchema, Erc721BalanceInfoSchema, Erc721TransferSchema, Erc7702DelegationSchema, MultisigDetailsSchema, MultisigSignerSchema, PendingTransactionSchema, TokenActivityPaginationSchema, TokenActivityParamsSchema, TokenActivitySchema, TokenBalanceInfoSchema, TokenTransferSchema, TokenTypeSchema, TransactionActivityPaginationSchema, TransactionActivityQuerySchema, TransactionActivitySchema, WalletBalanceSchema, WalletOverviewSchema, WalletTransactionSchema, WalletTxActionExecutionSchema, WalletTxBalanceChangeSchema, WalletTxCallSchema, WalletTxTransferSchema };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ActionNotFoundError, ServiceError } from "../errors.js";
|
|
2
|
-
import { Action, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse,
|
|
2
|
+
import { Action, ActionVersionsResponse, ActionsSearchParams, ActionsSearchResponse, CreateActionParams, CreateActionResponse, GetActionVersionsParams, PublishExpressionParams, PublishExpressionResponse, RelatedAdaptersResponseSchema, RelatedAdaptersSearchParams, UpdateActionMetadataParams, UpdateExpressionParams } from "../schemas/actions.js";
|
|
3
3
|
import { Context, Effect, Schema } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/services/ActionsService.d.ts
|
|
@@ -9,7 +9,7 @@ declare const ActionsService_base: Context.ServiceClass<ActionsService, "Actions
|
|
|
9
9
|
}) => Effect.Effect<Action, ActionNotFoundError | ServiceError>;
|
|
10
10
|
readonly getVersions: (params: GetActionVersionsParams) => Effect.Effect<ActionVersionsResponse, ServiceError>;
|
|
11
11
|
readonly search: (params: ActionsSearchParams) => Effect.Effect<ActionsSearchResponse, ServiceError>;
|
|
12
|
-
readonly searchRelatedAdapters: (params: RelatedAdaptersSearchParams) => Effect.Effect<Schema.Schema.Type<typeof
|
|
12
|
+
readonly searchRelatedAdapters: (params: RelatedAdaptersSearchParams) => Effect.Effect<Schema.Schema.Type<typeof RelatedAdaptersResponseSchema>, ServiceError>;
|
|
13
13
|
readonly create: (params: CreateActionParams) => Effect.Effect<CreateActionResponse, ServiceError>;
|
|
14
14
|
readonly updateMetadata: (id: string, params: UpdateActionMetadataParams) => Effect.Effect<void, ActionNotFoundError | ServiceError>;
|
|
15
15
|
readonly updateExpression: (id: string, expressionId: string, params: UpdateExpressionParams) => Effect.Effect<void, ActionNotFoundError | ServiceError>;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Blockchain, EvmAddress } from "../schemas/common.js";
|
|
3
3
|
import { AgentSafe, AgentSafeMetadata, EditAgentSafeMetadataParams, SetSafeProposerParams, SetSafeProposerResponse } from "../schemas/agent-wallets.js";
|
|
4
4
|
import { Context, Effect } from "effect";
|
|
5
5
|
|
|
6
6
|
//#region src/services/AgentSafesService.d.ts
|
|
7
7
|
declare const AgentSafesService_base: Context.ServiceClass<AgentSafesService, "AgentSafesService", {
|
|
8
|
-
readonly getAgentSafe: (blockchain:
|
|
9
|
-
readonly setSafeProposer: (blockchain:
|
|
10
|
-
readonly editAgentSafeMetadata: (blockchain:
|
|
8
|
+
readonly getAgentSafe: (blockchain: Blockchain, safeAddress: EvmAddress) => Effect.Effect<AgentSafe, ServiceError>;
|
|
9
|
+
readonly setSafeProposer: (blockchain: Blockchain, safeAddress: EvmAddress, params: SetSafeProposerParams) => Effect.Effect<SetSafeProposerResponse, ServiceError>;
|
|
10
|
+
readonly editAgentSafeMetadata: (blockchain: Blockchain, safeAddress: EvmAddress, params: EditAgentSafeMetadataParams) => Effect.Effect<AgentSafeMetadata, ServiceError>;
|
|
11
11
|
}>;
|
|
12
12
|
declare class AgentSafesService extends AgentSafesService_base {}
|
|
13
13
|
//#endregion
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { EvmAddress } from "../schemas/common.js";
|
|
3
3
|
import { AgentWalletSafesList, AgentWalletsList, AgentWalletsListParams } from "../schemas/agent-wallets.js";
|
|
4
4
|
import { Context, Effect } from "effect";
|
|
5
5
|
|
|
6
6
|
//#region src/services/AgentWalletsService.d.ts
|
|
7
7
|
declare const AgentWalletsService_base: Context.ServiceClass<AgentWalletsService, "AgentWalletsService", {
|
|
8
8
|
readonly listAgentWallets: (params?: AgentWalletsListParams) => Effect.Effect<AgentWalletsList, ServiceError>;
|
|
9
|
-
readonly listAgentWalletSafes: (agentWalletAddress:
|
|
9
|
+
readonly listAgentWalletSafes: (agentWalletAddress: EvmAddress) => Effect.Effect<AgentWalletSafesList, ServiceError>;
|
|
10
10
|
}>;
|
|
11
11
|
declare class AgentWalletsService extends AgentWalletsService_base {}
|
|
12
12
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AgentWorkflowWithRuns, CreateAgentWorkflowParams, CreateAgentWorkflowResponse, CreateAgentWorkflowRunParams, CreateAgentWorkflowRunResponse, ExecuteSafeTxParams, ExecuteSafeTxResponse, ListAgentWorkflowsParams, ListAgentWorkflowsResponse, PushAgentWorkflowParams, PushAgentWorkflowResponse, SubmitAgentWorkflowDecisionParams, SubmitAgentWorkflowDecisionResponse } from "../schemas/agent-workflows.js";
|
|
3
3
|
import { Context, Effect } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/services/AgentWorkflowsService.d.ts
|
|
@@ -14,13 +14,13 @@ declare class AgentWorkflowRunNotFoundError extends Error {
|
|
|
14
14
|
constructor(runId: string);
|
|
15
15
|
}
|
|
16
16
|
declare const AgentWorkflowsService_base: Context.ServiceClass<AgentWorkflowsService, "AgentWorkflowsService", {
|
|
17
|
-
readonly create: (params:
|
|
18
|
-
readonly list: (params:
|
|
19
|
-
readonly get: (agentWorkflowId: string) => Effect.Effect<
|
|
20
|
-
readonly createRun: (params:
|
|
21
|
-
readonly submitDecision: (params:
|
|
22
|
-
readonly push: (params:
|
|
23
|
-
readonly executeSafeTx: (params:
|
|
17
|
+
readonly create: (params: CreateAgentWorkflowParams) => Effect.Effect<CreateAgentWorkflowResponse, ServiceError>;
|
|
18
|
+
readonly list: (params: ListAgentWorkflowsParams) => Effect.Effect<ListAgentWorkflowsResponse, ServiceError>;
|
|
19
|
+
readonly get: (agentWorkflowId: string) => Effect.Effect<AgentWorkflowWithRuns, AgentWorkflowNotFoundError | ServiceError>;
|
|
20
|
+
readonly createRun: (params: CreateAgentWorkflowRunParams) => Effect.Effect<CreateAgentWorkflowRunResponse, AgentWorkflowNotFoundError | ServiceError>;
|
|
21
|
+
readonly submitDecision: (params: SubmitAgentWorkflowDecisionParams) => Effect.Effect<SubmitAgentWorkflowDecisionResponse, AgentWorkflowRunNotFoundError | ServiceError>;
|
|
22
|
+
readonly push: (params: PushAgentWorkflowParams) => Effect.Effect<PushAgentWorkflowResponse, AgentWorkflowRunNotFoundError | ServiceError>;
|
|
23
|
+
readonly executeSafeTx: (params: ExecuteSafeTxParams) => Effect.Effect<ExecuteSafeTxResponse, AgentWorkflowRunNotFoundError | ServiceError>;
|
|
24
24
|
}>;
|
|
25
25
|
declare class AgentWorkflowsService extends AgentWorkflowsService_base {}
|
|
26
26
|
//#endregion
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AuthError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ApiKeyListResponse, CreatedApiKey, TokenResponse, WhoamiResponse } from "../schemas/auth.js";
|
|
3
3
|
import { Context, Effect } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/services/AuthService.d.ts
|
|
6
6
|
declare const AuthService_base: Context.ServiceClass<AuthService, "AuthService", {
|
|
7
7
|
readonly whoami: Effect.Effect<WhoamiResponse, AuthError>;
|
|
8
8
|
readonly refreshToken: (refreshToken: string, clientId: string) => Effect.Effect<TokenResponse, AuthError>;
|
|
9
|
-
readonly provisionApiKey: (name?: string) => Effect.Effect<
|
|
10
|
-
readonly listApiKeys: Effect.Effect<
|
|
9
|
+
readonly provisionApiKey: (name?: string) => Effect.Effect<CreatedApiKey, AuthError>;
|
|
10
|
+
readonly listApiKeys: Effect.Effect<ApiKeyListResponse, AuthError>;
|
|
11
11
|
readonly revokeApiKey: (keyId: string) => Effect.Effect<void, AuthError>;
|
|
12
12
|
}>;
|
|
13
13
|
declare class AuthService extends AuthService_base {}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams,
|
|
2
|
+
import { AddContractBookmarkParams, AddTransactionBookmarkParams, AddWalletBookmarkParams, BookmarkObjectType, BookmarkResponse, BookmarksList, DeleteBookmarkParams, UpdateBookmarkLabelParams } from "../schemas/bookmarks.js";
|
|
3
3
|
import { Context, Effect } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/services/BookmarksService.d.ts
|
|
6
6
|
declare const BookmarksService_base: Context.ServiceClass<BookmarksService, "BookmarksService", {
|
|
7
7
|
readonly list: (params?: {
|
|
8
|
-
readonly objectTypes?: readonly
|
|
8
|
+
readonly objectTypes?: readonly BookmarkObjectType[];
|
|
9
9
|
}) => Effect.Effect<BookmarksList, ServiceError>;
|
|
10
10
|
readonly addContract: (params: AddContractBookmarkParams) => Effect.Effect<BookmarkResponse, ServiceError>;
|
|
11
11
|
readonly addTransaction: (params: AddTransactionBookmarkParams) => Effect.Effect<BookmarkResponse, ServiceError>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Blockchain, EvmAddress, PaginationParams } from "../schemas/common.js";
|
|
3
3
|
import { ContractDiff, ContractMetadata, DiffVersionsParams, GetContractCodeParams, GetContractCodeResponse } from "../schemas/contracts.js";
|
|
4
4
|
import { DeployedContracts } from "../schemas/wallets.js";
|
|
5
5
|
import { Context, Effect } from "effect";
|
|
6
6
|
|
|
7
7
|
//#region src/services/ContractsService.d.ts
|
|
8
8
|
declare const ContractsService_base: Context.ServiceClass<ContractsService, "ContractsService", {
|
|
9
|
-
readonly getMetadata: (address:
|
|
10
|
-
readonly diffVersions: (address:
|
|
11
|
-
readonly getContractCode: (blockchain:
|
|
12
|
-
readonly getDeployedContracts: (blockchain:
|
|
9
|
+
readonly getMetadata: (address: EvmAddress, blockchain: Blockchain) => Effect.Effect<ContractMetadata, ServiceError>;
|
|
10
|
+
readonly diffVersions: (address: EvmAddress, blockchain: Blockchain, params?: DiffVersionsParams) => Effect.Effect<ContractDiff, ServiceError>;
|
|
11
|
+
readonly getContractCode: (blockchain: Blockchain, params: GetContractCodeParams) => Effect.Effect<GetContractCodeResponse, ServiceError>;
|
|
12
|
+
readonly getDeployedContracts: (blockchain: Blockchain, address: EvmAddress, params?: PaginationParams) => Effect.Effect<DeployedContracts, ServiceError>;
|
|
13
13
|
}>;
|
|
14
14
|
declare class ContractsService extends ContractsService_base {}
|
|
15
15
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CreateGroupParams, CreateGroupResponse, EditGroupMetadataParams, EditGroupMetadataResponse, GroupDetails, ListGroupsResponse, ProposalResponse, ProposeMemberChangeParams, ProposeQuorumChangeParams } from "../schemas/groups.js";
|
|
3
3
|
import { Context, Effect } from "effect";
|
|
4
4
|
|
|
5
5
|
//#region src/services/GroupsService.d.ts
|
|
@@ -10,24 +10,24 @@ declare class GroupNotFoundError extends Error {
|
|
|
10
10
|
}
|
|
11
11
|
declare const GroupsService_base: Context.ServiceClass<GroupsService, "GroupsService", {
|
|
12
12
|
readonly create: (params: {
|
|
13
|
-
params:
|
|
14
|
-
}) => Effect.Effect<
|
|
15
|
-
readonly list: Effect.Effect<
|
|
13
|
+
params: CreateGroupParams;
|
|
14
|
+
}) => Effect.Effect<CreateGroupResponse, ServiceError>;
|
|
15
|
+
readonly list: Effect.Effect<ListGroupsResponse, ServiceError>;
|
|
16
16
|
readonly get: (params: {
|
|
17
17
|
groupId: string;
|
|
18
|
-
}) => Effect.Effect<
|
|
18
|
+
}) => Effect.Effect<GroupDetails, GroupNotFoundError | ServiceError>;
|
|
19
19
|
readonly proposeMemberChange: (params: {
|
|
20
20
|
groupId: string;
|
|
21
|
-
params:
|
|
22
|
-
}) => Effect.Effect<
|
|
21
|
+
params: ProposeMemberChangeParams;
|
|
22
|
+
}) => Effect.Effect<ProposalResponse, GroupNotFoundError | ServiceError>;
|
|
23
23
|
readonly proposeQuorumChange: (params: {
|
|
24
24
|
groupId: string;
|
|
25
|
-
params:
|
|
26
|
-
}) => Effect.Effect<
|
|
25
|
+
params: ProposeQuorumChangeParams;
|
|
26
|
+
}) => Effect.Effect<ProposalResponse, GroupNotFoundError | ServiceError>;
|
|
27
27
|
readonly editMetadata: (params: {
|
|
28
28
|
groupId: string;
|
|
29
|
-
params:
|
|
30
|
-
}) => Effect.Effect<
|
|
29
|
+
params: EditGroupMetadataParams;
|
|
30
|
+
}) => Effect.Effect<EditGroupMetadataResponse, GroupNotFoundError | ServiceError>;
|
|
31
31
|
}>;
|
|
32
32
|
declare class GroupsService extends GroupsService_base {}
|
|
33
33
|
//#endregion
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Blockchain, EvmAddress } from "../schemas/common.js";
|
|
3
3
|
import { LatestEventTransactions, LatestFunctionTransactions, LatestTxParams, TransactionQueryResponse } from "../schemas/transactions.js";
|
|
4
4
|
import { Context, Effect } from "effect";
|
|
5
5
|
|
|
6
6
|
//#region src/services/TransactionsService.d.ts
|
|
7
7
|
declare const TransactionsService_base: Context.ServiceClass<TransactionsService, "TransactionsService", {
|
|
8
|
-
readonly getTransaction: (blockchain:
|
|
9
|
-
readonly getLatestFunctionTransactions: (blockchain:
|
|
8
|
+
readonly getTransaction: (blockchain: Blockchain, txHash: string) => Effect.Effect<TransactionQueryResponse, ServiceError>;
|
|
9
|
+
readonly getLatestFunctionTransactions: (blockchain: Blockchain, address: EvmAddress, filter: {
|
|
10
10
|
readonly name?: string;
|
|
11
11
|
readonly signature?: string;
|
|
12
12
|
}, params?: LatestTxParams) => Effect.Effect<LatestFunctionTransactions, ServiceError>;
|
|
13
|
-
readonly getLatestEventTransactions: (blockchain:
|
|
13
|
+
readonly getLatestEventTransactions: (blockchain: Blockchain, address: EvmAddress, filter: {
|
|
14
14
|
readonly name?: string;
|
|
15
15
|
readonly signature?: string;
|
|
16
16
|
}, params?: LatestTxParams) => Effect.Effect<LatestEventTransactions, ServiceError>;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ServiceError } from "../errors.js";
|
|
2
|
-
import {
|
|
2
|
+
import { Blockchain, EvmAddress, PaginationParams } from "../schemas/common.js";
|
|
3
3
|
import { DeployedContracts, TokenActivity, TokenActivityParams, TransactionActivity, TransactionActivityQuery, WalletOverview } from "../schemas/wallets.js";
|
|
4
4
|
import { Context, Effect } from "effect";
|
|
5
5
|
|
|
6
6
|
//#region src/services/WalletsService.d.ts
|
|
7
7
|
declare const WalletsService_base: Context.ServiceClass<WalletsService, "WalletsService", {
|
|
8
|
-
readonly getOverview: (blockchain:
|
|
9
|
-
readonly getTokenActivity: (blockchain:
|
|
8
|
+
readonly getOverview: (blockchain: Blockchain, address: EvmAddress, params?: PaginationParams) => Effect.Effect<WalletOverview, ServiceError>;
|
|
9
|
+
readonly getTokenActivity: (blockchain: Blockchain, address: EvmAddress, tokenAddress: EvmAddress, params?: TokenActivityParams) => Effect.Effect<TokenActivity, ServiceError>;
|
|
10
10
|
readonly getTransactions: (query: TransactionActivityQuery) => Effect.Effect<TransactionActivity, ServiceError>;
|
|
11
|
-
readonly getDeployedContracts: (blockchain:
|
|
11
|
+
readonly getDeployedContracts: (blockchain: Blockchain, address: EvmAddress, params?: PaginationParams) => Effect.Effect<DeployedContracts, ServiceError>;
|
|
12
12
|
}>;
|
|
13
13
|
declare class WalletsService extends WalletsService_base {}
|
|
14
14
|
//#endregion
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@herd-labs/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"fix": "ultracite fix"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@better-auth/api-key": "
|
|
31
|
+
"@better-auth/api-key": "1.7.0-beta.4",
|
|
32
32
|
"@effect/platform-bun": "4.0.0-beta.74",
|
|
33
33
|
"effect": "4.0.0-beta.74"
|
|
34
34
|
},
|