@herd-labs/sdk 0.3.1 → 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 +11 -11
- package/dist/src/config.js +9 -12
- package/dist/src/errors.d.ts +35 -44
- package/dist/src/errors.js +19 -16
- package/dist/src/live/ActionsServiceLive.d.ts +3 -3
- package/dist/src/live/ActionsServiceLive.js +14 -14
- package/dist/src/live/AdaptersServiceLive.d.ts +3 -3
- package/dist/src/live/AdaptersServiceLive.js +8 -8
- package/dist/src/live/AgentSafesServiceLive.d.ts +3 -3
- package/dist/src/live/AgentSafesServiceLive.js +5 -5
- package/dist/src/live/AgentWalletsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWalletsServiceLive.js +4 -4
- package/dist/src/live/AgentWorkflowsServiceLive.d.ts +3 -3
- package/dist/src/live/AgentWorkflowsServiceLive.js +14 -14
- package/dist/src/live/AuthServiceLive.d.ts +3 -3
- package/dist/src/live/AuthServiceLive.js +7 -7
- package/dist/src/live/BookmarksServiceLive.d.ts +3 -3
- package/dist/src/live/BookmarksServiceLive.js +20 -20
- package/dist/src/live/CodeBlocksServiceLive.d.ts +3 -3
- package/dist/src/live/CodeBlocksServiceLive.js +11 -11
- package/dist/src/live/CollectionsServiceLive.d.ts +3 -3
- package/dist/src/live/CollectionsServiceLive.js +6 -6
- package/dist/src/live/ContractsServiceLive.d.ts +3 -3
- package/dist/src/live/ContractsServiceLive.js +10 -10
- package/dist/src/live/DocsServiceLive.d.ts +3 -3
- package/dist/src/live/DocsServiceLive.js +4 -4
- package/dist/src/live/GroupsServiceLive.d.ts +3 -3
- package/dist/src/live/GroupsServiceLive.js +9 -9
- package/dist/src/live/HalServiceLive.d.ts +3 -3
- package/dist/src/live/HalServiceLive.js +12 -12
- package/dist/src/live/TransactionsServiceLive.d.ts +3 -3
- package/dist/src/live/TransactionsServiceLive.js +18 -18
- package/dist/src/live/WalletsServiceLive.d.ts +3 -3
- package/dist/src/live/WalletsServiceLive.js +18 -18
- package/dist/src/live/http.d.ts +6 -6
- package/dist/src/live/http.js +15 -15
- package/dist/src/schemas/actions.d.ts +179 -339
- package/dist/src/schemas/actions.js +80 -76
- package/dist/src/schemas/adapters.d.ts +7 -17
- package/dist/src/schemas/adapters.js +5 -5
- package/dist/src/schemas/agent-wallets.d.ts +98 -222
- package/dist/src/schemas/agent-wallets.js +52 -52
- package/dist/src/schemas/agent-workflows.d.ts +104 -104
- package/dist/src/schemas/agent-workflows.js +53 -49
- package/dist/src/schemas/auth.d.ts +35 -64
- package/dist/src/schemas/auth.js +16 -16
- package/dist/src/schemas/bookmarks.d.ts +98 -216
- package/dist/src/schemas/bookmarks.js +55 -51
- package/dist/src/schemas/codeblocks.d.ts +149 -308
- package/dist/src/schemas/codeblocks.js +72 -67
- package/dist/src/schemas/collections.d.ts +120 -232
- package/dist/src/schemas/collections.js +48 -44
- package/dist/src/schemas/common.d.ts +13 -29
- package/dist/src/schemas/common.js +8 -8
- package/dist/src/schemas/contracts.d.ts +256 -447
- package/dist/src/schemas/contracts.js +92 -103
- package/dist/src/schemas/docs.d.ts +12 -29
- package/dist/src/schemas/docs.js +9 -9
- package/dist/src/schemas/groups.d.ts +74 -74
- package/dist/src/schemas/groups.js +32 -32
- package/dist/src/schemas/hal.d.ts +109 -217
- package/dist/src/schemas/hal.js +44 -42
- package/dist/src/schemas/transactions.d.ts +648 -926
- package/dist/src/schemas/transactions.js +158 -162
- package/dist/src/schemas/wallets.d.ts +577 -731
- package/dist/src/schemas/wallets.js +206 -145
- package/dist/src/services/ActionsService.d.ts +3 -3
- package/dist/src/services/ActionsService.js +2 -2
- package/dist/src/services/AdaptersService.d.ts +1 -1
- package/dist/src/services/AdaptersService.js +2 -2
- package/dist/src/services/AgentSafesService.d.ts +5 -5
- package/dist/src/services/AgentSafesService.js +2 -2
- package/dist/src/services/AgentWalletsService.d.ts +3 -3
- package/dist/src/services/AgentWalletsService.js +2 -2
- package/dist/src/services/AgentWorkflowsService.d.ts +11 -11
- package/dist/src/services/AgentWorkflowsService.js +6 -2
- package/dist/src/services/AuthService.d.ts +5 -5
- package/dist/src/services/AuthService.js +2 -2
- package/dist/src/services/BookmarksService.d.ts +3 -3
- package/dist/src/services/BookmarksService.js +2 -2
- package/dist/src/services/CodeBlocksService.d.ts +1 -1
- package/dist/src/services/CodeBlocksService.js +2 -2
- package/dist/src/services/CollectionsService.d.ts +1 -1
- package/dist/src/services/CollectionsService.js +2 -2
- package/dist/src/services/ContractsService.d.ts +6 -6
- package/dist/src/services/ContractsService.js +2 -2
- package/dist/src/services/DocsService.d.ts +2 -2
- package/dist/src/services/DocsService.js +2 -2
- package/dist/src/services/GroupsService.d.ts +13 -13
- package/dist/src/services/GroupsService.js +4 -2
- package/dist/src/services/HalService.d.ts +1 -1
- package/dist/src/services/HalService.js +2 -2
- package/dist/src/services/TransactionsService.d.ts +5 -5
- package/dist/src/services/TransactionsService.js +2 -2
- package/dist/src/services/WalletsService.d.ts +5 -5
- package/dist/src/services/WalletsService.js +2 -2
- package/package.json +13 -18
|
@@ -1,214 +1,275 @@
|
|
|
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
|
-
|
|
8
|
-
amount: Schema.Union(Schema.String, Schema.Number),
|
|
7
|
+
amount: Schema.Union([Schema.String, Schema.Number]),
|
|
9
8
|
decimals: Schema.NullOr(Schema.Number),
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
logoUrl: Schema.NullOr(Schema.String),
|
|
10
|
+
symbol: Schema.NullOr(Schema.String),
|
|
11
|
+
valueUsd: Schema.NullOr(Schema.Number)
|
|
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
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
value: Schema.String,
|
|
21
|
+
});
|
|
22
|
+
const PendingTransactionSchema = Schema.Struct({
|
|
23
|
+
confirmationsReceived: Schema.optional(Schema.Number),
|
|
24
|
+
confirmationsRequired: Schema.optional(Schema.Number),
|
|
26
25
|
data: Schema.NullOr(Schema.String),
|
|
26
|
+
method: Schema.optional(Schema.NullOr(Schema.String)),
|
|
27
27
|
nonce: Schema.Number,
|
|
28
|
-
submissionDate: Schema.optional(Schema.String),
|
|
29
|
-
confirmationsRequired: Schema.optional(Schema.Number),
|
|
30
|
-
confirmationsReceived: Schema.optional(Schema.Number),
|
|
31
28
|
proposer: Schema.optional(Schema.NullOr(Schema.String)),
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
multisigDetails: Schema.optional(MultisigDetails),
|
|
46
|
-
totalTransactionCount: Schema.Number,
|
|
29
|
+
safeTxHash: Schema.String,
|
|
30
|
+
submissionDate: Schema.optional(Schema.String),
|
|
31
|
+
to: Schema.String,
|
|
32
|
+
value: Schema.String
|
|
33
|
+
});
|
|
34
|
+
const MultisigDetailsSchema = Schema.Struct({
|
|
35
|
+
pendingTransactions: Schema.Array(PendingTransactionSchema),
|
|
36
|
+
signers: Schema.Array(MultisigSignerSchema),
|
|
37
|
+
threshold: Schema.Number
|
|
38
|
+
});
|
|
39
|
+
const WalletOverviewSchema = Schema.Struct({
|
|
40
|
+
balances: Schema.Array(WalletBalanceSchema),
|
|
41
|
+
blockchain: BlockchainSchema,
|
|
47
42
|
earliestTx: Schema.NullOr(Schema.Number),
|
|
43
|
+
erc7702Delegation: Schema.optional(Erc7702DelegationSchema),
|
|
44
|
+
implementationAddress: Schema.optional(Schema.String),
|
|
45
|
+
multisigDetails: Schema.optional(MultisigDetailsSchema),
|
|
48
46
|
totalDeployedContractsCount: Schema.Number,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
totalTransactionCount: Schema.Number,
|
|
48
|
+
walletAddress: Schema.String,
|
|
49
|
+
walletType: Schema.Literals([
|
|
50
|
+
"eoa",
|
|
51
|
+
"erc7702",
|
|
52
|
+
"erc4337",
|
|
53
|
+
"multisig",
|
|
54
|
+
"contract"
|
|
55
|
+
])
|
|
56
|
+
});
|
|
57
|
+
const TokenTypeSchema = Schema.Literals([
|
|
58
|
+
"ERC20",
|
|
59
|
+
"ERC721",
|
|
60
|
+
"ERC1155"
|
|
61
|
+
]);
|
|
62
|
+
const Erc20BalanceInfoSchema = Schema.Struct({
|
|
63
|
+
tokenType: Schema.Literal("ERC20"),
|
|
64
|
+
decimals: Schema.NullOr(Schema.Number),
|
|
53
65
|
formatted: Schema.String,
|
|
66
|
+
raw: Schema.String,
|
|
67
|
+
symbol: Schema.NullOr(Schema.String)
|
|
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"),
|
|
54
76
|
symbol: Schema.NullOr(Schema.String),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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({
|
|
88
|
+
blockNumber: Schema.Number,
|
|
59
89
|
blockTimestamp: Schema.Number,
|
|
60
90
|
blockTimestampUtc: Schema.String,
|
|
61
|
-
|
|
62
|
-
logIndex: Schema.Number,
|
|
91
|
+
direction: Schema.Literals(["in", "out"]),
|
|
63
92
|
fromAddress: Schema.String,
|
|
93
|
+
logIndex: Schema.Number,
|
|
64
94
|
toAddress: Schema.String,
|
|
95
|
+
txHash: Schema.String
|
|
96
|
+
});
|
|
97
|
+
const Erc20TransferSchema = Schema.Struct({
|
|
98
|
+
...TokenTransferBase.fields,
|
|
99
|
+
tokenType: Schema.Literal("ERC20"),
|
|
65
100
|
amount: Schema.String,
|
|
66
|
-
formattedAmount: Schema.String
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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({
|
|
120
|
+
hasMore: Schema.Boolean,
|
|
70
121
|
page: Schema.Number,
|
|
71
|
-
pageSize: Schema.Number
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
122
|
+
pageSize: Schema.Number
|
|
123
|
+
});
|
|
124
|
+
const TokenActivitySchema = Schema.Struct({
|
|
125
|
+
balance: TokenBalanceInfoSchema,
|
|
126
|
+
blockchain: BlockchainSchema,
|
|
75
127
|
holderAddress: Schema.String,
|
|
128
|
+
pagination: TokenActivityPaginationSchema,
|
|
76
129
|
tokenAddress: Schema.String,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}) {};
|
|
82
|
-
var WalletTxCall = class extends Schema.Class("WalletTxCall")({
|
|
130
|
+
tokenType: TokenTypeSchema,
|
|
131
|
+
transfers: Schema.Array(TokenTransferSchema)
|
|
132
|
+
});
|
|
133
|
+
const WalletTxCallSchema = Schema.Struct({
|
|
83
134
|
callee: Schema.String,
|
|
84
|
-
functionSignature: Schema.String,
|
|
85
|
-
functionName: Schema.String,
|
|
86
135
|
contractName: Schema.NullOr(Schema.String),
|
|
87
|
-
entityLabel: Schema.NullOr(Schema.String)
|
|
88
|
-
|
|
89
|
-
|
|
136
|
+
entityLabel: Schema.NullOr(Schema.String),
|
|
137
|
+
functionName: Schema.String,
|
|
138
|
+
functionSignature: Schema.String
|
|
139
|
+
});
|
|
140
|
+
const WalletTxActionExecutionSchema = Schema.Struct({
|
|
90
141
|
actionId: Schema.String,
|
|
91
|
-
versionId: Schema.String,
|
|
92
142
|
actionName: Schema.String,
|
|
93
|
-
executionId: Schema.String
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
blockNumber: Schema.Number,
|
|
98
|
-
tokenAddress: Schema.String,
|
|
99
|
-
fromAddress: Schema.String,
|
|
100
|
-
toAddress: Schema.String,
|
|
143
|
+
executionId: Schema.String,
|
|
144
|
+
versionId: Schema.String
|
|
145
|
+
});
|
|
146
|
+
const WalletTxTransferSchema = Schema.Struct({
|
|
101
147
|
amount: Schema.Number,
|
|
148
|
+
blockNumber: Schema.Number,
|
|
102
149
|
blockTimestamp: Schema.Number,
|
|
103
150
|
chainId: Schema.Number,
|
|
104
|
-
|
|
105
|
-
tokenDecimals: Schema.Number,
|
|
106
|
-
tokenName: Schema.String,
|
|
107
|
-
tokenSymbol: Schema.String,
|
|
108
|
-
tokenPriceUsd: Schema.Number,
|
|
109
|
-
tokenLogoUrl: Schema.String,
|
|
110
|
-
tokenType: Schema.Literal("NATIVE", "ERC20", "ERC721", "ERC1155"),
|
|
151
|
+
fromAddress: Schema.String,
|
|
111
152
|
fromAddressIsContract: Schema.Boolean,
|
|
112
|
-
toAddressIsContract: Schema.Boolean,
|
|
113
153
|
fromEntityLabel: Schema.optional(Schema.NullOr(Schema.String)),
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
txHash: Schema.optional(Schema.String),
|
|
118
|
-
blockNumber: Schema.Number,
|
|
154
|
+
toAddress: Schema.String,
|
|
155
|
+
toAddressIsContract: Schema.Boolean,
|
|
156
|
+
toEntityLabel: Schema.optional(Schema.NullOr(Schema.String)),
|
|
119
157
|
tokenAddress: Schema.String,
|
|
120
|
-
|
|
121
|
-
|
|
158
|
+
tokenDecimals: Schema.Number,
|
|
159
|
+
tokenId: Schema.Number,
|
|
160
|
+
tokenLogoUrl: Schema.String,
|
|
161
|
+
tokenName: Schema.String,
|
|
162
|
+
tokenPriceUsd: Schema.Number,
|
|
163
|
+
tokenSymbol: Schema.String,
|
|
164
|
+
tokenType: Schema.Literals([
|
|
165
|
+
"NATIVE",
|
|
166
|
+
"ERC20",
|
|
167
|
+
"ERC721",
|
|
168
|
+
"ERC1155"
|
|
169
|
+
]),
|
|
170
|
+
txHash: Schema.String
|
|
171
|
+
});
|
|
172
|
+
const WalletTxBalanceChangeSchema = Schema.Struct({
|
|
122
173
|
balanceChange: Schema.Number,
|
|
174
|
+
blockNumber: Schema.Number,
|
|
123
175
|
blockTimestamp: Schema.Number,
|
|
124
176
|
chainId: Schema.Number,
|
|
125
|
-
|
|
126
|
-
|
|
177
|
+
holderAddress: Schema.String,
|
|
178
|
+
holderEntityLabel: Schema.optional(Schema.NullOr(Schema.String)),
|
|
179
|
+
holderIsContract: Schema.Boolean,
|
|
180
|
+
tokenAddress: Schema.String,
|
|
127
181
|
tokenDecimals: Schema.Number,
|
|
182
|
+
tokenEntityLabel: Schema.optional(Schema.NullOr(Schema.String)),
|
|
183
|
+
tokenId: Schema.Number,
|
|
184
|
+
tokenLogoUrl: Schema.String,
|
|
128
185
|
tokenName: Schema.String,
|
|
129
|
-
tokenSymbol: Schema.String,
|
|
130
186
|
tokenPriceUsd: Schema.Number,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
187
|
+
tokenSymbol: Schema.String,
|
|
188
|
+
tokenType: Schema.Literals([
|
|
189
|
+
"NATIVE",
|
|
190
|
+
"ERC20",
|
|
191
|
+
"ERC721",
|
|
192
|
+
"ERC1155"
|
|
193
|
+
]),
|
|
194
|
+
transfers: Schema.Array(WalletTxTransferSchema),
|
|
195
|
+
txHash: Schema.optional(Schema.String)
|
|
196
|
+
});
|
|
197
|
+
const WalletTransactionSchema = Schema.Struct({
|
|
198
|
+
actionExecution: Schema.optional(WalletTxActionExecutionSchema),
|
|
199
|
+
blockNumber: Schema.Number,
|
|
138
200
|
blockTimestamp: Schema.Number,
|
|
139
201
|
blockTimestampUtc: Schema.String,
|
|
140
|
-
|
|
141
|
-
success: Schema.Boolean,
|
|
142
|
-
errorMessage: Schema.optional(Schema.String),
|
|
143
|
-
calls: Schema.Array(WalletTxCall),
|
|
144
|
-
walletBalanceChanges: Schema.Array(WalletTxBalanceChange),
|
|
202
|
+
calls: Schema.Array(WalletTxCallSchema),
|
|
145
203
|
createdContracts: Schema.Array(Schema.Struct({
|
|
146
204
|
address: Schema.String,
|
|
147
205
|
contractName: Schema.NullOr(Schema.String),
|
|
148
206
|
entityLabel: Schema.NullOr(Schema.String)
|
|
149
207
|
})),
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
208
|
+
errorMessage: Schema.optional(Schema.String),
|
|
209
|
+
success: Schema.Boolean,
|
|
210
|
+
txHash: Schema.String,
|
|
211
|
+
walletBalanceChanges: Schema.Array(WalletTxBalanceChangeSchema)
|
|
212
|
+
});
|
|
213
|
+
const TransactionActivityPaginationSchema = Schema.Struct({
|
|
214
|
+
hasMore: Schema.Boolean,
|
|
153
215
|
page: Schema.Number,
|
|
154
|
-
pageSize: Schema.Number
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
216
|
+
pageSize: Schema.Number
|
|
217
|
+
});
|
|
218
|
+
const TransactionActivitySchema = Schema.Struct({
|
|
219
|
+
blockchain: BlockchainSchema,
|
|
220
|
+
earliestTx: Schema.NullOr(Schema.Number),
|
|
158
221
|
fromAddress: Schema.String,
|
|
159
|
-
|
|
222
|
+
pagination: TransactionActivityPaginationSchema,
|
|
160
223
|
toAddressesFilter: Schema.optional(Schema.Array(Schema.String)),
|
|
161
224
|
totalTransactionCount: Schema.Number,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}) {};
|
|
166
|
-
var DeployedContract = class extends Schema.Class("DeployedContract")({
|
|
167
|
-
contractAddress: Schema.String,
|
|
168
|
-
contractName: Schema.NullOr(Schema.String),
|
|
169
|
-
entity: Schema.NullOr(Schema.String),
|
|
170
|
-
symbol: Schema.NullOr(Schema.String),
|
|
225
|
+
transactions: Schema.Array(WalletTransactionSchema)
|
|
226
|
+
});
|
|
227
|
+
const DeployedContractSchema = Schema.Struct({
|
|
171
228
|
blockNumber: Schema.Number,
|
|
172
229
|
blockTimestamp: Schema.Number,
|
|
173
230
|
blockTimestampUtc: Schema.String,
|
|
231
|
+
contractAddress: Schema.String,
|
|
232
|
+
contractName: Schema.NullOr(Schema.String),
|
|
174
233
|
deploymentTxnHash: Schema.String,
|
|
234
|
+
entity: Schema.NullOr(Schema.String),
|
|
175
235
|
factoryAddress: Schema.NullOr(Schema.String),
|
|
176
|
-
factoryName: Schema.NullOr(Schema.String)
|
|
177
|
-
|
|
178
|
-
|
|
236
|
+
factoryName: Schema.NullOr(Schema.String),
|
|
237
|
+
symbol: Schema.NullOr(Schema.String)
|
|
238
|
+
});
|
|
239
|
+
const DeployedContractsPaginationSchema = Schema.Struct({
|
|
240
|
+
hasMore: Schema.Boolean,
|
|
179
241
|
page: Schema.Number,
|
|
180
|
-
pageSize: Schema.Number
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
242
|
+
pageSize: Schema.Number
|
|
243
|
+
});
|
|
244
|
+
const DeployedContractsSchema = Schema.Struct({
|
|
245
|
+
blockchain: BlockchainSchema,
|
|
246
|
+
deployedContracts: Schema.Array(DeployedContractSchema),
|
|
184
247
|
deployerAddress: Schema.String,
|
|
185
|
-
blockchain: Blockchain,
|
|
186
248
|
isEOA: Schema.Boolean,
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
page: Schema.optional(Schema.Number),
|
|
193
|
-
beforeTimestamp: Schema.optional(Schema.Number),
|
|
249
|
+
pagination: DeployedContractsPaginationSchema,
|
|
250
|
+
totalDeployedContractsCount: Schema.Number
|
|
251
|
+
});
|
|
252
|
+
const TokenActivityParamsSchema = Schema.Struct({
|
|
253
|
+
afterBlocknumber: Schema.optional(Schema.Number),
|
|
194
254
|
afterTimestamp: Schema.optional(Schema.Number),
|
|
195
255
|
beforeBlocknumber: Schema.optional(Schema.Number),
|
|
196
|
-
|
|
256
|
+
beforeTimestamp: Schema.optional(Schema.Number),
|
|
197
257
|
fromAddress: Schema.optional(Schema.String),
|
|
258
|
+
page: Schema.optional(Schema.Number),
|
|
198
259
|
toAddress: Schema.optional(Schema.String)
|
|
199
|
-
})
|
|
260
|
+
});
|
|
200
261
|
/** Same fields as MCP `getTransactionActivityTool` inputs (camelCase); POST `/v1/wallets/transaction-activity` body uses snake_case. */
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
fromAddress: Schema.optional(Schema.String),
|
|
204
|
-
toAddresses: Schema.optional(Schema.Array(Schema.String)),
|
|
205
|
-
page: Schema.optional(Schema.Number),
|
|
206
|
-
beforeTimestamp: Schema.optional(Schema.Number),
|
|
262
|
+
const TransactionActivityQuerySchema = Schema.Struct({
|
|
263
|
+
afterBlocknumber: Schema.optional(Schema.Number),
|
|
207
264
|
afterTimestamp: Schema.optional(Schema.Number),
|
|
208
265
|
beforeBlocknumber: Schema.optional(Schema.Number),
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
266
|
+
beforeTimestamp: Schema.optional(Schema.Number),
|
|
267
|
+
blockchain: BlockchainSchema,
|
|
268
|
+
fromAddress: Schema.optional(Schema.String),
|
|
269
|
+
page: Schema.optional(Schema.Number),
|
|
270
|
+
successOnly: Schema.optional(Schema.Boolean),
|
|
271
|
+
toAddresses: Schema.optional(Schema.Array(Schema.String))
|
|
272
|
+
});
|
|
212
273
|
|
|
213
274
|
//#endregion
|
|
214
|
-
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,15 +1,15 @@
|
|
|
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
|
|
6
|
-
declare const ActionsService_base: Context.
|
|
6
|
+
declare const ActionsService_base: Context.ServiceClass<ActionsService, "ActionsService", {
|
|
7
7
|
readonly get: (id: string, options?: {
|
|
8
8
|
includeReferences?: boolean;
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/ActionsService.ts
|
|
4
|
-
var ActionsService = class extends Context.
|
|
4
|
+
var ActionsService = class extends Context.Service()("ActionsService") {};
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { ActionsService };
|
|
@@ -4,7 +4,7 @@ import { CreateAdapterParams } from "../schemas/adapters.js";
|
|
|
4
4
|
import { Context, Effect } from "effect";
|
|
5
5
|
|
|
6
6
|
//#region src/services/AdaptersService.d.ts
|
|
7
|
-
declare const AdaptersService_base: Context.
|
|
7
|
+
declare const AdaptersService_base: Context.ServiceClass<AdaptersService, "AdaptersService", {
|
|
8
8
|
readonly get: (id: string) => Effect.Effect<Action, ActionNotFoundError | ServiceError>;
|
|
9
9
|
readonly create: (params: CreateAdapterParams) => Effect.Effect<CreateActionResponse, ServiceError>;
|
|
10
10
|
readonly updateMetadata: (id: string, params: UpdateActionMetadataParams) => Effect.Effect<void, ActionNotFoundError | ServiceError>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/AdaptersService.ts
|
|
4
|
-
var AdaptersService = class extends Context.
|
|
4
|
+
var AdaptersService = class extends Context.Service()("AdaptersService") {};
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AdaptersService };
|
|
@@ -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
|
-
declare const AgentSafesService_base: Context.
|
|
8
|
-
readonly getAgentSafe: (blockchain:
|
|
9
|
-
readonly setSafeProposer: (blockchain:
|
|
10
|
-
readonly editAgentSafeMetadata: (blockchain:
|
|
7
|
+
declare const AgentSafesService_base: Context.ServiceClass<AgentSafesService, "AgentSafesService", {
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/AgentSafesService.ts
|
|
4
|
-
var AgentSafesService = class extends Context.
|
|
4
|
+
var AgentSafesService = class extends Context.Service()("AgentSafesService") {};
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AgentSafesService };
|
|
@@ -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
|
-
declare const AgentWalletsService_base: Context.
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/AgentWalletsService.ts
|
|
4
|
-
var AgentWalletsService = class extends Context.
|
|
4
|
+
var AgentWalletsService = class extends Context.Service()("AgentWalletsService") {};
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AgentWalletsService };
|
|
@@ -1,26 +1,26 @@
|
|
|
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
|
|
6
6
|
declare class AgentWorkflowNotFoundError extends Error {
|
|
7
|
-
readonly workflowId: string;
|
|
8
7
|
readonly _tag = "AgentWorkflowNotFoundError";
|
|
8
|
+
readonly workflowId: string;
|
|
9
9
|
constructor(workflowId: string);
|
|
10
10
|
}
|
|
11
11
|
declare class AgentWorkflowRunNotFoundError extends Error {
|
|
12
|
-
readonly runId: string;
|
|
13
12
|
readonly _tag = "AgentWorkflowRunNotFoundError";
|
|
13
|
+
readonly runId: string;
|
|
14
14
|
constructor(runId: string);
|
|
15
15
|
}
|
|
16
|
-
declare const AgentWorkflowsService_base: Context.
|
|
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:
|
|
16
|
+
declare const AgentWorkflowsService_base: Context.ServiceClass<AgentWorkflowsService, "AgentWorkflowsService", {
|
|
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,21 +1,25 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/AgentWorkflowsService.ts
|
|
4
4
|
var AgentWorkflowNotFoundError = class extends Error {
|
|
5
5
|
_tag = "AgentWorkflowNotFoundError";
|
|
6
|
+
workflowId;
|
|
6
7
|
constructor(workflowId) {
|
|
7
8
|
super(`Agent workflow ${workflowId} not found`);
|
|
8
9
|
this.workflowId = workflowId;
|
|
10
|
+
this.name = "AgentWorkflowNotFoundError";
|
|
9
11
|
}
|
|
10
12
|
};
|
|
11
13
|
var AgentWorkflowRunNotFoundError = class extends Error {
|
|
12
14
|
_tag = "AgentWorkflowRunNotFoundError";
|
|
15
|
+
runId;
|
|
13
16
|
constructor(runId) {
|
|
14
17
|
super(`Agent workflow run ${runId} not found`);
|
|
15
18
|
this.runId = runId;
|
|
19
|
+
this.name = "AgentWorkflowRunNotFoundError";
|
|
16
20
|
}
|
|
17
21
|
};
|
|
18
|
-
var AgentWorkflowsService = class extends Context.
|
|
22
|
+
var AgentWorkflowsService = class extends Context.Service()("AgentWorkflowsService") {};
|
|
19
23
|
|
|
20
24
|
//#endregion
|
|
21
25
|
export { AgentWorkflowNotFoundError, AgentWorkflowRunNotFoundError, AgentWorkflowsService };
|
|
@@ -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
|
-
declare const AuthService_base: Context.
|
|
7
|
-
readonly whoami:
|
|
6
|
+
declare const AuthService_base: Context.ServiceClass<AuthService, "AuthService", {
|
|
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:
|
|
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,7 +1,7 @@
|
|
|
1
|
-
import { Context
|
|
1
|
+
import { Context } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/services/AuthService.ts
|
|
4
|
-
var AuthService = class extends Context.
|
|
4
|
+
var AuthService = class extends Context.Service()("AuthService") {};
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { AuthService };
|