@avaprotocol/sdk-js 4.0.0-dev.0 → 4.0.0-dev.2
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.js +874 -14
- package/dist/index.mjs +873 -14
- package/dist/v4/builders/nodes.d.ts +5 -2
- package/dist/v4/builders/nodes.d.ts.map +1 -1
- package/dist/v4/builders/nodes.js +1 -0
- package/dist/v4/index.d.ts +1 -0
- package/dist/v4/index.d.ts.map +1 -1
- package/dist/v4/index.js +1 -0
- package/dist/v4/protocols/aave-v3.d.ts +21 -0
- package/dist/v4/protocols/aave-v3.d.ts.map +1 -0
- package/dist/v4/protocols/aave-v3.js +238 -0
- package/dist/v4/protocols/aerodrome.d.ts +4 -0
- package/dist/v4/protocols/aerodrome.d.ts.map +1 -0
- package/dist/v4/protocols/aerodrome.js +9 -0
- package/dist/v4/protocols/chainlink.d.ts +7 -0
- package/dist/v4/protocols/chainlink.d.ts.map +1 -0
- package/dist/v4/protocols/chainlink.js +25 -0
- package/dist/v4/protocols/common.d.ts +16 -0
- package/dist/v4/protocols/common.d.ts.map +1 -0
- package/dist/v4/protocols/common.js +76 -0
- package/dist/v4/protocols/compound-v3.d.ts +4 -0
- package/dist/v4/protocols/compound-v3.d.ts.map +1 -0
- package/dist/v4/protocols/compound-v3.js +15 -0
- package/dist/v4/protocols/erc20.d.ts +5 -0
- package/dist/v4/protocols/erc20.d.ts.map +1 -0
- package/dist/v4/protocols/erc20.js +18 -0
- package/dist/v4/protocols/ethena.d.ts +7 -0
- package/dist/v4/protocols/ethena.d.ts.map +1 -0
- package/dist/v4/protocols/ethena.js +58 -0
- package/dist/v4/protocols/frax-ether.d.ts +7 -0
- package/dist/v4/protocols/frax-ether.d.ts.map +1 -0
- package/dist/v4/protocols/frax-ether.js +20 -0
- package/dist/v4/protocols/index.d.ts +132 -0
- package/dist/v4/protocols/index.d.ts.map +1 -0
- package/dist/v4/protocols/index.js +87 -0
- package/dist/v4/protocols/lido.d.ts +7 -0
- package/dist/v4/protocols/lido.d.ts.map +1 -0
- package/dist/v4/protocols/lido.js +44 -0
- package/dist/v4/protocols/morpho.d.ts +6 -0
- package/dist/v4/protocols/morpho.d.ts.map +1 -0
- package/dist/v4/protocols/morpho.js +89 -0
- package/dist/v4/protocols/rocket-pool.d.ts +6 -0
- package/dist/v4/protocols/rocket-pool.d.ts.map +1 -0
- package/dist/v4/protocols/rocket-pool.js +36 -0
- package/dist/v4/protocols/sky.d.ts +6 -0
- package/dist/v4/protocols/sky.d.ts.map +1 -0
- package/dist/v4/protocols/sky.js +13 -0
- package/dist/v4/protocols/spark.d.ts +4 -0
- package/dist/v4/protocols/spark.d.ts.map +1 -0
- package/dist/v4/protocols/spark.js +15 -0
- package/dist/v4/protocols/superfluid.d.ts +6 -0
- package/dist/v4/protocols/superfluid.d.ts.map +1 -0
- package/dist/v4/protocols/superfluid.js +39 -0
- package/dist/v4/protocols/types.d.ts +17 -0
- package/dist/v4/protocols/types.d.ts.map +1 -0
- package/dist/v4/protocols/types.js +1 -0
- package/dist/v4/protocols/uniswap-v3.d.ts +27 -0
- package/dist/v4/protocols/uniswap-v3.d.ts.map +1 -0
- package/dist/v4/protocols/uniswap-v3.js +197 -0
- package/dist/v4/protocols/wrapped.d.ts +6 -0
- package/dist/v4/protocols/wrapped.d.ts.map +1 -0
- package/dist/v4/protocols/wrapped.js +55 -0
- package/dist/v4/resources/executions.d.ts +6 -0
- package/dist/v4/resources/executions.d.ts.map +1 -1
- package/dist/v4/resources/executions.js +6 -0
- package/dist/v4/resources/health.d.ts +11 -1
- package/dist/v4/resources/health.d.ts.map +1 -1
- package/dist/v4/resources/health.js +11 -1
- package/dist/v4/resources/nodes.d.ts +21 -1
- package/dist/v4/resources/nodes.d.ts.map +1 -1
- package/dist/v4/resources/nodes.js +21 -1
- package/dist/v4/resources/operators.d.ts +15 -1
- package/dist/v4/resources/operators.d.ts.map +1 -1
- package/dist/v4/resources/operators.js +15 -1
- package/dist/v4/resources/secrets.d.ts +10 -0
- package/dist/v4/resources/secrets.d.ts.map +1 -1
- package/dist/v4/resources/secrets.js +10 -0
- package/dist/v4/resources/tokens.d.ts +16 -4
- package/dist/v4/resources/tokens.d.ts.map +1 -1
- package/dist/v4/resources/tokens.js +16 -4
- package/dist/v4/resources/triggers.d.ts +21 -1
- package/dist/v4/resources/triggers.d.ts.map +1 -1
- package/dist/v4/resources/triggers.js +21 -1
- package/dist/v4/resources/wallets.d.ts +53 -6
- package/dist/v4/resources/wallets.d.ts.map +1 -1
- package/dist/v4/resources/wallets.js +53 -6
- package/dist/v4/resources/workflows.d.ts +10 -0
- package/dist/v4/resources/workflows.d.ts.map +1 -1
- package/dist/v4/resources/workflows.js +10 -0
- package/package.json +7 -2
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
// Uniswap V3 whitelist context — Router02 / QuoterV2 / Permit2 / Factory
|
|
2
|
+
// / NonfungiblePositionManager addresses per chain, plus the ABI
|
|
3
|
+
// fragments templates routinely need to compose swaps and quotes.
|
|
4
|
+
//
|
|
5
|
+
// Address parity with studio's per-chain data files:
|
|
6
|
+
// sepolia → app/lib/uniswap/v3/data/sepolia.json
|
|
7
|
+
// ethereum → app/lib/uniswap/v3/data/ethereum.json
|
|
8
|
+
// base → app/lib/uniswap/v3/data/base.json
|
|
9
|
+
// base-sepolia → app/lib/uniswap/v3/data/base-sepolia.json
|
|
10
|
+
//
|
|
11
|
+
// Studio's per-chain pool registries (`pools[]`) intentionally NOT
|
|
12
|
+
// migrated — they're 25+ entries per chain, change frequently, and
|
|
13
|
+
// belong to studio's UI discovery layer. Template tests that need a
|
|
14
|
+
// specific pool address pass it inline; the catalog ships the
|
|
15
|
+
// canonical contract addresses, not the indexed pool universe.
|
|
16
|
+
import { Chains } from "../chains";
|
|
17
|
+
/** SwapRouter02 — the entry point for exactInput/exactOutput swaps. */
|
|
18
|
+
const swapRouter02 = {
|
|
19
|
+
[Chains.EthereumMainnet]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
|
|
20
|
+
[Chains.Sepolia]: "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",
|
|
21
|
+
[Chains.BaseMainnet]: "0x2626664c2603336E57B271c5C0b26F421741e481",
|
|
22
|
+
[Chains.BaseSepolia]: "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4",
|
|
23
|
+
};
|
|
24
|
+
/** QuoterV2 — off-chain quote helper for swap previews. */
|
|
25
|
+
const quoterV2 = {
|
|
26
|
+
[Chains.EthereumMainnet]: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
|
|
27
|
+
[Chains.Sepolia]: "0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",
|
|
28
|
+
[Chains.BaseMainnet]: "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
|
|
29
|
+
[Chains.BaseSepolia]: "0xC5290058841028F1614F3A6F0F5816cAd0df5E27",
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Permit2 — Uniswap's universal token-permit contract. Deployed at the
|
|
33
|
+
* SAME address across all chains in the catalog.
|
|
34
|
+
*/
|
|
35
|
+
const permit2 = {
|
|
36
|
+
[Chains.EthereumMainnet]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
|
|
37
|
+
[Chains.Sepolia]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
|
|
38
|
+
[Chains.BaseMainnet]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
|
|
39
|
+
[Chains.BaseSepolia]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
|
|
40
|
+
};
|
|
41
|
+
/** Uniswap V3 Factory — derives the deterministic pool address per token-pair+fee. */
|
|
42
|
+
const factory = {
|
|
43
|
+
[Chains.EthereumMainnet]: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
|
|
44
|
+
[Chains.Sepolia]: "0x0227628f3F023bb0B980b67D528571c95c6DaC1c",
|
|
45
|
+
[Chains.BaseMainnet]: "0x33128a8fC17869897dcE68Ed026d694621f6FDfD",
|
|
46
|
+
[Chains.BaseSepolia]: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24",
|
|
47
|
+
};
|
|
48
|
+
/** NonfungiblePositionManager — LP NFT mint/burn/collect. */
|
|
49
|
+
const nonfungiblePositionManager = {
|
|
50
|
+
[Chains.EthereumMainnet]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
|
|
51
|
+
[Chains.Sepolia]: "0x1238536071E1c677A632429e3655c799b22cDA52",
|
|
52
|
+
[Chains.BaseMainnet]: "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",
|
|
53
|
+
[Chains.BaseSepolia]: "0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2",
|
|
54
|
+
};
|
|
55
|
+
/** UniversalRouter — Uniswap's multi-step routing entrypoint (Permit2-aware). */
|
|
56
|
+
const universalRouter = {
|
|
57
|
+
[Chains.EthereumMainnet]: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
|
|
58
|
+
[Chains.Sepolia]: "0x3A9D48AB9751398BbFa63ad67599Bb04e4BdF98b",
|
|
59
|
+
[Chains.BaseMainnet]: "0x6ff5693b99212da76ad316178a184ab56d299b43",
|
|
60
|
+
[Chains.BaseSepolia]: "0x492e6456d9528771018deb9e87ef7750ef184104",
|
|
61
|
+
};
|
|
62
|
+
/**
|
|
63
|
+
* SwapRouter02 ABI — `exactInputSingle` + `exactOutputSingle`. These
|
|
64
|
+
* are the two single-hop swap methods stoploss-style and DCA-style
|
|
65
|
+
* templates use; multi-hop variants (`exactInput` / `exactOutput`)
|
|
66
|
+
* take a `path` bytes blob and aren't included until a template
|
|
67
|
+
* actually needs them.
|
|
68
|
+
*/
|
|
69
|
+
const swapRouter02Abi = Object.freeze([
|
|
70
|
+
{
|
|
71
|
+
inputs: [
|
|
72
|
+
{
|
|
73
|
+
components: [
|
|
74
|
+
{ internalType: "address", name: "tokenIn", type: "address" },
|
|
75
|
+
{ internalType: "address", name: "tokenOut", type: "address" },
|
|
76
|
+
{ internalType: "uint24", name: "fee", type: "uint24" },
|
|
77
|
+
{ internalType: "address", name: "recipient", type: "address" },
|
|
78
|
+
{ internalType: "uint256", name: "amountIn", type: "uint256" },
|
|
79
|
+
{ internalType: "uint256", name: "amountOutMinimum", type: "uint256" },
|
|
80
|
+
{ internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
|
|
81
|
+
],
|
|
82
|
+
internalType: "struct IV3SwapRouter.ExactInputSingleParams",
|
|
83
|
+
name: "params",
|
|
84
|
+
type: "tuple",
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
name: "exactInputSingle",
|
|
88
|
+
outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }],
|
|
89
|
+
stateMutability: "payable",
|
|
90
|
+
type: "function",
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
inputs: [
|
|
94
|
+
{
|
|
95
|
+
components: [
|
|
96
|
+
{ internalType: "address", name: "tokenIn", type: "address" },
|
|
97
|
+
{ internalType: "address", name: "tokenOut", type: "address" },
|
|
98
|
+
{ internalType: "uint24", name: "fee", type: "uint24" },
|
|
99
|
+
{ internalType: "address", name: "recipient", type: "address" },
|
|
100
|
+
{ internalType: "uint256", name: "amountOut", type: "uint256" },
|
|
101
|
+
{ internalType: "uint256", name: "amountInMaximum", type: "uint256" },
|
|
102
|
+
{ internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
|
|
103
|
+
],
|
|
104
|
+
internalType: "struct IV3SwapRouter.ExactOutputSingleParams",
|
|
105
|
+
name: "params",
|
|
106
|
+
type: "tuple",
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
name: "exactOutputSingle",
|
|
110
|
+
outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }],
|
|
111
|
+
stateMutability: "payable",
|
|
112
|
+
type: "function",
|
|
113
|
+
},
|
|
114
|
+
]);
|
|
115
|
+
/**
|
|
116
|
+
* QuoterV2 ABI — `quoteExactInputSingle` for off-chain price preview.
|
|
117
|
+
* Note: this is a state-changing call in QuoterV2 (the contract uses
|
|
118
|
+
* `revert` to return the quote) — eth_call against an archive node is
|
|
119
|
+
* the standard usage, which the SDK's `contractRead` supports.
|
|
120
|
+
*/
|
|
121
|
+
const quoterV2Abi = Object.freeze([
|
|
122
|
+
{
|
|
123
|
+
inputs: [
|
|
124
|
+
{
|
|
125
|
+
components: [
|
|
126
|
+
{ internalType: "address", name: "tokenIn", type: "address" },
|
|
127
|
+
{ internalType: "address", name: "tokenOut", type: "address" },
|
|
128
|
+
{ internalType: "uint256", name: "amountIn", type: "uint256" },
|
|
129
|
+
{ internalType: "uint24", name: "fee", type: "uint24" },
|
|
130
|
+
{ internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" },
|
|
131
|
+
],
|
|
132
|
+
internalType: "struct IQuoterV2.QuoteExactInputSingleParams",
|
|
133
|
+
name: "params",
|
|
134
|
+
type: "tuple",
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
name: "quoteExactInputSingle",
|
|
138
|
+
outputs: [
|
|
139
|
+
{ internalType: "uint256", name: "amountOut", type: "uint256" },
|
|
140
|
+
{ internalType: "uint160", name: "sqrtPriceX96After", type: "uint160" },
|
|
141
|
+
{ internalType: "uint32", name: "initializedTicksCrossed", type: "uint32" },
|
|
142
|
+
{ internalType: "uint256", name: "gasEstimate", type: "uint256" },
|
|
143
|
+
],
|
|
144
|
+
stateMutability: "nonpayable",
|
|
145
|
+
type: "function",
|
|
146
|
+
},
|
|
147
|
+
]);
|
|
148
|
+
/**
|
|
149
|
+
* Factory ABI — `getPool` resolves the canonical pool address for a
|
|
150
|
+
* (tokenA, tokenB, fee) triple. Useful when a template starts from a
|
|
151
|
+
* pair + fee tier rather than a known pool.
|
|
152
|
+
*/
|
|
153
|
+
const factoryAbi = Object.freeze([
|
|
154
|
+
{
|
|
155
|
+
inputs: [
|
|
156
|
+
{ internalType: "address", name: "tokenA", type: "address" },
|
|
157
|
+
{ internalType: "address", name: "tokenB", type: "address" },
|
|
158
|
+
{ internalType: "uint24", name: "fee", type: "uint24" },
|
|
159
|
+
],
|
|
160
|
+
name: "getPool",
|
|
161
|
+
outputs: [{ internalType: "address", name: "pool", type: "address" }],
|
|
162
|
+
stateMutability: "view",
|
|
163
|
+
type: "function",
|
|
164
|
+
},
|
|
165
|
+
]);
|
|
166
|
+
/**
|
|
167
|
+
* Reference token addresses on the testnet markets these templates
|
|
168
|
+
* routinely target. Mainnet tokens vary per template — pass them
|
|
169
|
+
* inline rather than relying on a global registry the catalog
|
|
170
|
+
* doesn't yet maintain.
|
|
171
|
+
*/
|
|
172
|
+
const tokens = Object.freeze({
|
|
173
|
+
WETH: {
|
|
174
|
+
[Chains.Sepolia]: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
|
|
175
|
+
[Chains.EthereumMainnet]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
176
|
+
[Chains.BaseMainnet]: "0x4200000000000000000000000000000000000006",
|
|
177
|
+
[Chains.BaseSepolia]: "0x4200000000000000000000000000000000000006",
|
|
178
|
+
},
|
|
179
|
+
USDC: {
|
|
180
|
+
[Chains.Sepolia]: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
|
|
181
|
+
[Chains.EthereumMainnet]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
182
|
+
[Chains.BaseMainnet]: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
|
|
183
|
+
[Chains.BaseSepolia]: "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
|
|
184
|
+
},
|
|
185
|
+
});
|
|
186
|
+
export const uniswapV3 = Object.freeze({
|
|
187
|
+
swapRouter02,
|
|
188
|
+
quoterV2,
|
|
189
|
+
permit2,
|
|
190
|
+
factory,
|
|
191
|
+
nonfungiblePositionManager,
|
|
192
|
+
universalRouter,
|
|
193
|
+
swapRouter02Abi,
|
|
194
|
+
quoterV2Abi,
|
|
195
|
+
factoryAbi,
|
|
196
|
+
tokens,
|
|
197
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrapped.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/wrapped.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAkDhE,eAAO,MAAM,OAAO;;;EAGlB,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// Wrapped Ether (WETH) — the canonical native-ETH wrapping contract.
|
|
2
|
+
// Mainnet WETH is a one-off; Base (and Base Sepolia) use the OP-stack
|
|
3
|
+
// predeploy at 0x4200…0006. Sepolia is the Uniswap-deployed test WETH
|
|
4
|
+
// used by AAVE Sepolia and Uniswap Sepolia.
|
|
5
|
+
import { Chains } from "../chains";
|
|
6
|
+
const weth = {
|
|
7
|
+
[Chains.EthereumMainnet]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
|
|
8
|
+
[Chains.Sepolia]: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
|
|
9
|
+
[Chains.BaseMainnet]: "0x4200000000000000000000000000000000000006",
|
|
10
|
+
[Chains.BaseSepolia]: "0x4200000000000000000000000000000000000006",
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* WETH9 ABI — `deposit` (payable wrap) + `withdraw` (unwrap) + the
|
|
14
|
+
* standard ERC-20 surface templates rely on. `deposit` is payable
|
|
15
|
+
* with no args; the wrap amount comes from `msg.value`, so the
|
|
16
|
+
* contractWrite node must surface an editable value field — keep
|
|
17
|
+
* stateMutability: "payable" so the SDK builder doesn't hide it.
|
|
18
|
+
*/
|
|
19
|
+
const wethAbi = Object.freeze([
|
|
20
|
+
{
|
|
21
|
+
inputs: [],
|
|
22
|
+
name: "deposit",
|
|
23
|
+
outputs: [],
|
|
24
|
+
stateMutability: "payable",
|
|
25
|
+
type: "function",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
inputs: [{ internalType: "uint256", name: "wad", type: "uint256" }],
|
|
29
|
+
name: "withdraw",
|
|
30
|
+
outputs: [],
|
|
31
|
+
stateMutability: "nonpayable",
|
|
32
|
+
type: "function",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
inputs: [
|
|
36
|
+
{ internalType: "address", name: "guy", type: "address" },
|
|
37
|
+
{ internalType: "uint256", name: "wad", type: "uint256" },
|
|
38
|
+
],
|
|
39
|
+
name: "approve",
|
|
40
|
+
outputs: [{ internalType: "bool", name: "", type: "bool" }],
|
|
41
|
+
stateMutability: "nonpayable",
|
|
42
|
+
type: "function",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
inputs: [{ internalType: "address", name: "", type: "address" }],
|
|
46
|
+
name: "balanceOf",
|
|
47
|
+
outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
|
|
48
|
+
stateMutability: "view",
|
|
49
|
+
type: "function",
|
|
50
|
+
},
|
|
51
|
+
]);
|
|
52
|
+
export const wrapped = Object.freeze({
|
|
53
|
+
weth,
|
|
54
|
+
wethAbi,
|
|
55
|
+
});
|
|
@@ -31,6 +31,12 @@ export interface StreamExecutionParams {
|
|
|
31
31
|
/** Optional AbortSignal to close the stream early. */
|
|
32
32
|
signal?: AbortSignal;
|
|
33
33
|
}
|
|
34
|
+
/**
|
|
35
|
+
* `client.executions.*` — read-only access to past workflow runs and
|
|
36
|
+
* a live SSE stream for in-flight ones. Workflow executions are
|
|
37
|
+
* created by the operator when a trigger fires (or by `workflows.trigger`
|
|
38
|
+
* for manual runs); this resource never creates them, only reads.
|
|
39
|
+
*/
|
|
34
40
|
export declare class ExecutionsResource {
|
|
35
41
|
private readonly transport;
|
|
36
42
|
constructor(transport: Transport);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executions.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/executions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MA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AM,CACX,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,qBAAqB,GAC5B,cAAc,CAAC,EAAE,CAAC,sBAAsB,EAAE,IAAI,EAAE,SAAS,CAAC;IAwC7D;;;;OAIG;IACG,eAAe,CACnB,EAAE,EAAE,MAAM,EACV,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,EAAE,CAAC,sBAAsB,CAAC;CAatC"}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.executions.*` — read-only access to past workflow runs and
|
|
3
|
+
* a live SSE stream for in-flight ones. Workflow executions are
|
|
4
|
+
* created by the operator when a trigger fires (or by `workflows.trigger`
|
|
5
|
+
* for manual runs); this resource never creates them, only reads.
|
|
6
|
+
*/
|
|
1
7
|
export class ExecutionsResource {
|
|
2
8
|
constructor(transport) {
|
|
3
9
|
this.transport = transport;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import type { v4 } from "@avaprotocol/types";
|
|
2
2
|
import { Transport } from "../internal/transport";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* `client.health.*` — gateway liveness + version probes.
|
|
5
|
+
*
|
|
6
|
+
* Anonymous (no Bearer token required) — safe to call from
|
|
7
|
+
* unauthenticated browser code or external monitors.
|
|
8
|
+
*/
|
|
4
9
|
export declare class HealthResource {
|
|
5
10
|
private readonly transport;
|
|
6
11
|
constructor(transport: Transport);
|
|
12
|
+
/**
|
|
13
|
+
* GET /health — returns `{ status, chainId, version }` when the
|
|
14
|
+
* gateway is up. Use for liveness checks; do not rely on it for
|
|
15
|
+
* deep readiness (it doesn't probe worker connectivity).
|
|
16
|
+
*/
|
|
7
17
|
check(): Promise<v4.HealthStatus>;
|
|
8
18
|
}
|
|
9
19
|
//# sourceMappingURL=health.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD
|
|
1
|
+
{"version":3,"file":"health.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/health.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;OAIG;IACH,KAAK,IAAI,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC;CAGlC"}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* `client.health.*` — gateway liveness + version probes.
|
|
3
|
+
*
|
|
4
|
+
* Anonymous (no Bearer token required) — safe to call from
|
|
5
|
+
* unauthenticated browser code or external monitors.
|
|
6
|
+
*/
|
|
2
7
|
export class HealthResource {
|
|
3
8
|
constructor(transport) {
|
|
4
9
|
this.transport = transport;
|
|
5
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* GET /health — returns `{ status, chainId, version }` when the
|
|
13
|
+
* gateway is up. Use for liveness checks; do not rely on it for
|
|
14
|
+
* deep readiness (it doesn't probe worker connectivity).
|
|
15
|
+
*/
|
|
6
16
|
check() {
|
|
7
17
|
return this.transport.request({ path: "/health" });
|
|
8
18
|
}
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import type { v4 } from "@avaprotocol/types";
|
|
2
2
|
import { Transport } from "../internal/transport";
|
|
3
|
+
/**
|
|
4
|
+
* `client.nodes.*` — execute a single node definition in isolation,
|
|
5
|
+
* without persisting a workflow. Used by the Studio UI's per-node
|
|
6
|
+
* "Run once" affordance and by SDK test suites that exercise a node
|
|
7
|
+
* shape against a live gateway.
|
|
8
|
+
*/
|
|
3
9
|
export declare class NodesResource {
|
|
4
10
|
private readonly transport;
|
|
5
11
|
constructor(transport: Transport);
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* POST /nodes:run — execute one node against inline `inputVariables`.
|
|
14
|
+
*
|
|
15
|
+
* The request shape mirrors a single entry from `workflows.simulate`:
|
|
16
|
+
* a complete node definition + the variables the node would have seen
|
|
17
|
+
* inside a workflow. The gateway runs the node in-process (no worker
|
|
18
|
+
* delegation, no persistence) and returns the raw output keyed by
|
|
19
|
+
* node type — `{ success, output: { <nodeType>: {...} } }`.
|
|
20
|
+
*
|
|
21
|
+
* Chain context: the gateway resolves the target chain in this order:
|
|
22
|
+
* `body.chainId` → `inputVariables.settings.chain_id` → the JWT's
|
|
23
|
+
* `aud` claim → the gateway's default chain. Specify `chainId`
|
|
24
|
+
* explicitly when calling a contract that lives on a non-default
|
|
25
|
+
* chain (e.g. a sepolia oracle when the gateway defaults to mainnet).
|
|
26
|
+
*/
|
|
7
27
|
run(req: v4.RunNodeRequest): Promise<v4.RunNodeResponse>;
|
|
8
28
|
}
|
|
9
29
|
//# sourceMappingURL=nodes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD
|
|
1
|
+
{"version":3,"file":"nodes.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;;;;;;;;;;OAcG;IACH,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,GAAG,OAAO,CAAC,EAAE,CAAC,eAAe,CAAC;CAOzD"}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.nodes.*` — execute a single node definition in isolation,
|
|
3
|
+
* without persisting a workflow. Used by the Studio UI's per-node
|
|
4
|
+
* "Run once" affordance and by SDK test suites that exercise a node
|
|
5
|
+
* shape against a live gateway.
|
|
6
|
+
*/
|
|
1
7
|
export class NodesResource {
|
|
2
8
|
constructor(transport) {
|
|
3
9
|
this.transport = transport;
|
|
4
10
|
}
|
|
5
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* POST /nodes:run — execute one node against inline `inputVariables`.
|
|
13
|
+
*
|
|
14
|
+
* The request shape mirrors a single entry from `workflows.simulate`:
|
|
15
|
+
* a complete node definition + the variables the node would have seen
|
|
16
|
+
* inside a workflow. The gateway runs the node in-process (no worker
|
|
17
|
+
* delegation, no persistence) and returns the raw output keyed by
|
|
18
|
+
* node type — `{ success, output: { <nodeType>: {...} } }`.
|
|
19
|
+
*
|
|
20
|
+
* Chain context: the gateway resolves the target chain in this order:
|
|
21
|
+
* `body.chainId` → `inputVariables.settings.chain_id` → the JWT's
|
|
22
|
+
* `aud` claim → the gateway's default chain. Specify `chainId`
|
|
23
|
+
* explicitly when calling a contract that lives on a non-default
|
|
24
|
+
* chain (e.g. a sepolia oracle when the gateway defaults to mainnet).
|
|
25
|
+
*/
|
|
6
26
|
run(req) {
|
|
7
27
|
return this.transport.request({
|
|
8
28
|
path: "/nodes:run",
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
import type { v4 } from "@avaprotocol/types";
|
|
2
2
|
import { Transport } from "../internal/transport";
|
|
3
|
+
/**
|
|
4
|
+
* `client.operators.*` — read-only view of the operator pool the
|
|
5
|
+
* gateway is currently dispatching to. Used by dashboards and the
|
|
6
|
+
* Studio sidebar's network-health widget; not part of the workflow
|
|
7
|
+
* lifecycle.
|
|
8
|
+
*/
|
|
3
9
|
export declare class OperatorsResource {
|
|
4
10
|
private readonly transport;
|
|
5
11
|
constructor(transport: Transport);
|
|
6
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* GET /operators — every operator currently connected to the
|
|
14
|
+
* gateway, plus their advertised capabilities (block / time /
|
|
15
|
+
* event monitoring) and the timestamp of their last heartbeat.
|
|
16
|
+
*
|
|
17
|
+
* An empty array means no operators are connected — workflows will
|
|
18
|
+
* still accept, but won't execute until at least one operator
|
|
19
|
+
* comes online.
|
|
20
|
+
*/
|
|
7
21
|
list(): Promise<v4.OperatorList>;
|
|
8
22
|
}
|
|
9
23
|
//# sourceMappingURL=operators.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/operators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD
|
|
1
|
+
{"version":3,"file":"operators.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/operators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,iBAAiB;IAChB,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;;;;OAQG;IACH,IAAI,IAAI,OAAO,CAAC,EAAE,CAAC,YAAY,CAAC;CAGjC"}
|
|
@@ -1,8 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.operators.*` — read-only view of the operator pool the
|
|
3
|
+
* gateway is currently dispatching to. Used by dashboards and the
|
|
4
|
+
* Studio sidebar's network-health widget; not part of the workflow
|
|
5
|
+
* lifecycle.
|
|
6
|
+
*/
|
|
1
7
|
export class OperatorsResource {
|
|
2
8
|
constructor(transport) {
|
|
3
9
|
this.transport = transport;
|
|
4
10
|
}
|
|
5
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* GET /operators — every operator currently connected to the
|
|
13
|
+
* gateway, plus their advertised capabilities (block / time /
|
|
14
|
+
* event monitoring) and the timestamp of their last heartbeat.
|
|
15
|
+
*
|
|
16
|
+
* An empty array means no operators are connected — workflows will
|
|
17
|
+
* still accept, but won't execute until at least one operator
|
|
18
|
+
* comes online.
|
|
19
|
+
*/
|
|
6
20
|
list() {
|
|
7
21
|
return this.transport.request({ path: "/operators" });
|
|
8
22
|
}
|
|
@@ -11,6 +11,16 @@ export interface DeleteSecretParams {
|
|
|
11
11
|
workflowId?: string;
|
|
12
12
|
orgId?: string;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* `client.secrets.*` — write-only secret store, scoped to the
|
|
16
|
+
* authenticated user. Values are referenced from workflow nodes via
|
|
17
|
+
* `{{secrets.NAME}}` template variables and are decrypted server-side
|
|
18
|
+
* at execution time; the SDK never receives the plaintext value back.
|
|
19
|
+
*
|
|
20
|
+
* `put` is a single idempotent endpoint replacing v3's create + update
|
|
21
|
+
* split — sending the same name twice rotates the value silently
|
|
22
|
+
* rather than erroring.
|
|
23
|
+
*/
|
|
14
24
|
export declare class SecretsResource {
|
|
15
25
|
private readonly transport;
|
|
16
26
|
constructor(transport: Transport);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secrets.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/secrets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAA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AM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;GASG;AACH,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD,2DAA2D;IAC3D,IAAI,CAAC,MAAM,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,EAAE,CAAC,UAAU,CAAC;IAOxD,0DAA0D;IAC1D,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE,CAAC,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3D,6BAA6B;IAC7B,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOjE"}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.secrets.*` — write-only secret store, scoped to the
|
|
3
|
+
* authenticated user. Values are referenced from workflow nodes via
|
|
4
|
+
* `{{secrets.NAME}}` template variables and are decrypted server-side
|
|
5
|
+
* at execution time; the SDK never receives the plaintext value back.
|
|
6
|
+
*
|
|
7
|
+
* `put` is a single idempotent endpoint replacing v3's create + update
|
|
8
|
+
* split — sending the same name twice rotates the value silently
|
|
9
|
+
* rather than erroring.
|
|
10
|
+
*/
|
|
1
11
|
export class SecretsResource {
|
|
2
12
|
constructor(transport) {
|
|
3
13
|
this.transport = transport;
|
|
@@ -1,13 +1,25 @@
|
|
|
1
1
|
import type { v4 } from "@avaprotocol/types";
|
|
2
2
|
import { Transport } from "../internal/transport";
|
|
3
|
+
/**
|
|
4
|
+
* `client.tokens.*` — ERC-20 metadata resolution backed by the
|
|
5
|
+
* aggregator's curated whitelist plus an on-chain `name/symbol/decimals`
|
|
6
|
+
* fallback. Used by the Studio token-picker, transfer-preview UI, and
|
|
7
|
+
* the notification cost-line renderer.
|
|
8
|
+
*/
|
|
3
9
|
export declare class TokensResource {
|
|
4
10
|
private readonly transport;
|
|
5
11
|
constructor(transport: Transport);
|
|
6
12
|
/**
|
|
7
|
-
* GET /tokens/{address} —
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
13
|
+
* GET /tokens/{address} — resolve a token by contract address.
|
|
14
|
+
*
|
|
15
|
+
* Returns `{ found: false, address }` (not 404) when the token
|
|
16
|
+
* isn't on the whitelist and the on-chain probe also fails — the
|
|
17
|
+
* partial response keeps the caller's UI from breaking on
|
|
18
|
+
* unrecognized tokens.
|
|
19
|
+
*
|
|
20
|
+
* `opts.chainId` picks which chain's whitelist + RPC to consult.
|
|
21
|
+
* Omit it to fall back to the JWT's `aud` chain (the gateway's
|
|
22
|
+
* default chain context for the authenticated user).
|
|
11
23
|
*/
|
|
12
24
|
retrieve(address: string, opts?: {
|
|
13
25
|
chainId?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;GAKG;AACH,qBAAa,cAAc;IACb,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,EAAE,CAAC,qBAAqB,CAAC;CAM1F"}
|
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.tokens.*` — ERC-20 metadata resolution backed by the
|
|
3
|
+
* aggregator's curated whitelist plus an on-chain `name/symbol/decimals`
|
|
4
|
+
* fallback. Used by the Studio token-picker, transfer-preview UI, and
|
|
5
|
+
* the notification cost-line renderer.
|
|
6
|
+
*/
|
|
1
7
|
export class TokensResource {
|
|
2
8
|
constructor(transport) {
|
|
3
9
|
this.transport = transport;
|
|
4
10
|
}
|
|
5
11
|
/**
|
|
6
|
-
* GET /tokens/{address} —
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
12
|
+
* GET /tokens/{address} — resolve a token by contract address.
|
|
13
|
+
*
|
|
14
|
+
* Returns `{ found: false, address }` (not 404) when the token
|
|
15
|
+
* isn't on the whitelist and the on-chain probe also fails — the
|
|
16
|
+
* partial response keeps the caller's UI from breaking on
|
|
17
|
+
* unrecognized tokens.
|
|
18
|
+
*
|
|
19
|
+
* `opts.chainId` picks which chain's whitelist + RPC to consult.
|
|
20
|
+
* Omit it to fall back to the JWT's `aud` chain (the gateway's
|
|
21
|
+
* default chain context for the authenticated user).
|
|
10
22
|
*/
|
|
11
23
|
retrieve(address, opts) {
|
|
12
24
|
return this.transport.request({
|
|
@@ -1,9 +1,29 @@
|
|
|
1
1
|
import type { v4 } from "@avaprotocol/types";
|
|
2
2
|
import { Transport } from "../internal/transport";
|
|
3
|
+
/**
|
|
4
|
+
* `client.triggers.*` — evaluate a trigger config in isolation,
|
|
5
|
+
* mirroring the per-node `nodes.run` shape. Use when designing or
|
|
6
|
+
* debugging a trigger before wiring it into a full workflow — e.g.
|
|
7
|
+
* confirming that an `eventTrigger` topic filter matches a known
|
|
8
|
+
* historical event, or that a cron expression parses.
|
|
9
|
+
*/
|
|
3
10
|
export declare class TriggersResource {
|
|
4
11
|
private readonly transport;
|
|
5
12
|
constructor(transport: Transport);
|
|
6
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* POST /triggers:run — evaluate a trigger config against inline
|
|
15
|
+
* input and return the same shape an executor would see.
|
|
16
|
+
*
|
|
17
|
+
* For event triggers, the gateway uses Tenderly to simulate a
|
|
18
|
+
* matching event log against the request's `addresses` + `topics`
|
|
19
|
+
* filter, then returns the decoded log under `output.data` and
|
|
20
|
+
* the raw log under `output.metadata`.
|
|
21
|
+
*
|
|
22
|
+
* For time-based triggers (cron, fixedTime, block), the response
|
|
23
|
+
* carries the next scheduled fire time / block height.
|
|
24
|
+
*
|
|
25
|
+
* No workflow record is created and no execution is persisted.
|
|
26
|
+
*/
|
|
7
27
|
run(req: v4.RunTriggerRequest): Promise<v4.RunTriggerResponse>;
|
|
8
28
|
}
|
|
9
29
|
//# sourceMappingURL=triggers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD
|
|
1
|
+
{"version":3,"file":"triggers.d.ts","sourceRoot":"","sources":["../../../src/v4/resources/triggers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAE7C,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;GAMG;AACH,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,SAAS;gBAAT,SAAS,EAAE,SAAS;IAEjD;;;;;;;;;;;;;OAaG;IACH,GAAG,CAAC,GAAG,EAAE,EAAE,CAAC,iBAAiB,GAAG,OAAO,CAAC,EAAE,CAAC,kBAAkB,CAAC;CAO/D"}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `client.triggers.*` — evaluate a trigger config in isolation,
|
|
3
|
+
* mirroring the per-node `nodes.run` shape. Use when designing or
|
|
4
|
+
* debugging a trigger before wiring it into a full workflow — e.g.
|
|
5
|
+
* confirming that an `eventTrigger` topic filter matches a known
|
|
6
|
+
* historical event, or that a cron expression parses.
|
|
7
|
+
*/
|
|
1
8
|
export class TriggersResource {
|
|
2
9
|
constructor(transport) {
|
|
3
10
|
this.transport = transport;
|
|
4
11
|
}
|
|
5
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* POST /triggers:run — evaluate a trigger config against inline
|
|
14
|
+
* input and return the same shape an executor would see.
|
|
15
|
+
*
|
|
16
|
+
* For event triggers, the gateway uses Tenderly to simulate a
|
|
17
|
+
* matching event log against the request's `addresses` + `topics`
|
|
18
|
+
* filter, then returns the decoded log under `output.data` and
|
|
19
|
+
* the raw log under `output.metadata`.
|
|
20
|
+
*
|
|
21
|
+
* For time-based triggers (cron, fixedTime, block), the response
|
|
22
|
+
* carries the next scheduled fire time / block height.
|
|
23
|
+
*
|
|
24
|
+
* No workflow record is created and no execution is persisted.
|
|
25
|
+
*/
|
|
6
26
|
run(req) {
|
|
7
27
|
return this.transport.request({
|
|
8
28
|
path: "/triggers:run",
|