@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,16 +1,16 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/docs.d.ts
|
|
4
|
-
declare const
|
|
4
|
+
declare const DocEntrySchema: Schema.Struct<{
|
|
5
5
|
readonly description: Schema.optional<Schema.String>;
|
|
6
6
|
readonly id: Schema.String;
|
|
7
7
|
readonly name: Schema.String;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
declare const
|
|
8
|
+
}>;
|
|
9
|
+
type DocEntry = typeof DocEntrySchema.Type;
|
|
10
|
+
declare const DocContentSchema: Schema.Struct<{
|
|
11
11
|
readonly content: Schema.String;
|
|
12
12
|
readonly documentId: Schema.String;
|
|
13
|
-
}
|
|
14
|
-
|
|
13
|
+
}>;
|
|
14
|
+
type DocContent = typeof DocContentSchema.Type;
|
|
15
15
|
//#endregion
|
|
16
|
-
export { DocContent, DocEntry };
|
|
16
|
+
export { DocContent, DocContentSchema, DocEntry, DocEntrySchema };
|
package/dist/src/schemas/docs.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/docs.ts
|
|
4
|
-
|
|
4
|
+
const DocEntrySchema = Schema.Struct({
|
|
5
5
|
description: Schema.optional(Schema.String),
|
|
6
6
|
id: Schema.String,
|
|
7
7
|
name: Schema.String
|
|
8
|
-
})
|
|
9
|
-
|
|
8
|
+
});
|
|
9
|
+
const DocContentSchema = Schema.Struct({
|
|
10
10
|
content: Schema.String,
|
|
11
11
|
documentId: Schema.String
|
|
12
|
-
})
|
|
12
|
+
});
|
|
13
13
|
|
|
14
14
|
//#endregion
|
|
15
|
-
export {
|
|
15
|
+
export { DocContentSchema, DocEntrySchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/groups.d.ts
|
|
4
|
-
declare const
|
|
4
|
+
declare const GroupSummarySchema: Schema.Struct<{
|
|
5
5
|
readonly createdAt: Schema.String;
|
|
6
6
|
readonly id: Schema.String;
|
|
7
7
|
readonly intent: Schema.NullOr<Schema.String>;
|
|
@@ -9,19 +9,19 @@ declare const GroupSummary: Schema.Struct<{
|
|
|
9
9
|
readonly name: Schema.NullOr<Schema.String>;
|
|
10
10
|
readonly quorum: Schema.Number;
|
|
11
11
|
}>;
|
|
12
|
-
type
|
|
13
|
-
declare const
|
|
12
|
+
type GroupSummary = typeof GroupSummarySchema.Type;
|
|
13
|
+
declare const GroupMemberSchema: Schema.Struct<{
|
|
14
14
|
readonly email: Schema.NullOr<Schema.String>;
|
|
15
15
|
readonly joinedAt: Schema.String;
|
|
16
16
|
readonly userId: Schema.String;
|
|
17
17
|
}>;
|
|
18
|
-
type
|
|
19
|
-
declare const
|
|
18
|
+
type GroupMember = typeof GroupMemberSchema.Type;
|
|
19
|
+
declare const GroupWalletSchema: Schema.Struct<{
|
|
20
20
|
readonly address: Schema.String;
|
|
21
21
|
readonly name: Schema.NullOr<Schema.String>;
|
|
22
22
|
}>;
|
|
23
|
-
type
|
|
24
|
-
declare const
|
|
23
|
+
type GroupWallet = typeof GroupWalletSchema.Type;
|
|
24
|
+
declare const GroupDetailsSchema: Schema.Struct<{
|
|
25
25
|
readonly createdAt: Schema.String;
|
|
26
26
|
readonly id: Schema.String;
|
|
27
27
|
readonly intent: Schema.NullOr<Schema.String>;
|
|
@@ -37,20 +37,20 @@ declare const GroupDetails: Schema.Struct<{
|
|
|
37
37
|
readonly name: Schema.NullOr<Schema.String>;
|
|
38
38
|
}>>;
|
|
39
39
|
}>;
|
|
40
|
-
type
|
|
41
|
-
declare const
|
|
40
|
+
type GroupDetails = typeof GroupDetailsSchema.Type;
|
|
41
|
+
declare const CreateGroupParamsSchema: Schema.Struct<{
|
|
42
42
|
readonly intent: Schema.optional<Schema.String>;
|
|
43
43
|
readonly members: Schema.$Array<Schema.String>;
|
|
44
44
|
readonly name: Schema.String;
|
|
45
45
|
readonly quorum: Schema.Number;
|
|
46
46
|
}>;
|
|
47
|
-
type
|
|
48
|
-
declare const
|
|
47
|
+
type CreateGroupParams = typeof CreateGroupParamsSchema.Type;
|
|
48
|
+
declare const CreateGroupResponseSchema: Schema.Struct<{
|
|
49
49
|
readonly groupId: Schema.String;
|
|
50
50
|
readonly walletAddress: Schema.String;
|
|
51
51
|
}>;
|
|
52
|
-
type
|
|
53
|
-
declare const
|
|
52
|
+
type CreateGroupResponse = typeof CreateGroupResponseSchema.Type;
|
|
53
|
+
declare const ListGroupsResponseSchema: Schema.Struct<{
|
|
54
54
|
readonly groups: Schema.$Array<Schema.Struct<{
|
|
55
55
|
readonly createdAt: Schema.String;
|
|
56
56
|
readonly id: Schema.String;
|
|
@@ -60,35 +60,35 @@ declare const ListGroupsResponse: Schema.Struct<{
|
|
|
60
60
|
readonly quorum: Schema.Number;
|
|
61
61
|
}>>;
|
|
62
62
|
}>;
|
|
63
|
-
type
|
|
64
|
-
declare const
|
|
63
|
+
type ListGroupsResponse = typeof ListGroupsResponseSchema.Type;
|
|
64
|
+
declare const GroupIdParamsSchema: Schema.Struct<{
|
|
65
65
|
readonly groupId: Schema.String;
|
|
66
66
|
}>;
|
|
67
|
-
type
|
|
68
|
-
declare const
|
|
67
|
+
type GroupIdParams = typeof GroupIdParamsSchema.Type;
|
|
68
|
+
declare const ProposeMemberChangeParamsSchema: Schema.Struct<{
|
|
69
69
|
readonly email: Schema.String;
|
|
70
70
|
readonly type: Schema.Literals<readonly ["add", "remove"]>;
|
|
71
71
|
}>;
|
|
72
|
-
type
|
|
73
|
-
declare const
|
|
72
|
+
type ProposeMemberChangeParams = typeof ProposeMemberChangeParamsSchema.Type;
|
|
73
|
+
declare const ProposeQuorumChangeParamsSchema: Schema.Struct<{
|
|
74
74
|
readonly quorum: Schema.Number;
|
|
75
75
|
}>;
|
|
76
|
-
type
|
|
77
|
-
declare const
|
|
76
|
+
type ProposeQuorumChangeParams = typeof ProposeQuorumChangeParamsSchema.Type;
|
|
77
|
+
declare const ProposalResponseSchema: Schema.Struct<{
|
|
78
78
|
readonly workflowId: Schema.String;
|
|
79
79
|
readonly workflowRunId: Schema.String;
|
|
80
80
|
}>;
|
|
81
|
-
type
|
|
82
|
-
declare const
|
|
81
|
+
type ProposalResponse = typeof ProposalResponseSchema.Type;
|
|
82
|
+
declare const EditGroupMetadataParamsSchema: Schema.Struct<{
|
|
83
83
|
readonly description: Schema.optional<Schema.String>;
|
|
84
84
|
readonly name: Schema.optional<Schema.String>;
|
|
85
85
|
}>;
|
|
86
|
-
type
|
|
87
|
-
declare const
|
|
86
|
+
type EditGroupMetadataParams = typeof EditGroupMetadataParamsSchema.Type;
|
|
87
|
+
declare const EditGroupMetadataResponseSchema: Schema.Struct<{
|
|
88
88
|
readonly id: Schema.String;
|
|
89
89
|
readonly intent: Schema.NullOr<Schema.String>;
|
|
90
90
|
readonly name: Schema.NullOr<Schema.String>;
|
|
91
91
|
}>;
|
|
92
|
-
type
|
|
92
|
+
type EditGroupMetadataResponse = typeof EditGroupMetadataResponseSchema.Type;
|
|
93
93
|
//#endregion
|
|
94
|
-
export { CreateGroupParams,
|
|
94
|
+
export { CreateGroupParams, CreateGroupParamsSchema, CreateGroupResponse, CreateGroupResponseSchema, EditGroupMetadataParams, EditGroupMetadataParamsSchema, EditGroupMetadataResponse, EditGroupMetadataResponseSchema, GroupDetails, GroupDetailsSchema, GroupIdParams, GroupIdParamsSchema, GroupMember, GroupMemberSchema, GroupSummary, GroupSummarySchema, GroupWallet, GroupWalletSchema, ListGroupsResponse, ListGroupsResponseSchema, ProposalResponse, ProposalResponseSchema, ProposeMemberChangeParams, ProposeMemberChangeParamsSchema, ProposeQuorumChangeParams, ProposeQuorumChangeParamsSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/groups.ts
|
|
4
|
-
const
|
|
4
|
+
const GroupSummarySchema = Schema.Struct({
|
|
5
5
|
createdAt: Schema.String,
|
|
6
6
|
id: Schema.String,
|
|
7
7
|
intent: Schema.NullOr(Schema.String),
|
|
@@ -9,54 +9,54 @@ const GroupSummary = Schema.Struct({
|
|
|
9
9
|
name: Schema.NullOr(Schema.String),
|
|
10
10
|
quorum: Schema.Number
|
|
11
11
|
});
|
|
12
|
-
const
|
|
12
|
+
const GroupMemberSchema = Schema.Struct({
|
|
13
13
|
email: Schema.NullOr(Schema.String),
|
|
14
14
|
joinedAt: Schema.String,
|
|
15
15
|
userId: Schema.String
|
|
16
16
|
});
|
|
17
|
-
const
|
|
17
|
+
const GroupWalletSchema = Schema.Struct({
|
|
18
18
|
address: Schema.String,
|
|
19
19
|
name: Schema.NullOr(Schema.String)
|
|
20
20
|
});
|
|
21
|
-
const
|
|
21
|
+
const GroupDetailsSchema = Schema.Struct({
|
|
22
22
|
createdAt: Schema.String,
|
|
23
23
|
id: Schema.String,
|
|
24
24
|
intent: Schema.NullOr(Schema.String),
|
|
25
|
-
members: Schema.Array(
|
|
25
|
+
members: Schema.Array(GroupMemberSchema),
|
|
26
26
|
name: Schema.NullOr(Schema.String),
|
|
27
27
|
quorum: Schema.Number,
|
|
28
|
-
wallet: Schema.NullOr(
|
|
28
|
+
wallet: Schema.NullOr(GroupWalletSchema)
|
|
29
29
|
});
|
|
30
|
-
const
|
|
30
|
+
const CreateGroupParamsSchema = Schema.Struct({
|
|
31
31
|
intent: Schema.optional(Schema.String),
|
|
32
32
|
members: Schema.Array(Schema.String),
|
|
33
33
|
name: Schema.String,
|
|
34
34
|
quorum: Schema.Number
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const CreateGroupResponseSchema = Schema.Struct({
|
|
37
37
|
groupId: Schema.String,
|
|
38
38
|
walletAddress: Schema.String
|
|
39
39
|
});
|
|
40
|
-
const
|
|
41
|
-
const
|
|
42
|
-
const
|
|
40
|
+
const ListGroupsResponseSchema = Schema.Struct({ groups: Schema.Array(GroupSummarySchema) });
|
|
41
|
+
const GroupIdParamsSchema = Schema.Struct({ groupId: Schema.String });
|
|
42
|
+
const ProposeMemberChangeParamsSchema = Schema.Struct({
|
|
43
43
|
email: Schema.String,
|
|
44
44
|
type: Schema.Literals(["add", "remove"])
|
|
45
45
|
});
|
|
46
|
-
const
|
|
47
|
-
const
|
|
46
|
+
const ProposeQuorumChangeParamsSchema = Schema.Struct({ quorum: Schema.Number });
|
|
47
|
+
const ProposalResponseSchema = Schema.Struct({
|
|
48
48
|
workflowId: Schema.String,
|
|
49
49
|
workflowRunId: Schema.String
|
|
50
50
|
});
|
|
51
|
-
const
|
|
51
|
+
const EditGroupMetadataParamsSchema = Schema.Struct({
|
|
52
52
|
description: Schema.optional(Schema.String),
|
|
53
53
|
name: Schema.optional(Schema.String)
|
|
54
54
|
});
|
|
55
|
-
const
|
|
55
|
+
const EditGroupMetadataResponseSchema = Schema.Struct({
|
|
56
56
|
id: Schema.String,
|
|
57
57
|
intent: Schema.NullOr(Schema.String),
|
|
58
58
|
name: Schema.NullOr(Schema.String)
|
|
59
59
|
});
|
|
60
60
|
|
|
61
61
|
//#endregion
|
|
62
|
-
export {
|
|
62
|
+
export { CreateGroupParamsSchema, CreateGroupResponseSchema, EditGroupMetadataParamsSchema, EditGroupMetadataResponseSchema, GroupDetailsSchema, GroupIdParamsSchema, GroupMemberSchema, GroupSummarySchema, GroupWalletSchema, ListGroupsResponseSchema, ProposalResponseSchema, ProposeMemberChangeParamsSchema, ProposeQuorumChangeParamsSchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Schema } from "effect";
|
|
2
2
|
|
|
3
3
|
//#region src/schemas/hal.d.ts
|
|
4
|
-
declare const
|
|
4
|
+
declare const EvaluateParamsSchema: Schema.Struct<{
|
|
5
5
|
readonly expression: Schema.Unknown;
|
|
6
6
|
/** When set, merged into the expression via buildExecutionExpression (main parameter values). */
|
|
7
7
|
readonly inputValues: Schema.optional<Schema.$Record<Schema.String, Schema.Unknown>>;
|
|
@@ -12,9 +12,9 @@ declare const EvaluateParams_base: Schema.Class<EvaluateParams, Schema.Struct<{
|
|
|
12
12
|
readonly simulationBlockNumber: Schema.optional<Schema.Number>;
|
|
13
13
|
readonly tevmForkId: Schema.optional<Schema.String>;
|
|
14
14
|
readonly walletAddress: Schema.brand<Schema.String, "EvmAddress">;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare const
|
|
15
|
+
}>;
|
|
16
|
+
type EvaluateParams = typeof EvaluateParamsSchema.Type;
|
|
17
|
+
declare const EvaluateExistingParamsSchema: Schema.Struct<{
|
|
18
18
|
/** Published action-expression id (UUID). When omitted, the latest published expression is simulated. */
|
|
19
19
|
readonly actionExpressionId: Schema.optional<Schema.String>;
|
|
20
20
|
readonly actionId: Schema.String;
|
|
@@ -26,9 +26,9 @@ declare const EvaluateExistingParams_base: Schema.Class<EvaluateExistingParams,
|
|
|
26
26
|
readonly simulationBlockNumber: Schema.optional<Schema.Number>;
|
|
27
27
|
readonly tevmForkId: Schema.optional<Schema.String>;
|
|
28
28
|
readonly walletAddress: Schema.brand<Schema.String, "EvmAddress">;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
declare const
|
|
29
|
+
}>;
|
|
30
|
+
type EvaluateExistingParams = typeof EvaluateExistingParamsSchema.Type;
|
|
31
|
+
declare const TransactionStatusSchema: Schema.Struct<{
|
|
32
32
|
readonly args: Schema.optional<Schema.NullOr<Schema.Unknown>>;
|
|
33
33
|
readonly batchName: Schema.NullOr<Schema.String>;
|
|
34
34
|
readonly batchStepIndex: Schema.NullOr<Schema.Number>;
|
|
@@ -45,9 +45,9 @@ declare const TransactionStatus_base: Schema.Class<TransactionStatus, Schema.Str
|
|
|
45
45
|
readonly transactionErrorMessage: Schema.NullOr<Schema.String>;
|
|
46
46
|
readonly transactionHash: Schema.NullOr<Schema.String>;
|
|
47
47
|
readonly value: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
declare const
|
|
48
|
+
}>;
|
|
49
|
+
type TransactionStatus = typeof TransactionStatusSchema.Type;
|
|
50
|
+
declare const EvaluateResponseSchema: Schema.Struct<{
|
|
51
51
|
readonly error: Schema.optional<Schema.Struct<{
|
|
52
52
|
readonly name: Schema.String;
|
|
53
53
|
readonly message: Schema.String;
|
|
@@ -58,16 +58,62 @@ declare const EvaluateResponse_base: Schema.Class<EvaluateResponse, Schema.Struc
|
|
|
58
58
|
readonly status: Schema.Literals<readonly ["completed", "suspended", "failed"]>;
|
|
59
59
|
readonly tevmForkBlockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
60
60
|
readonly tevmForkId: Schema.optional<Schema.String>;
|
|
61
|
-
readonly transactionStatuses: Schema.optional<Schema.$Array<
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
61
|
+
readonly transactionStatuses: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
62
|
+
readonly args: Schema.optional<Schema.NullOr<Schema.Unknown>>;
|
|
63
|
+
readonly batchName: Schema.NullOr<Schema.String>;
|
|
64
|
+
readonly batchStepIndex: Schema.NullOr<Schema.Number>;
|
|
65
|
+
readonly blockNumber: Schema.NullOr<Schema.Number>;
|
|
66
|
+
readonly blockTimestamp: Schema.NullOr<Schema.Number>;
|
|
67
|
+
readonly blockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
68
|
+
readonly data: Schema.optional<Schema.String>;
|
|
69
|
+
/** Full batch row fields when the API returns BatchTransactionStatus (simulation / evaluate). */
|
|
70
|
+
readonly operationId: Schema.optional<Schema.String>;
|
|
71
|
+
readonly status: Schema.Literals<readonly ["success", "failed", "pending"]>;
|
|
72
|
+
readonly to: Schema.optional<Schema.String>;
|
|
73
|
+
readonly toContractName: Schema.NullOr<Schema.String>;
|
|
74
|
+
readonly transactionData: Schema.optional<Schema.NullOr<Schema.Unknown>>;
|
|
75
|
+
readonly transactionErrorMessage: Schema.NullOr<Schema.String>;
|
|
76
|
+
readonly transactionHash: Schema.NullOr<Schema.String>;
|
|
77
|
+
readonly value: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
78
|
+
}>>>;
|
|
79
|
+
}>;
|
|
80
|
+
type EvaluateResponse = typeof EvaluateResponseSchema.Type;
|
|
81
|
+
declare const EvaluateExistingResponseSchema: Schema.Struct<{
|
|
65
82
|
readonly actionId: Schema.String;
|
|
66
83
|
readonly actionName: Schema.String;
|
|
67
84
|
readonly mainParameters: Schema.$Array<Schema.String>;
|
|
68
|
-
readonly simulation:
|
|
85
|
+
readonly simulation: Schema.Struct<{
|
|
86
|
+
readonly error: Schema.optional<Schema.Struct<{
|
|
87
|
+
readonly name: Schema.String;
|
|
88
|
+
readonly message: Schema.String;
|
|
89
|
+
}>>;
|
|
90
|
+
readonly hint: Schema.optional<Schema.String>;
|
|
91
|
+
readonly oplog: Schema.optional<Schema.Unknown>;
|
|
92
|
+
readonly result: Schema.optional<Schema.Unknown>;
|
|
93
|
+
readonly status: Schema.Literals<readonly ["completed", "suspended", "failed"]>;
|
|
94
|
+
readonly tevmForkBlockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
95
|
+
readonly tevmForkId: Schema.optional<Schema.String>;
|
|
96
|
+
readonly transactionStatuses: Schema.optional<Schema.$Array<Schema.Struct<{
|
|
97
|
+
readonly args: Schema.optional<Schema.NullOr<Schema.Unknown>>;
|
|
98
|
+
readonly batchName: Schema.NullOr<Schema.String>;
|
|
99
|
+
readonly batchStepIndex: Schema.NullOr<Schema.Number>;
|
|
100
|
+
readonly blockNumber: Schema.NullOr<Schema.Number>;
|
|
101
|
+
readonly blockTimestamp: Schema.NullOr<Schema.Number>;
|
|
102
|
+
readonly blockchain: Schema.optional<Schema.Literals<readonly ["ethereum", "base"]>>;
|
|
103
|
+
readonly data: Schema.optional<Schema.String>;
|
|
104
|
+
/** Full batch row fields when the API returns BatchTransactionStatus (simulation / evaluate). */
|
|
105
|
+
readonly operationId: Schema.optional<Schema.String>;
|
|
106
|
+
readonly status: Schema.Literals<readonly ["success", "failed", "pending"]>;
|
|
107
|
+
readonly to: Schema.optional<Schema.String>;
|
|
108
|
+
readonly toContractName: Schema.NullOr<Schema.String>;
|
|
109
|
+
readonly transactionData: Schema.optional<Schema.NullOr<Schema.Unknown>>;
|
|
110
|
+
readonly transactionErrorMessage: Schema.NullOr<Schema.String>;
|
|
111
|
+
readonly transactionHash: Schema.NullOr<Schema.String>;
|
|
112
|
+
readonly value: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
113
|
+
}>>>;
|
|
114
|
+
}>;
|
|
69
115
|
readonly versionName: Schema.String;
|
|
70
|
-
}
|
|
71
|
-
|
|
116
|
+
}>;
|
|
117
|
+
type EvaluateExistingResponse = typeof EvaluateExistingResponseSchema.Type;
|
|
72
118
|
//#endregion
|
|
73
|
-
export { EvaluateExistingParams, EvaluateExistingResponse, EvaluateParams, EvaluateResponse, TransactionStatus };
|
|
119
|
+
export { EvaluateExistingParams, EvaluateExistingParamsSchema, EvaluateExistingResponse, EvaluateExistingResponseSchema, EvaluateParams, EvaluateParamsSchema, EvaluateResponse, EvaluateResponseSchema, TransactionStatus, TransactionStatusSchema };
|
package/dist/src/schemas/hal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BlockchainSchema, EvmAddressSchema } from "./common.js";
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
|
|
4
4
|
//#region src/schemas/hal.ts
|
|
5
|
-
|
|
5
|
+
const EvaluateParamsSchema = Schema.Struct({
|
|
6
6
|
expression: Schema.Unknown,
|
|
7
7
|
inputValues: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
8
8
|
simulationBalanceFunding: Schema.optional(Schema.Array(Schema.Struct({
|
|
@@ -11,28 +11,28 @@ var EvaluateParams = class extends Schema.Class("EvaluateParams")({
|
|
|
11
11
|
}))),
|
|
12
12
|
simulationBlockNumber: Schema.optional(Schema.Number),
|
|
13
13
|
tevmForkId: Schema.optional(Schema.String),
|
|
14
|
-
walletAddress:
|
|
15
|
-
})
|
|
14
|
+
walletAddress: EvmAddressSchema
|
|
15
|
+
});
|
|
16
16
|
const SimulationBalanceFunding = Schema.Array(Schema.Struct({
|
|
17
17
|
startingBalanceRaw: Schema.String,
|
|
18
18
|
tokenAddress: Schema.String
|
|
19
19
|
}));
|
|
20
|
-
|
|
20
|
+
const EvaluateExistingParamsSchema = Schema.Struct({
|
|
21
21
|
actionExpressionId: Schema.optional(Schema.String.check(Schema.isUUID())),
|
|
22
22
|
actionId: Schema.String,
|
|
23
23
|
inputValues: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
|
|
24
24
|
simulationBalanceFunding: Schema.optional(SimulationBalanceFunding),
|
|
25
25
|
simulationBlockNumber: Schema.optional(Schema.Number),
|
|
26
26
|
tevmForkId: Schema.optional(Schema.String),
|
|
27
|
-
walletAddress:
|
|
28
|
-
})
|
|
29
|
-
|
|
27
|
+
walletAddress: EvmAddressSchema
|
|
28
|
+
});
|
|
29
|
+
const TransactionStatusSchema = Schema.Struct({
|
|
30
30
|
args: Schema.optional(Schema.NullOr(Schema.Unknown)),
|
|
31
31
|
batchName: Schema.NullOr(Schema.String),
|
|
32
32
|
batchStepIndex: Schema.NullOr(Schema.Number),
|
|
33
33
|
blockNumber: Schema.NullOr(Schema.Number),
|
|
34
34
|
blockTimestamp: Schema.NullOr(Schema.Number),
|
|
35
|
-
blockchain: Schema.optional(
|
|
35
|
+
blockchain: Schema.optional(BlockchainSchema),
|
|
36
36
|
data: Schema.optional(Schema.String),
|
|
37
37
|
operationId: Schema.optional(Schema.String),
|
|
38
38
|
status: Schema.Literals([
|
|
@@ -46,8 +46,8 @@ var TransactionStatus = class extends Schema.Class("TransactionStatus")({
|
|
|
46
46
|
transactionErrorMessage: Schema.NullOr(Schema.String),
|
|
47
47
|
transactionHash: Schema.NullOr(Schema.String),
|
|
48
48
|
value: Schema.optional(Schema.NullOr(Schema.String))
|
|
49
|
-
})
|
|
50
|
-
|
|
49
|
+
});
|
|
50
|
+
const EvaluateResponseSchema = Schema.Struct({
|
|
51
51
|
error: Schema.optional(Schema.Struct({
|
|
52
52
|
name: Schema.String,
|
|
53
53
|
message: Schema.String
|
|
@@ -60,17 +60,17 @@ var EvaluateResponse = class extends Schema.Class("EvaluateResponse")({
|
|
|
60
60
|
"suspended",
|
|
61
61
|
"failed"
|
|
62
62
|
]),
|
|
63
|
-
tevmForkBlockchain: Schema.optional(
|
|
63
|
+
tevmForkBlockchain: Schema.optional(BlockchainSchema),
|
|
64
64
|
tevmForkId: Schema.optional(Schema.String),
|
|
65
|
-
transactionStatuses: Schema.optional(Schema.Array(
|
|
66
|
-
})
|
|
67
|
-
|
|
65
|
+
transactionStatuses: Schema.optional(Schema.Array(TransactionStatusSchema))
|
|
66
|
+
});
|
|
67
|
+
const EvaluateExistingResponseSchema = Schema.Struct({
|
|
68
68
|
actionId: Schema.String,
|
|
69
69
|
actionName: Schema.String,
|
|
70
70
|
mainParameters: Schema.Array(Schema.String),
|
|
71
|
-
simulation:
|
|
71
|
+
simulation: EvaluateResponseSchema,
|
|
72
72
|
versionName: Schema.String
|
|
73
|
-
})
|
|
73
|
+
});
|
|
74
74
|
|
|
75
75
|
//#endregion
|
|
76
|
-
export {
|
|
76
|
+
export { EvaluateExistingParamsSchema, EvaluateExistingResponseSchema, EvaluateParamsSchema, EvaluateResponseSchema, TransactionStatusSchema };
|