@orca-so/whirlpools-automation 0.1.3 → 0.3.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/CHANGELOG.md +13 -0
- package/dist/index.browser.js +1865 -1442
- package/dist/index.d.ts +2 -0
- package/dist/index.node.js +1854 -1436
- package/dist/pda.d.ts +8 -0
- package/dist/staging.d.ts +3 -0
- package/package.json +2 -1
package/dist/index.node.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
function
|
|
3
|
-
return Array.isArray(e) ? "%5B" + e.map(
|
|
1
|
+
var zn = 1, Hn = 2, Wn = 3, $n = 4, Xn = 5, Yn = 6, Kn = 7, jn = 8, Jn = 9, Zn = 10, qn = -32700, Qn = -32603, er = -32602, tr = -32601, nr = -32600, rr = -32016, or = -32015, ar = -32014, ir = -32013, sr = -32012, _r = -32011, cr = -32010, ur = -32009, Rr = -32008, Ar = -32007, dr = -32006, lr = -32005, Or = -32004, Er = -32003, Nr = -32002, Tr = -32001, je = 28e5, Je = 2800001, fr = 2800002, Sr = 2800003, Ir = 2800004, gr = 2800005, Ze = 2800006, qe = 2800007, he = 2800008, Qe = 2800009, mr = 2800010, Cr = 2800011, et = 323e4, tt = 32300001, nt = 3230002, hr = 3230003, vr = 3230004, Lr = 361e4, rt = 3610001, pr = 3610002, Dr = 3610003, br = 3610004, Pr = 3610005, Ur = 3610006, wr = 3610007, Mr = 3611e3, yr = 3704e3, xr = 3704001, kr = 3704002, Br = 3704003, Gr = 3704004, ot = 4128e3, Vr = 4128001, Fr = 4128002, zr = 4615e3, Hr = 4615001, Wr = 4615002, $r = 4615003, Xr = 4615004, Yr = 4615005, Kr = 4615006, jr = 4615007, Jr = 4615008, Zr = 4615009, qr = 4615010, Qr = 4615011, eo = 4615012, to = 4615013, no = 4615014, ro = 4615015, oo = 4615016, ao = 4615017, io = 4615018, so = 4615019, _o = 4615020, co = 4615021, uo = 4615022, Ro = 4615023, Ao = 4615024, lo = 4615025, at = 4615026, Oo = 4615027, Eo = 4615028, No = 4615029, To = 4615030, fo = 4615031, So = 4615032, Io = 4615033, go = 4615034, mo = 4615035, Co = 4615036, ho = 4615037, vo = 4615038, Lo = 4615039, po = 4615040, Do = 4615041, bo = 4615042, Po = 4615043, Uo = 4615044, wo = 4615045, Mo = 4615046, yo = 4615047, xo = 4615048, ko = 4615049, Bo = 4615050, Go = 4615051, Vo = 4615052, Fo = 4615053, zo = 4615054, Ho = 5508e3, Wo = 5508001, $o = 5508002, Xo = 5508003, Yo = 5508004, Ko = 5508005, jo = 5508006, Jo = 5508007, Zo = 5508008, qo = 5508009, Qo = 5508010, ea = 5508011, ta = 5663e3, na = 5663001, ra = 5663002, oa = 5663003, aa = 5663004, ia = 5663005, sa = 5663006, _a = 5663007, ca = 5663008, ua = 5663009, Ra = 5663010, Aa = 5663011, da = 5663012, la = 5663013, Oa = 5663014, Ea = 5663015, Na = 5663016, Ta = 5663017, fa = 5663018, Sa = 5663019, Ia = 5663020, ga = 705e4, ma = 7050001, Ca = 7050002, ha = 7050003, va = 7050004, La = 7050005, pa = 7050006, Da = 7050007, ba = 7050008, Pa = 7050009, Ua = 7050010, wa = 7050011, Ma = 7050012, ya = 7050013, xa = 7050014, ka = 7050015, Ba = 7050016, Ga = 7050017, Va = 7050018, Fa = 7050019, za = 7050020, Ha = 7050021, Wa = 7050022, $a = 7050023, Xa = 7050024, Ya = 7050025, Ka = 7050026, ja = 7050027, Ja = 7050028, Za = 7050029, qa = 7050030, Qa = 7050031, ei = 7050032, ti = 7050033, ni = 7050034, ri = 7050035, oi = 7050036, it = 8078e3, st = 8078001, _t = 8078002, ai = 8078003, ct = 8078004, ut = 8078005, Rt = 8078006, At = 8078007, dt = 8078008, lt = 8078009, Ot = 8078010, Et = 8078011, _e = 8078012, ii = 8078013, si = 8078014, _i = 8078015, ci = 8078016, Nt = 8078017, Tt = 8078018, ui = 8078019, Ri = 8078020, Ai = 8078021, ve = 8078022, di = 81e5, li = 8100001, Oi = 8100002, Ei = 8100003, Ni = 819e4, Ti = 8190001, fi = 8190002, Si = 8190003, Ii = 8190004, gi = 99e5, mi = 9900001, Ci = 9900002, hi = 9900003, vi = 9900004;
|
|
2
|
+
function ft(e) {
|
|
3
|
+
return Array.isArray(e) ? "%5B" + e.map(ft).join(
|
|
4
4
|
"%2C%20"
|
|
5
5
|
/* ", " */
|
|
6
6
|
) + /* "]" */
|
|
@@ -14,323 +14,323 @@ function Ke(e) {
|
|
|
14
14
|
)
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
return `${e}=${
|
|
17
|
+
function Li([e, t]) {
|
|
18
|
+
return `${e}=${ft(t)}`;
|
|
19
19
|
}
|
|
20
|
-
function
|
|
21
|
-
const t = Object.entries(e).map(
|
|
20
|
+
function pi(e) {
|
|
21
|
+
const t = Object.entries(e).map(Li).join("&");
|
|
22
22
|
return btoa(t);
|
|
23
23
|
}
|
|
24
|
-
var
|
|
25
|
-
[
|
|
26
|
-
[
|
|
27
|
-
[
|
|
28
|
-
[
|
|
29
|
-
[
|
|
30
|
-
[
|
|
31
|
-
[
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
[
|
|
36
|
-
[
|
|
37
|
-
[
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
44
|
-
[
|
|
45
|
-
[
|
|
46
|
-
[
|
|
47
|
-
[
|
|
48
|
-
[
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
[
|
|
61
|
-
[
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
67
|
-
[
|
|
68
|
-
[
|
|
69
|
-
[
|
|
70
|
-
[
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
81
|
-
[
|
|
82
|
-
[
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
86
|
-
[
|
|
87
|
-
[
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
91
|
-
[
|
|
92
|
-
[
|
|
93
|
-
[
|
|
94
|
-
[
|
|
95
|
-
[
|
|
96
|
-
[
|
|
97
|
-
[
|
|
98
|
-
[
|
|
99
|
-
[
|
|
100
|
-
[
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
105
|
-
[
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
[
|
|
109
|
-
[
|
|
110
|
-
[
|
|
111
|
-
[
|
|
112
|
-
[
|
|
113
|
-
[
|
|
114
|
-
[
|
|
115
|
-
[
|
|
116
|
-
[
|
|
117
|
-
[
|
|
118
|
-
[
|
|
119
|
-
[
|
|
120
|
-
[
|
|
121
|
-
[
|
|
122
|
-
[
|
|
123
|
-
[
|
|
124
|
-
[
|
|
125
|
-
[
|
|
126
|
-
[
|
|
127
|
-
[
|
|
128
|
-
[
|
|
129
|
-
[
|
|
130
|
-
[
|
|
131
|
-
[
|
|
132
|
-
[
|
|
133
|
-
[
|
|
134
|
-
[
|
|
135
|
-
[
|
|
136
|
-
[
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
154
|
-
[
|
|
155
|
-
[
|
|
156
|
-
[
|
|
157
|
-
[
|
|
158
|
-
[
|
|
159
|
-
[
|
|
160
|
-
[
|
|
161
|
-
[
|
|
162
|
-
[
|
|
163
|
-
[
|
|
164
|
-
[
|
|
165
|
-
[
|
|
166
|
-
[
|
|
167
|
-
[
|
|
168
|
-
[
|
|
169
|
-
[
|
|
170
|
-
[
|
|
171
|
-
[
|
|
172
|
-
[
|
|
173
|
-
[
|
|
174
|
-
[
|
|
175
|
-
[
|
|
176
|
-
[
|
|
177
|
-
[
|
|
178
|
-
[
|
|
179
|
-
[
|
|
180
|
-
[
|
|
181
|
-
[
|
|
182
|
-
[
|
|
183
|
-
[
|
|
184
|
-
[
|
|
185
|
-
[
|
|
186
|
-
[
|
|
187
|
-
[
|
|
188
|
-
[
|
|
24
|
+
var Di = {
|
|
25
|
+
[et]: "Account not found at address: $address",
|
|
26
|
+
[vr]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
|
|
27
|
+
[hr]: "Expected decoded account at address: $address",
|
|
28
|
+
[nt]: "Failed to decode account data at address: $address",
|
|
29
|
+
[tt]: "Accounts not found at addresses: $addresses",
|
|
30
|
+
[Qe]: "Unable to find a viable program address bump seed.",
|
|
31
|
+
[fr]: "$putativeAddress is not a base58-encoded address.",
|
|
32
|
+
[je]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
33
|
+
[Sr]: "The `CryptoKey` must be an `Ed25519` public key.",
|
|
34
|
+
[Cr]: "$putativeOffCurveAddress is not a base58-encoded off-curve address.",
|
|
35
|
+
[he]: "Invalid seeds; point must fall off the Ed25519 curve.",
|
|
36
|
+
[Ir]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
|
|
37
|
+
[Ze]: "A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",
|
|
38
|
+
[qe]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
|
|
39
|
+
[gr]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
|
|
40
|
+
[mr]: "Program address cannot end with PDA marker.",
|
|
41
|
+
[Je]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
42
|
+
[$n]: "Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.",
|
|
43
|
+
[zn]: "The network has progressed past the last block for which this transaction could have been committed.",
|
|
44
|
+
[it]: "Codec [$codecDescription] cannot decode empty byte arrays.",
|
|
45
|
+
[ve]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
|
|
46
|
+
[Ri]: "Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",
|
|
47
|
+
[ut]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
|
|
48
|
+
[Rt]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
|
|
49
|
+
[ct]: "Encoder and decoder must either both be fixed-size or variable-size.",
|
|
50
|
+
[dt]: "Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",
|
|
51
|
+
[_t]: "Expected a fixed-size codec, got a variable-size one.",
|
|
52
|
+
[ii]: "Codec [$codecDescription] expected a positive byte length, got $bytesLength.",
|
|
53
|
+
[ai]: "Expected a variable-size codec, got a fixed-size one.",
|
|
54
|
+
[ui]: "Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",
|
|
55
|
+
[st]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
|
|
56
|
+
[Tt]: "Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",
|
|
57
|
+
[lt]: "Invalid discriminated union variant. Expected one of [$variants], got $value.",
|
|
58
|
+
[Ot]: "Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",
|
|
59
|
+
[_i]: "Invalid literal union variant. Expected one of [$variants], got $value.",
|
|
60
|
+
[At]: "Expected [$codecDescription] to have $expected items, got $actual.",
|
|
61
|
+
[_e]: "Invalid value $value for base $base with alphabet $alphabet.",
|
|
62
|
+
[ci]: "Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",
|
|
63
|
+
[Et]: "Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",
|
|
64
|
+
[si]: "Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",
|
|
65
|
+
[Ai]: "Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",
|
|
66
|
+
[Nt]: "Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",
|
|
67
|
+
[Mr]: "No random values implementation could be found.",
|
|
68
|
+
[Zr]: "instruction requires an uninitialized account",
|
|
69
|
+
[Ro]: "instruction tries to borrow reference for an account which is already borrowed",
|
|
70
|
+
[Ao]: "instruction left account with an outstanding borrowed reference",
|
|
71
|
+
[co]: "program other than the account's owner changed the size of the account data",
|
|
72
|
+
[Yr]: "account data too small for instruction",
|
|
73
|
+
[uo]: "instruction expected an executable account",
|
|
74
|
+
[Mo]: "An account does not have enough lamports to be rent-exempt",
|
|
75
|
+
[xo]: "Program arithmetic overflowed",
|
|
76
|
+
[wo]: "Failed to serialize or deserialize account data: $encodedData",
|
|
77
|
+
[zo]: "Builtin programs must consume compute units",
|
|
78
|
+
[So]: "Cross-program invocation call depth too deep",
|
|
79
|
+
[vo]: "Computational budget exceeded",
|
|
80
|
+
[at]: "custom program error: #$code",
|
|
81
|
+
[ao]: "instruction contains duplicate accounts",
|
|
82
|
+
[lo]: "instruction modifications of multiply-passed account differ",
|
|
83
|
+
[To]: "executable accounts must be rent exempt",
|
|
84
|
+
[Eo]: "instruction changed executable accounts data",
|
|
85
|
+
[No]: "instruction changed the balance of an executable account",
|
|
86
|
+
[io]: "instruction changed executable bit of an account",
|
|
87
|
+
[no]: "instruction modified data of an account it does not own",
|
|
88
|
+
[to]: "instruction spent from the balance of an account it does not own",
|
|
89
|
+
[Hr]: "generic instruction error",
|
|
90
|
+
[Bo]: "Provided owner is not allowed",
|
|
91
|
+
[Po]: "Account is immutable",
|
|
92
|
+
[Uo]: "Incorrect authority provided",
|
|
93
|
+
[jr]: "incorrect program id for instruction",
|
|
94
|
+
[Kr]: "insufficient funds for instruction",
|
|
95
|
+
[Xr]: "invalid account data for instruction",
|
|
96
|
+
[yo]: "Invalid account owner",
|
|
97
|
+
[Wr]: "invalid program argument",
|
|
98
|
+
[Oo]: "program returned invalid error code",
|
|
99
|
+
[$r]: "invalid instruction data",
|
|
100
|
+
[ho]: "Failed to reallocate account data",
|
|
101
|
+
[Co]: "Provided seeds do not result in a valid address",
|
|
102
|
+
[Go]: "Accounts data allocations exceeded the maximum allowed per transaction",
|
|
103
|
+
[Vo]: "Max accounts exceeded",
|
|
104
|
+
[Fo]: "Max instruction trace length exceeded",
|
|
105
|
+
[mo]: "Length of the seed is too long for address generation",
|
|
106
|
+
[Io]: "An account required by the instruction is missing",
|
|
107
|
+
[Jr]: "missing required signature for instruction",
|
|
108
|
+
[eo]: "instruction illegally modified the program id of an account",
|
|
109
|
+
[_o]: "insufficient account keys for instruction",
|
|
110
|
+
[Lo]: "Cross-program invocation with unauthorized signer or writable account",
|
|
111
|
+
[po]: "Failed to create program execution environment",
|
|
112
|
+
[bo]: "Program failed to compile",
|
|
113
|
+
[Do]: "Program failed to complete",
|
|
114
|
+
[oo]: "instruction modified data of a read-only account",
|
|
115
|
+
[ro]: "instruction changed the balance of a read-only account",
|
|
116
|
+
[go]: "Cross-program invocation reentrancy not allowed for this instruction",
|
|
117
|
+
[so]: "instruction modified rent epoch of an account",
|
|
118
|
+
[Qr]: "sum of account balances before and after instruction do not match",
|
|
119
|
+
[qr]: "instruction requires an initialized account",
|
|
120
|
+
[zr]: "",
|
|
121
|
+
[fo]: "Unsupported program id",
|
|
122
|
+
[ko]: "Unsupported sysvar",
|
|
123
|
+
[ot]: "The instruction does not have any accounts.",
|
|
124
|
+
[Vr]: "The instruction does not have any data.",
|
|
125
|
+
[Fr]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
|
|
126
|
+
[Xn]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
|
|
127
|
+
[Hn]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
|
|
128
|
+
[Ci]: "Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
129
|
+
[vi]: "Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",
|
|
130
|
+
[mi]: "Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
131
|
+
[gi]: "Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
132
|
+
[hi]: "Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
|
|
133
|
+
[Qn]: "JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",
|
|
134
|
+
[er]: "JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",
|
|
135
|
+
[nr]: "JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",
|
|
136
|
+
[tr]: "JSON-RPC error: The method does not exist / is not available ($__serverMessage)",
|
|
137
|
+
[qn]: "JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",
|
|
138
|
+
[sr]: "$__serverMessage",
|
|
139
|
+
[Tr]: "$__serverMessage",
|
|
140
|
+
[Or]: "$__serverMessage",
|
|
141
|
+
[ar]: "$__serverMessage",
|
|
142
|
+
[cr]: "$__serverMessage",
|
|
143
|
+
[ur]: "$__serverMessage",
|
|
144
|
+
[rr]: "Minimum context slot has not been reached",
|
|
145
|
+
[lr]: "Node is unhealthy; behind by $numSlotsBehind slots",
|
|
146
|
+
[Rr]: "No snapshot",
|
|
147
|
+
[Nr]: "Transaction simulation failed",
|
|
148
|
+
[Ar]: "$__serverMessage",
|
|
149
|
+
[_r]: "Transaction history is not available from this node",
|
|
150
|
+
[dr]: "$__serverMessage",
|
|
151
|
+
[ir]: "Transaction signature length mismatch",
|
|
152
|
+
[Er]: "Transaction signature verification failure",
|
|
153
|
+
[or]: "$__serverMessage",
|
|
154
|
+
[yr]: "Key pair bytes must be of length 64, got $byteLength.",
|
|
155
|
+
[xr]: "Expected private key bytes with length 32. Actual length: $actualLength.",
|
|
156
|
+
[kr]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
|
|
157
|
+
[Gr]: "The provided private key does not match the provided public key.",
|
|
158
|
+
[Br]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
|
|
159
|
+
[Yn]: "Lamports value must be in the range [0, 2e64-1]",
|
|
160
|
+
[Kn]: "`$value` cannot be parsed as a `BigInt`",
|
|
161
|
+
[Zn]: "$message",
|
|
162
|
+
[jn]: "`$value` cannot be parsed as a `Number`",
|
|
163
|
+
[Wn]: "No nonce account could be found at address `$nonceAccountAddress`",
|
|
164
|
+
[Ni]: "The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",
|
|
165
|
+
[fi]: "WebSocket was closed before payload could be added to the send buffer",
|
|
166
|
+
[Si]: "WebSocket connection closed",
|
|
167
|
+
[Ii]: "WebSocket failed to connect",
|
|
168
|
+
[Ti]: "Failed to obtain a subscription id from the server",
|
|
169
|
+
[Ei]: "Could not find an API plan for RPC method: `$method`",
|
|
170
|
+
[di]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
|
|
171
|
+
[Oi]: "HTTP error ($statusCode): $message",
|
|
172
|
+
[li]: "HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",
|
|
173
|
+
[Ho]: "Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",
|
|
174
|
+
[Wo]: "The provided value does not implement the `KeyPairSigner` interface",
|
|
175
|
+
[Xo]: "The provided value does not implement the `MessageModifyingSigner` interface",
|
|
176
|
+
[Yo]: "The provided value does not implement the `MessagePartialSigner` interface",
|
|
177
|
+
[$o]: "The provided value does not implement any of the `MessageSigner` interfaces",
|
|
178
|
+
[jo]: "The provided value does not implement the `TransactionModifyingSigner` interface",
|
|
179
|
+
[Jo]: "The provided value does not implement the `TransactionPartialSigner` interface",
|
|
180
|
+
[Zo]: "The provided value does not implement the `TransactionSendingSigner` interface",
|
|
181
|
+
[Ko]: "The provided value does not implement any of the `TransactionSigner` interfaces",
|
|
182
|
+
[qo]: "More than one `TransactionSendingSigner` was identified.",
|
|
183
|
+
[Qo]: "No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",
|
|
184
|
+
[ea]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
|
|
185
|
+
[wr]: "Cannot export a non-extractable key.",
|
|
186
|
+
[rt]: "No digest implementation could be found.",
|
|
187
|
+
[Lr]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
|
|
188
|
+
[pr]: `This runtime does not support the generation of Ed25519 key pairs.
|
|
189
189
|
|
|
190
190
|
Install @solana/webcrypto-ed25519-polyfill and call its \`install\` function before generating keys in environments that do not support Ed25519.
|
|
191
191
|
|
|
192
192
|
For a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.`,
|
|
193
|
-
[
|
|
194
|
-
[
|
|
195
|
-
[
|
|
196
|
-
[
|
|
197
|
-
[
|
|
198
|
-
[
|
|
199
|
-
[
|
|
200
|
-
[
|
|
201
|
-
[
|
|
202
|
-
[
|
|
203
|
-
[
|
|
204
|
-
[
|
|
205
|
-
[
|
|
206
|
-
[
|
|
207
|
-
[
|
|
208
|
-
[
|
|
209
|
-
[
|
|
210
|
-
[
|
|
211
|
-
[
|
|
212
|
-
[
|
|
213
|
-
[
|
|
214
|
-
[
|
|
215
|
-
[
|
|
216
|
-
[
|
|
217
|
-
[
|
|
218
|
-
[
|
|
219
|
-
[
|
|
220
|
-
[
|
|
221
|
-
[
|
|
222
|
-
[
|
|
223
|
-
[
|
|
224
|
-
[
|
|
225
|
-
[
|
|
226
|
-
[
|
|
227
|
-
[
|
|
228
|
-
[
|
|
229
|
-
[
|
|
230
|
-
[
|
|
231
|
-
[
|
|
232
|
-
[
|
|
233
|
-
[
|
|
234
|
-
[
|
|
235
|
-
[
|
|
236
|
-
[
|
|
237
|
-
[
|
|
238
|
-
[
|
|
239
|
-
[
|
|
240
|
-
[
|
|
241
|
-
[
|
|
242
|
-
[
|
|
243
|
-
[
|
|
244
|
-
[
|
|
245
|
-
[
|
|
246
|
-
[
|
|
247
|
-
[
|
|
248
|
-
[
|
|
249
|
-
[
|
|
250
|
-
[
|
|
251
|
-
[
|
|
252
|
-
[
|
|
253
|
-
[
|
|
254
|
-
[
|
|
255
|
-
[
|
|
256
|
-
},
|
|
257
|
-
function
|
|
258
|
-
const n =
|
|
193
|
+
[Dr]: "No signature verification implementation could be found.",
|
|
194
|
+
[br]: "No key generation implementation could be found.",
|
|
195
|
+
[Pr]: "No signing implementation could be found.",
|
|
196
|
+
[Ur]: "No key export implementation could be found.",
|
|
197
|
+
[Jn]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
|
|
198
|
+
[Ba]: "Transaction processing left an account with an outstanding borrowed reference",
|
|
199
|
+
[ma]: "Account in use",
|
|
200
|
+
[Ca]: "Account loaded twice",
|
|
201
|
+
[ha]: "Attempt to debit an account but found no record of a prior credit.",
|
|
202
|
+
[$a]: "Transaction loads an address table account that doesn't exist",
|
|
203
|
+
[Da]: "This transaction has already been processed",
|
|
204
|
+
[ba]: "Blockhash not found",
|
|
205
|
+
[Pa]: "Loader call chain is too deep",
|
|
206
|
+
[ka]: "Transactions are currently disabled due to cluster maintenance",
|
|
207
|
+
[qa]: "Transaction contains a duplicate instruction ($index) that is not allowed",
|
|
208
|
+
[La]: "Insufficient funds for fee",
|
|
209
|
+
[Qa]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
|
|
210
|
+
[pa]: "This account may not be used to pay transaction fees",
|
|
211
|
+
[wa]: "Transaction contains an invalid account reference",
|
|
212
|
+
[Ya]: "Transaction loads an address table account with invalid data",
|
|
213
|
+
[Ka]: "Transaction address table lookup uses an invalid index",
|
|
214
|
+
[Xa]: "Transaction loads an address table account with an invalid owner",
|
|
215
|
+
[ti]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
|
|
216
|
+
[ya]: "This program may not be used for executing instructions",
|
|
217
|
+
[ja]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
|
|
218
|
+
[Fa]: "Transaction loads a writable account that cannot be written",
|
|
219
|
+
[ei]: "Transaction exceeded max loaded accounts data size cap",
|
|
220
|
+
[Ua]: "Transaction requires a fee but has no signature present",
|
|
221
|
+
[va]: "Attempt to load a program that does not exist",
|
|
222
|
+
[ri]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
|
|
223
|
+
[ni]: "ResanitizationNeeded",
|
|
224
|
+
[xa]: "Transaction failed to sanitize accounts offsets correctly",
|
|
225
|
+
[Ma]: "Transaction did not pass signature verification",
|
|
226
|
+
[Wa]: "Transaction locked too many accounts",
|
|
227
|
+
[oi]: "Sum of account balances before and after transaction do not match",
|
|
228
|
+
[ga]: "The transaction failed with the error `$errorName`",
|
|
229
|
+
[Va]: "Transaction version is unsupported",
|
|
230
|
+
[Ha]: "Transaction would exceed account data limit within the block",
|
|
231
|
+
[Za]: "Transaction would exceed total account data limit",
|
|
232
|
+
[za]: "Transaction would exceed max account limit within the block",
|
|
233
|
+
[Ga]: "Transaction would exceed max Block Cost Limit",
|
|
234
|
+
[Ja]: "Transaction would exceed max Vote Cost Limit",
|
|
235
|
+
[Ea]: "Attempted to sign a transaction with an address that is not a signer for it",
|
|
236
|
+
[Ra]: "Transaction is missing an address at index: $index.",
|
|
237
|
+
[Na]: "Transaction has no expected signers therefore it cannot be encoded",
|
|
238
|
+
[Ia]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
|
|
239
|
+
[ra]: "Transaction does not have a blockhash lifetime",
|
|
240
|
+
[oa]: "Transaction is not a durable nonce transaction",
|
|
241
|
+
[ia]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
|
|
242
|
+
[sa]: "Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",
|
|
243
|
+
[ca]: "No fee payer set in CompiledTransaction",
|
|
244
|
+
[_a]: "Could not find program address at index $index",
|
|
245
|
+
[fa]: "Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",
|
|
246
|
+
[Sa]: "Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
|
|
247
|
+
[Aa]: "Transaction is missing a fee payer.",
|
|
248
|
+
[da]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",
|
|
249
|
+
[Oa]: "Transaction first instruction is not advance nonce account instruction.",
|
|
250
|
+
[la]: "Transaction with no instructions cannot be durable nonce transaction.",
|
|
251
|
+
[ta]: "This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",
|
|
252
|
+
[na]: "This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",
|
|
253
|
+
[Ta]: "The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.",
|
|
254
|
+
[ua]: "Transaction is missing signatures for addresses: $addresses.",
|
|
255
|
+
[aa]: "Transaction version must be in the range [0, 127]. `$actualVersion` given"
|
|
256
|
+
}, z = "i", x = "t";
|
|
257
|
+
function bi(e, t = {}) {
|
|
258
|
+
const n = Di[e];
|
|
259
259
|
if (n.length === 0)
|
|
260
260
|
return "";
|
|
261
261
|
let o;
|
|
262
262
|
function r(i) {
|
|
263
|
-
if (o[
|
|
264
|
-
const
|
|
263
|
+
if (o[x] === 2) {
|
|
264
|
+
const s = n.slice(o[z] + 1, i);
|
|
265
265
|
a.push(
|
|
266
|
-
|
|
266
|
+
s in t ? (
|
|
267
267
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
268
|
-
`${t[
|
|
269
|
-
) : `$${
|
|
268
|
+
`${t[s]}`
|
|
269
|
+
) : `$${s}`
|
|
270
270
|
);
|
|
271
|
-
} else o[
|
|
271
|
+
} else o[x] === 1 && a.push(n.slice(o[z], i));
|
|
272
272
|
}
|
|
273
273
|
const a = [];
|
|
274
|
-
return n.split("").forEach((i,
|
|
275
|
-
if (
|
|
274
|
+
return n.split("").forEach((i, s) => {
|
|
275
|
+
if (s === 0) {
|
|
276
276
|
o = {
|
|
277
|
-
[
|
|
278
|
-
[
|
|
277
|
+
[z]: 0,
|
|
278
|
+
[x]: n[0] === "\\" ? 0 : n[0] === "$" ? 2 : 1
|
|
279
279
|
/* Text */
|
|
280
280
|
};
|
|
281
281
|
return;
|
|
282
282
|
}
|
|
283
|
-
let
|
|
284
|
-
switch (o[
|
|
283
|
+
let _;
|
|
284
|
+
switch (o[x]) {
|
|
285
285
|
case 0:
|
|
286
|
-
|
|
287
|
-
[
|
|
288
|
-
[
|
|
286
|
+
_ = {
|
|
287
|
+
[z]: s,
|
|
288
|
+
[x]: 1
|
|
289
289
|
/* Text */
|
|
290
290
|
};
|
|
291
291
|
break;
|
|
292
292
|
case 1:
|
|
293
|
-
i === "\\" ?
|
|
294
|
-
[
|
|
295
|
-
[
|
|
293
|
+
i === "\\" ? _ = {
|
|
294
|
+
[z]: s,
|
|
295
|
+
[x]: 0
|
|
296
296
|
/* EscapeSequence */
|
|
297
|
-
} : i === "$" && (
|
|
298
|
-
[
|
|
299
|
-
[
|
|
297
|
+
} : i === "$" && (_ = {
|
|
298
|
+
[z]: s,
|
|
299
|
+
[x]: 2
|
|
300
300
|
/* Variable */
|
|
301
301
|
});
|
|
302
302
|
break;
|
|
303
303
|
case 2:
|
|
304
|
-
i === "\\" ?
|
|
305
|
-
[
|
|
306
|
-
[
|
|
304
|
+
i === "\\" ? _ = {
|
|
305
|
+
[z]: s,
|
|
306
|
+
[x]: 0
|
|
307
307
|
/* EscapeSequence */
|
|
308
|
-
} : i === "$" ?
|
|
309
|
-
[
|
|
310
|
-
[
|
|
308
|
+
} : i === "$" ? _ = {
|
|
309
|
+
[z]: s,
|
|
310
|
+
[x]: 2
|
|
311
311
|
/* Variable */
|
|
312
|
-
} : i.match(/\w/) || (
|
|
313
|
-
[
|
|
314
|
-
[
|
|
312
|
+
} : i.match(/\w/) || (_ = {
|
|
313
|
+
[z]: s,
|
|
314
|
+
[x]: 1
|
|
315
315
|
/* Text */
|
|
316
316
|
});
|
|
317
317
|
break;
|
|
318
318
|
}
|
|
319
|
-
|
|
319
|
+
_ && (o !== _ && r(s), o = _);
|
|
320
320
|
}), r(), a.join("");
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Pi(e, t = {}) {
|
|
323
323
|
if (process.env.NODE_ENV !== "production")
|
|
324
|
-
return
|
|
324
|
+
return bi(e, t);
|
|
325
325
|
{
|
|
326
326
|
let n = `Solana error #${e}; Decode this error by running \`npx @solana/errors decode -- ${e}`;
|
|
327
|
-
return Object.keys(t).length && (n += ` '${
|
|
327
|
+
return Object.keys(t).length && (n += ` '${pi(t)}'`), `${n}\``;
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
function
|
|
331
|
-
return e instanceof Error && e.name === "SolanaError" ? e.context.__code === t : !1;
|
|
330
|
+
function St(e, t) {
|
|
331
|
+
return e instanceof Error && e.name === "SolanaError" ? t !== void 0 ? e.context.__code === t : !0 : !1;
|
|
332
332
|
}
|
|
333
|
-
var
|
|
333
|
+
var T = class extends Error {
|
|
334
334
|
/**
|
|
335
335
|
* Indicates the root cause of this {@link SolanaError}, if any.
|
|
336
336
|
*
|
|
@@ -348,59 +348,59 @@ var N = class extends Error {
|
|
|
348
348
|
const { cause: a, ...i } = t;
|
|
349
349
|
a && (o = { cause: a }), Object.keys(i).length > 0 && (n = i);
|
|
350
350
|
}
|
|
351
|
-
const r =
|
|
351
|
+
const r = Pi(e, n);
|
|
352
352
|
super(r, o), this.context = {
|
|
353
353
|
__code: e,
|
|
354
354
|
...n
|
|
355
355
|
}, this.name = "SolanaError";
|
|
356
356
|
}
|
|
357
|
-
},
|
|
357
|
+
}, Ui = (e, t) => {
|
|
358
358
|
if (e.length >= t) return e;
|
|
359
359
|
const n = new Uint8Array(t).fill(0);
|
|
360
360
|
return n.set(e), n;
|
|
361
|
-
},
|
|
362
|
-
function
|
|
361
|
+
}, wi = (e, t) => Ui(e.length <= t ? e : e.slice(0, t), t);
|
|
362
|
+
function G(e, t, n) {
|
|
363
363
|
const o = n === 0 && e.length === t.length ? e : e.slice(n, n + t.length);
|
|
364
364
|
return o.length !== t.length ? !1 : t.every((r, a) => r === o[a]);
|
|
365
365
|
}
|
|
366
|
-
function
|
|
366
|
+
function Q(e, t) {
|
|
367
367
|
return "fixedSize" in t ? t.fixedSize : t.getSizeFromValue(e);
|
|
368
368
|
}
|
|
369
|
-
function
|
|
369
|
+
function b(e) {
|
|
370
370
|
return Object.freeze({
|
|
371
371
|
...e,
|
|
372
372
|
encode: (t) => {
|
|
373
|
-
const n = new Uint8Array(
|
|
373
|
+
const n = new Uint8Array(Q(t, e));
|
|
374
374
|
return e.write(t, n, 0), n;
|
|
375
375
|
}
|
|
376
376
|
});
|
|
377
377
|
}
|
|
378
|
-
function
|
|
378
|
+
function P(e) {
|
|
379
379
|
return Object.freeze({
|
|
380
380
|
...e,
|
|
381
381
|
decode: (t, n = 0) => e.read(t, n)[0]
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function D(e) {
|
|
385
385
|
return "fixedSize" in e && typeof e.fixedSize == "number";
|
|
386
386
|
}
|
|
387
|
-
function
|
|
388
|
-
if (!
|
|
389
|
-
throw new
|
|
387
|
+
function It(e) {
|
|
388
|
+
if (!D(e))
|
|
389
|
+
throw new T(_t);
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
return !
|
|
391
|
+
function Mi(e) {
|
|
392
|
+
return !D(e);
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (
|
|
396
|
-
throw new
|
|
397
|
-
if (
|
|
398
|
-
throw new
|
|
394
|
+
function f(e, t) {
|
|
395
|
+
if (D(e) !== D(t))
|
|
396
|
+
throw new T(ct);
|
|
397
|
+
if (D(e) && D(t) && e.fixedSize !== t.fixedSize)
|
|
398
|
+
throw new T(ut, {
|
|
399
399
|
decoderFixedSize: t.fixedSize,
|
|
400
400
|
encoderFixedSize: e.fixedSize
|
|
401
401
|
});
|
|
402
|
-
if (!
|
|
403
|
-
throw new
|
|
402
|
+
if (!D(e) && !D(t) && e.maxSize !== t.maxSize)
|
|
403
|
+
throw new T(Rt, {
|
|
404
404
|
decoderMaxSize: t.maxSize,
|
|
405
405
|
encoderMaxSize: e.maxSize
|
|
406
406
|
});
|
|
@@ -413,23 +413,23 @@ function E(e, t) {
|
|
|
413
413
|
write: e.write
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function yi(e, t, n = 0) {
|
|
417
417
|
if (t.length - n <= 0)
|
|
418
|
-
throw new
|
|
418
|
+
throw new T(it, {
|
|
419
419
|
codecDescription: e
|
|
420
420
|
});
|
|
421
421
|
}
|
|
422
|
-
function
|
|
422
|
+
function gt(e, t, n, o = 0) {
|
|
423
423
|
const r = n.length - o;
|
|
424
424
|
if (r < t)
|
|
425
|
-
throw new
|
|
425
|
+
throw new T(st, {
|
|
426
426
|
bytesLength: r,
|
|
427
427
|
codecDescription: e,
|
|
428
428
|
expected: t
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
432
|
-
return
|
|
431
|
+
function g(e, t) {
|
|
432
|
+
return b({
|
|
433
433
|
fixedSize: t,
|
|
434
434
|
write: (n, o, r) => {
|
|
435
435
|
const a = e.encode(n), i = a.length > t ? a.slice(0, t) : a;
|
|
@@ -437,24 +437,24 @@ function S(e, t) {
|
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
return
|
|
440
|
+
function m(e, t) {
|
|
441
|
+
return P({
|
|
442
442
|
fixedSize: t,
|
|
443
443
|
read: (n, o) => {
|
|
444
|
-
|
|
444
|
+
gt("fixCodecSize", t, n, o), (o > 0 || n.length > t) && (n = n.slice(o, o + t)), D(e) && (n = wi(n, e.fixedSize));
|
|
445
445
|
const [r] = e.read(n, 0);
|
|
446
446
|
return [r, o + t];
|
|
447
447
|
}
|
|
448
448
|
});
|
|
449
449
|
}
|
|
450
|
-
function
|
|
451
|
-
return
|
|
452
|
-
...
|
|
450
|
+
function L(e, t) {
|
|
451
|
+
return b({
|
|
452
|
+
...Mi(e) ? { ...e, getSizeFromValue: (n) => e.getSizeFromValue(t(n)) } : e,
|
|
453
453
|
write: (n, o, r) => e.write(t(n), o, r)
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
|
-
function
|
|
457
|
-
return
|
|
456
|
+
function q(e, t) {
|
|
457
|
+
return P({
|
|
458
458
|
...e,
|
|
459
459
|
read: (n, o) => {
|
|
460
460
|
const [r, a] = e.read(n, o);
|
|
@@ -462,69 +462,69 @@ function W(e, t) {
|
|
|
462
462
|
}
|
|
463
463
|
});
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function xi(e, t, n = t) {
|
|
466
466
|
if (!t.match(new RegExp(`^[${e}]*$`)))
|
|
467
|
-
throw new
|
|
467
|
+
throw new T(_e, {
|
|
468
468
|
alphabet: e,
|
|
469
469
|
base: e.length,
|
|
470
470
|
value: n
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
|
-
var
|
|
473
|
+
var ki = (e) => b({
|
|
474
474
|
getSizeFromValue: (t) => {
|
|
475
|
-
const [n, o] =
|
|
475
|
+
const [n, o] = Be(t, e[0]);
|
|
476
476
|
if (!o) return t.length;
|
|
477
|
-
const r =
|
|
477
|
+
const r = Ge(o, e);
|
|
478
478
|
return n.length + Math.ceil(r.toString(16).length / 2);
|
|
479
479
|
},
|
|
480
480
|
write(t, n, o) {
|
|
481
|
-
if (
|
|
482
|
-
const [r, a] =
|
|
481
|
+
if (xi(e, t), t === "") return o;
|
|
482
|
+
const [r, a] = Be(t, e[0]);
|
|
483
483
|
if (!a)
|
|
484
484
|
return n.set(new Uint8Array(r.length).fill(0), o), o + r.length;
|
|
485
|
-
let i =
|
|
486
|
-
const
|
|
485
|
+
let i = Ge(a, e);
|
|
486
|
+
const s = [];
|
|
487
487
|
for (; i > 0n; )
|
|
488
|
-
|
|
489
|
-
const
|
|
490
|
-
return n.set(
|
|
488
|
+
s.unshift(Number(i % 256n)), i /= 256n;
|
|
489
|
+
const _ = [...Array(r.length).fill(0), ...s];
|
|
490
|
+
return n.set(_, o), o + _.length;
|
|
491
491
|
}
|
|
492
|
-
}),
|
|
492
|
+
}), Bi = (e) => P({
|
|
493
493
|
read(t, n) {
|
|
494
494
|
const o = n === 0 ? t : t.slice(n);
|
|
495
495
|
if (o.length === 0) return ["", 0];
|
|
496
|
-
let r = o.findIndex((
|
|
496
|
+
let r = o.findIndex((_) => _ !== 0);
|
|
497
497
|
r = r === -1 ? o.length : r;
|
|
498
498
|
const a = e[0].repeat(r);
|
|
499
499
|
if (r === o.length) return [a, t.length];
|
|
500
|
-
const i = o.slice(r).reduce((
|
|
501
|
-
return [a +
|
|
500
|
+
const i = o.slice(r).reduce((_, N) => _ * 256n + BigInt(N), 0n), s = Gi(i, e);
|
|
501
|
+
return [a + s, t.length];
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
function
|
|
504
|
+
function Be(e, t) {
|
|
505
505
|
const [n, o] = e.split(new RegExp(`((?!${t}).*)`));
|
|
506
506
|
return [n, o];
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Ge(e, t) {
|
|
509
509
|
const n = BigInt(t.length);
|
|
510
510
|
let o = 0n;
|
|
511
511
|
for (const r of e)
|
|
512
512
|
o *= n, o += BigInt(t.indexOf(r));
|
|
513
513
|
return o;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Gi(e, t) {
|
|
516
516
|
const n = BigInt(t.length), o = [];
|
|
517
517
|
for (; e > 0n; )
|
|
518
518
|
o.unshift(t[Number(e % n)]), e /= n;
|
|
519
519
|
return o.join("");
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var mt = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Vi = () => ki(mt), Fi = () => Bi(mt), Ve = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", zi = () => b({
|
|
522
522
|
getSizeFromValue: (e) => {
|
|
523
523
|
try {
|
|
524
524
|
return atob(e).length;
|
|
525
525
|
} catch {
|
|
526
|
-
throw new
|
|
527
|
-
alphabet:
|
|
526
|
+
throw new T(_e, {
|
|
527
|
+
alphabet: Ve,
|
|
528
528
|
base: 64,
|
|
529
529
|
value: e
|
|
530
530
|
});
|
|
@@ -535,29 +535,29 @@ var Ze = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", Si = () =
|
|
|
535
535
|
const o = atob(e).split("").map((r) => r.charCodeAt(0));
|
|
536
536
|
return t.set(o, n), o.length + n;
|
|
537
537
|
} catch {
|
|
538
|
-
throw new
|
|
539
|
-
alphabet:
|
|
538
|
+
throw new T(_e, {
|
|
539
|
+
alphabet: Ve,
|
|
540
540
|
base: 64,
|
|
541
541
|
value: e
|
|
542
542
|
});
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
});
|
|
546
|
-
function
|
|
546
|
+
function Ct(e, t) {
|
|
547
547
|
try {
|
|
548
548
|
return "exists" in e && !e.exists ? e : Object.freeze({ ...e, data: t.decode(e.data) });
|
|
549
549
|
} catch {
|
|
550
|
-
throw new
|
|
550
|
+
throw new T(nt, {
|
|
551
551
|
address: e.address
|
|
552
552
|
});
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function ht(e, t) {
|
|
556
556
|
if (!t) return Object.freeze({ address: e, exists: !1 });
|
|
557
|
-
const n =
|
|
558
|
-
return Object.freeze({ ...
|
|
557
|
+
const n = zi().encode(t.data[0]);
|
|
558
|
+
return Object.freeze({ ...Hi(t), address: e, data: n, exists: !0 });
|
|
559
559
|
}
|
|
560
|
-
function
|
|
560
|
+
function Hi(e) {
|
|
561
561
|
return Object.freeze({
|
|
562
562
|
executable: e.executable,
|
|
563
563
|
lamports: e.lamports,
|
|
@@ -565,118 +565,238 @@ function mi(e) {
|
|
|
565
565
|
space: e.space
|
|
566
566
|
});
|
|
567
567
|
}
|
|
568
|
-
async function
|
|
568
|
+
async function vt(e, t, n = {}) {
|
|
569
569
|
const { abortSignal: o, ...r } = n, a = await e.getAccountInfo(t, { ...r, encoding: "base64" }).send({ abortSignal: o });
|
|
570
|
-
return
|
|
570
|
+
return ht(t, a.value);
|
|
571
571
|
}
|
|
572
|
-
async function
|
|
572
|
+
async function Lt(e, t, n = {}) {
|
|
573
573
|
const { abortSignal: o, ...r } = n;
|
|
574
|
-
return (await e.getMultipleAccounts(t, { ...r, encoding: "base64" }).send({ abortSignal: o })).value.map((i,
|
|
574
|
+
return (await e.getMultipleAccounts(t, { ...r, encoding: "base64" }).send({ abortSignal: o })).value.map((i, s) => ht(t[s], i));
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function pt(e) {
|
|
577
577
|
if (!e.exists)
|
|
578
|
-
throw new
|
|
578
|
+
throw new T(et, { address: e.address });
|
|
579
579
|
}
|
|
580
|
-
function
|
|
580
|
+
function Dt(e) {
|
|
581
581
|
const t = e.filter((n) => !n.exists);
|
|
582
582
|
if (t.length > 0) {
|
|
583
583
|
const n = t.map((o) => o.address);
|
|
584
|
-
throw new
|
|
584
|
+
throw new T(tt, { addresses: n });
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
function Wi() {
|
|
588
|
+
if (typeof globalThis.crypto > "u" || typeof globalThis.crypto.subtle?.digest != "function")
|
|
589
|
+
throw new T(rt);
|
|
590
590
|
}
|
|
591
|
-
|
|
592
|
-
|
|
591
|
+
var le, Oe;
|
|
592
|
+
function bt() {
|
|
593
|
+
return le || (le = Vi()), le;
|
|
594
|
+
}
|
|
595
|
+
function $i() {
|
|
596
|
+
return Oe || (Oe = Fi()), Oe;
|
|
593
597
|
}
|
|
594
|
-
function
|
|
598
|
+
function Xi(e) {
|
|
595
599
|
if (
|
|
596
600
|
// Lowest address (32 bytes of zeroes)
|
|
597
601
|
e.length < 32 || // Highest address (32 bytes of 255)
|
|
598
602
|
e.length > 44
|
|
599
603
|
)
|
|
600
|
-
throw new
|
|
604
|
+
throw new T(Je, {
|
|
601
605
|
actualLength: e.length
|
|
602
606
|
});
|
|
603
|
-
const o =
|
|
607
|
+
const o = bt().encode(e).byteLength;
|
|
604
608
|
if (o !== 32)
|
|
605
|
-
throw new
|
|
609
|
+
throw new T(je, {
|
|
606
610
|
actualLength: o
|
|
607
611
|
});
|
|
608
612
|
}
|
|
609
|
-
function
|
|
610
|
-
return
|
|
613
|
+
function Yi(e) {
|
|
614
|
+
return Xi(e), e;
|
|
611
615
|
}
|
|
612
|
-
function
|
|
613
|
-
return
|
|
614
|
-
|
|
615
|
-
(e) =>
|
|
616
|
+
function c() {
|
|
617
|
+
return L(
|
|
618
|
+
g(bt(), 32),
|
|
619
|
+
(e) => Yi(e)
|
|
616
620
|
);
|
|
617
621
|
}
|
|
618
622
|
function u() {
|
|
619
|
-
return
|
|
623
|
+
return m($i(), 32);
|
|
624
|
+
}
|
|
625
|
+
function Le() {
|
|
626
|
+
return f(c(), u());
|
|
627
|
+
}
|
|
628
|
+
var Ki = 37095705934669439343138083508754565189542113879843219016388785533085940283555n, v = 57896044618658097711785492504343953926634992332820282019728792003956564819949n, Fe = 19681161376707505956807079304988542015446066515923890162744021073123829784752n;
|
|
629
|
+
function U(e) {
|
|
630
|
+
const t = e % v;
|
|
631
|
+
return t >= 0n ? t : v + t;
|
|
632
|
+
}
|
|
633
|
+
function k(e, t) {
|
|
634
|
+
let n = e;
|
|
635
|
+
for (; t-- > 0n; )
|
|
636
|
+
n *= n, n %= v;
|
|
637
|
+
return n;
|
|
638
|
+
}
|
|
639
|
+
function ji(e) {
|
|
640
|
+
const n = e * e % v * e % v, o = k(n, 2n) * n % v, r = k(o, 1n) * e % v, a = k(r, 5n) * r % v, i = k(a, 10n) * a % v, s = k(i, 20n) * i % v, _ = k(s, 40n) * s % v, N = k(_, 80n) * _ % v, I = k(N, 80n) * _ % v, A = k(I, 10n) * a % v;
|
|
641
|
+
return k(A, 2n) * e % v;
|
|
642
|
+
}
|
|
643
|
+
function Ji(e, t) {
|
|
644
|
+
const n = U(t * t * t), o = U(n * n * t), r = ji(e * o);
|
|
645
|
+
let a = U(e * n * r);
|
|
646
|
+
const i = U(t * a * a), s = a, _ = U(a * Fe), N = i === e, I = i === U(-e), A = i === U(-e * Fe);
|
|
647
|
+
return N && (a = s), (I || A) && (a = _), (U(a) & 1n) === 1n && (a = U(-a)), !N && !I ? null : a;
|
|
648
|
+
}
|
|
649
|
+
function Zi(e, t) {
|
|
650
|
+
const n = U(e * e), o = U(n - 1n), r = U(Ki * n + 1n), a = Ji(o, r);
|
|
651
|
+
if (a === null)
|
|
652
|
+
return !1;
|
|
653
|
+
const i = (t & 128) !== 0;
|
|
654
|
+
return !(a === 0n && i);
|
|
655
|
+
}
|
|
656
|
+
function qi(e) {
|
|
657
|
+
const t = e.toString(16);
|
|
658
|
+
return t.length === 1 ? `0${t}` : t;
|
|
659
|
+
}
|
|
660
|
+
function Qi(e) {
|
|
661
|
+
const n = `0x${e.reduce((o, r, a) => `${qi(a === 31 ? r & -129 : r)}${o}`, "")}`;
|
|
662
|
+
return BigInt(n);
|
|
663
|
+
}
|
|
664
|
+
function Pt(e) {
|
|
665
|
+
if (e.byteLength !== 32)
|
|
666
|
+
return !1;
|
|
667
|
+
const t = Qi(e);
|
|
668
|
+
return Zi(t, e[31]);
|
|
669
|
+
}
|
|
670
|
+
function es(e) {
|
|
671
|
+
const t = Le().encode(e);
|
|
672
|
+
return Pt(t) === !1;
|
|
673
|
+
}
|
|
674
|
+
var ze = 32, He = 16, ts = [
|
|
675
|
+
// The string 'ProgramDerivedAddress'
|
|
676
|
+
80,
|
|
677
|
+
114,
|
|
678
|
+
111,
|
|
679
|
+
103,
|
|
680
|
+
114,
|
|
681
|
+
97,
|
|
682
|
+
109,
|
|
683
|
+
68,
|
|
684
|
+
101,
|
|
685
|
+
114,
|
|
686
|
+
105,
|
|
687
|
+
118,
|
|
688
|
+
101,
|
|
689
|
+
100,
|
|
690
|
+
65,
|
|
691
|
+
100,
|
|
692
|
+
100,
|
|
693
|
+
114,
|
|
694
|
+
101,
|
|
695
|
+
115,
|
|
696
|
+
115
|
|
697
|
+
];
|
|
698
|
+
async function ns({ programAddress: e, seeds: t }) {
|
|
699
|
+
if (Wi(), t.length > He)
|
|
700
|
+
throw new T(Ze, {
|
|
701
|
+
actual: t.length,
|
|
702
|
+
maxSeeds: He
|
|
703
|
+
});
|
|
704
|
+
let n;
|
|
705
|
+
const o = t.reduce((_, N, I) => {
|
|
706
|
+
const A = typeof N == "string" ? (n ||= new TextEncoder()).encode(N) : N;
|
|
707
|
+
if (A.byteLength > ze)
|
|
708
|
+
throw new T(qe, {
|
|
709
|
+
actual: A.byteLength,
|
|
710
|
+
index: I,
|
|
711
|
+
maxSeedLength: ze
|
|
712
|
+
});
|
|
713
|
+
return _.push(...A), _;
|
|
714
|
+
}, []), r = Le(), a = r.encode(e), i = await crypto.subtle.digest(
|
|
715
|
+
"SHA-256",
|
|
716
|
+
new Uint8Array([...o, ...a, ...ts])
|
|
717
|
+
), s = new Uint8Array(i);
|
|
718
|
+
if (Pt(s))
|
|
719
|
+
throw new T(he);
|
|
720
|
+
return r.decode(s);
|
|
721
|
+
}
|
|
722
|
+
async function pe({
|
|
723
|
+
programAddress: e,
|
|
724
|
+
seeds: t
|
|
725
|
+
}) {
|
|
726
|
+
let n = 255;
|
|
727
|
+
for (; n > 0; )
|
|
728
|
+
try {
|
|
729
|
+
return [await ns({
|
|
730
|
+
programAddress: e,
|
|
731
|
+
seeds: [...t, new Uint8Array([n])]
|
|
732
|
+
}), n];
|
|
733
|
+
} catch (o) {
|
|
734
|
+
if (St(o, he))
|
|
735
|
+
n--;
|
|
736
|
+
else
|
|
737
|
+
throw o;
|
|
738
|
+
}
|
|
739
|
+
throw new T(Qe);
|
|
620
740
|
}
|
|
621
|
-
function
|
|
741
|
+
function rs(e, t, n, o) {
|
|
622
742
|
if (o < t || o > n)
|
|
623
|
-
throw new
|
|
743
|
+
throw new T(Et, {
|
|
624
744
|
codecDescription: e,
|
|
625
745
|
max: n,
|
|
626
746
|
min: t,
|
|
627
747
|
value: o
|
|
628
748
|
});
|
|
629
749
|
}
|
|
630
|
-
function
|
|
750
|
+
function Ut(e) {
|
|
631
751
|
return e?.endian !== 1;
|
|
632
752
|
}
|
|
633
|
-
function
|
|
634
|
-
return
|
|
753
|
+
function j(e) {
|
|
754
|
+
return b({
|
|
635
755
|
fixedSize: e.size,
|
|
636
756
|
write(t, n, o) {
|
|
637
|
-
e.range &&
|
|
757
|
+
e.range && rs(e.name, e.range[0], e.range[1], t);
|
|
638
758
|
const r = new ArrayBuffer(e.size);
|
|
639
|
-
return e.set(new DataView(r), t,
|
|
759
|
+
return e.set(new DataView(r), t, Ut(e.config)), n.set(new Uint8Array(r), o), o + e.size;
|
|
640
760
|
}
|
|
641
761
|
});
|
|
642
762
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
763
|
+
function J(e) {
|
|
764
|
+
return P({
|
|
645
765
|
fixedSize: e.size,
|
|
646
766
|
read(t, n = 0) {
|
|
647
|
-
|
|
648
|
-
const o = new DataView(
|
|
649
|
-
return [e.get(o,
|
|
767
|
+
yi(e.name, t, n), gt(e.name, e.size, t, n);
|
|
768
|
+
const o = new DataView(os(t, n, e.size));
|
|
769
|
+
return [e.get(o, Ut(e.config)), n + e.size];
|
|
650
770
|
}
|
|
651
771
|
});
|
|
652
772
|
}
|
|
653
|
-
function
|
|
773
|
+
function os(e, t, n) {
|
|
654
774
|
const o = e.byteOffset + (t ?? 0), r = n ?? e.byteLength;
|
|
655
775
|
return e.buffer.slice(o, o + r);
|
|
656
776
|
}
|
|
657
|
-
var
|
|
777
|
+
var fe = (e = {}) => j({
|
|
658
778
|
config: e,
|
|
659
779
|
name: "i32",
|
|
660
780
|
range: [-+"0x7fffffff" - 1, +"0x7fffffff"],
|
|
661
781
|
set: (t, n, o) => t.setInt32(0, Number(n), o),
|
|
662
782
|
size: 4
|
|
663
|
-
}),
|
|
783
|
+
}), Se = (e = {}) => J({
|
|
664
784
|
config: e,
|
|
665
785
|
get: (t, n) => t.getInt32(0, n),
|
|
666
786
|
name: "i32",
|
|
667
787
|
size: 4
|
|
668
|
-
}),
|
|
788
|
+
}), as = (e = {}) => j({
|
|
669
789
|
config: e,
|
|
670
790
|
name: "i64",
|
|
671
791
|
range: [-BigInt("0x7fffffffffffffff") - 1n, BigInt("0x7fffffffffffffff")],
|
|
672
792
|
set: (t, n, o) => t.setBigInt64(0, BigInt(n), o),
|
|
673
793
|
size: 8
|
|
674
|
-
}),
|
|
794
|
+
}), is = (e = {}) => J({
|
|
675
795
|
config: e,
|
|
676
796
|
get: (t, n) => t.getBigInt64(0, n),
|
|
677
797
|
name: "i64",
|
|
678
798
|
size: 8
|
|
679
|
-
}),
|
|
799
|
+
}), w = (e = {}) => j({
|
|
680
800
|
config: e,
|
|
681
801
|
name: "u128",
|
|
682
802
|
range: [0n, BigInt("0xffffffffffffffffffffffffffffffff")],
|
|
@@ -685,7 +805,7 @@ var ce = (e = {}) => G({
|
|
|
685
805
|
t.setBigUint64(r, BigInt(n) >> 64n, o), t.setBigUint64(a, BigInt(n) & i, o);
|
|
686
806
|
},
|
|
687
807
|
size: 16
|
|
688
|
-
}),
|
|
808
|
+
}), M = (e = {}) => J({
|
|
689
809
|
config: e,
|
|
690
810
|
get: (t, n) => {
|
|
691
811
|
const o = n ? 8 : 0, r = n ? 0 : 8, a = t.getBigUint64(o, n), i = t.getBigUint64(r, n);
|
|
@@ -693,150 +813,150 @@ var ce = (e = {}) => G({
|
|
|
693
813
|
},
|
|
694
814
|
name: "u128",
|
|
695
815
|
size: 16
|
|
696
|
-
}),
|
|
816
|
+
}), Ee = (e = {}) => j({
|
|
697
817
|
config: e,
|
|
698
818
|
name: "u16",
|
|
699
819
|
range: [0, +"0xffff"],
|
|
700
820
|
set: (t, n, o) => t.setUint16(0, Number(n), o),
|
|
701
821
|
size: 2
|
|
702
|
-
}),
|
|
822
|
+
}), Ne = (e = {}) => J({
|
|
703
823
|
config: e,
|
|
704
824
|
get: (t, n) => t.getUint16(0, n),
|
|
705
825
|
name: "u16",
|
|
706
826
|
size: 2
|
|
707
|
-
}),
|
|
827
|
+
}), V = (e = {}) => j({
|
|
708
828
|
config: e,
|
|
709
829
|
name: "u32",
|
|
710
830
|
range: [0, +"0xffffffff"],
|
|
711
831
|
set: (t, n, o) => t.setUint32(0, Number(n), o),
|
|
712
832
|
size: 4
|
|
713
|
-
}),
|
|
833
|
+
}), F = (e = {}) => J({
|
|
714
834
|
config: e,
|
|
715
835
|
get: (t, n) => t.getUint32(0, n),
|
|
716
836
|
name: "u32",
|
|
717
837
|
size: 4
|
|
718
|
-
}),
|
|
838
|
+
}), d = (e = {}) => j({
|
|
719
839
|
config: e,
|
|
720
840
|
name: "u64",
|
|
721
841
|
range: [0n, BigInt("0xffffffffffffffff")],
|
|
722
842
|
set: (t, n, o) => t.setBigUint64(0, BigInt(n), o),
|
|
723
843
|
size: 8
|
|
724
|
-
}),
|
|
844
|
+
}), l = (e = {}) => J({
|
|
725
845
|
config: e,
|
|
726
846
|
get: (t, n) => t.getBigUint64(0, n),
|
|
727
847
|
name: "u64",
|
|
728
848
|
size: 8
|
|
729
|
-
}),
|
|
849
|
+
}), R = () => j({
|
|
730
850
|
name: "u8",
|
|
731
851
|
range: [0, +"0xff"],
|
|
732
852
|
set: (e, t) => e.setUint8(0, Number(t)),
|
|
733
853
|
size: 1
|
|
734
|
-
}),
|
|
854
|
+
}), S = () => J({
|
|
735
855
|
get: (e) => e.getUint8(0),
|
|
736
856
|
name: "u8",
|
|
737
857
|
size: 1
|
|
738
858
|
});
|
|
739
|
-
function
|
|
859
|
+
function wt(e, t, n) {
|
|
740
860
|
if (t !== n)
|
|
741
|
-
throw new
|
|
861
|
+
throw new T(At, {
|
|
742
862
|
actual: n,
|
|
743
863
|
codecDescription: e,
|
|
744
864
|
expected: t
|
|
745
865
|
});
|
|
746
866
|
}
|
|
747
|
-
function
|
|
867
|
+
function ss(e) {
|
|
748
868
|
return e.reduce(
|
|
749
869
|
(t, n) => t === null || n === null ? null : Math.max(t, n),
|
|
750
870
|
0
|
|
751
871
|
);
|
|
752
872
|
}
|
|
753
|
-
function
|
|
873
|
+
function Y(e) {
|
|
754
874
|
return e.reduce((t, n) => t === null || n === null ? null : t + n, 0);
|
|
755
875
|
}
|
|
756
|
-
function
|
|
757
|
-
return
|
|
876
|
+
function ee(e) {
|
|
877
|
+
return D(e) ? e.fixedSize : null;
|
|
758
878
|
}
|
|
759
|
-
function
|
|
760
|
-
return
|
|
879
|
+
function Z(e) {
|
|
880
|
+
return D(e) ? e.fixedSize : e.maxSize ?? null;
|
|
761
881
|
}
|
|
762
|
-
function
|
|
763
|
-
const n = t.size ??
|
|
764
|
-
return
|
|
882
|
+
function ue(e, t = {}) {
|
|
883
|
+
const n = t.size ?? V(), o = ce(n, ee(e)), r = ce(n, Z(e)) ?? void 0;
|
|
884
|
+
return b({
|
|
765
885
|
...o !== null ? { fixedSize: o } : {
|
|
766
|
-
getSizeFromValue: (a) => (typeof n == "object" ?
|
|
886
|
+
getSizeFromValue: (a) => (typeof n == "object" ? Q(a.length, n) : 0) + [...a].reduce((s, _) => s + Q(_, e), 0),
|
|
767
887
|
maxSize: r
|
|
768
888
|
},
|
|
769
|
-
write: (a, i,
|
|
770
|
-
|
|
771
|
-
}),
|
|
889
|
+
write: (a, i, s) => (typeof n == "number" && wt("array", n, a.length), typeof n == "object" && (s = n.write(a.length, i, s)), a.forEach((_) => {
|
|
890
|
+
s = e.write(_, i, s);
|
|
891
|
+
}), s)
|
|
772
892
|
});
|
|
773
893
|
}
|
|
774
|
-
function
|
|
775
|
-
const n = t.size ??
|
|
776
|
-
return
|
|
894
|
+
function Re(e, t = {}) {
|
|
895
|
+
const n = t.size ?? F(), o = ee(e), r = ce(n, o), a = ce(n, Z(e)) ?? void 0;
|
|
896
|
+
return P({
|
|
777
897
|
...r !== null ? { fixedSize: r } : { maxSize: a },
|
|
778
|
-
read: (i,
|
|
779
|
-
const
|
|
780
|
-
if (typeof n == "object" && i.slice(
|
|
781
|
-
return [
|
|
898
|
+
read: (i, s) => {
|
|
899
|
+
const _ = [];
|
|
900
|
+
if (typeof n == "object" && i.slice(s).length === 0)
|
|
901
|
+
return [_, s];
|
|
782
902
|
if (n === "remainder") {
|
|
783
|
-
for (;
|
|
784
|
-
const [
|
|
785
|
-
|
|
903
|
+
for (; s < i.length; ) {
|
|
904
|
+
const [A, y] = e.read(i, s);
|
|
905
|
+
s = y, _.push(A);
|
|
786
906
|
}
|
|
787
|
-
return [
|
|
907
|
+
return [_, s];
|
|
788
908
|
}
|
|
789
|
-
const [
|
|
790
|
-
|
|
791
|
-
for (let
|
|
792
|
-
const [
|
|
793
|
-
|
|
909
|
+
const [N, I] = typeof n == "number" ? [n, s] : n.read(i, s);
|
|
910
|
+
s = I;
|
|
911
|
+
for (let A = 0; A < N; A += 1) {
|
|
912
|
+
const [y, H] = e.read(i, s);
|
|
913
|
+
s = H, _.push(y);
|
|
794
914
|
}
|
|
795
|
-
return [
|
|
915
|
+
return [_, s];
|
|
796
916
|
}
|
|
797
917
|
});
|
|
798
918
|
}
|
|
799
|
-
function
|
|
919
|
+
function ce(e, t) {
|
|
800
920
|
return typeof e != "number" ? null : e === 0 ? 0 : t === null ? null : t * e;
|
|
801
921
|
}
|
|
802
|
-
function
|
|
803
|
-
return
|
|
922
|
+
function Mt(e = {}) {
|
|
923
|
+
return L(e.size ?? R(), (t) => t ? 1 : 0);
|
|
804
924
|
}
|
|
805
|
-
function
|
|
806
|
-
return
|
|
925
|
+
function yt(e = {}) {
|
|
926
|
+
return q(e.size ?? S(), (t) => Number(t) === 1);
|
|
807
927
|
}
|
|
808
|
-
function
|
|
809
|
-
return
|
|
928
|
+
function C() {
|
|
929
|
+
return b({
|
|
810
930
|
getSizeFromValue: (e) => e.length,
|
|
811
931
|
write: (e, t, n) => (t.set(e, n), n + e.length)
|
|
812
932
|
});
|
|
813
933
|
}
|
|
814
|
-
function
|
|
815
|
-
return
|
|
934
|
+
function h() {
|
|
935
|
+
return P({
|
|
816
936
|
read: (e, t) => {
|
|
817
937
|
const n = e.slice(t);
|
|
818
938
|
return [n, t + n.length];
|
|
819
939
|
}
|
|
820
940
|
});
|
|
821
941
|
}
|
|
822
|
-
var
|
|
942
|
+
var _s = () => P({
|
|
823
943
|
read(e, t) {
|
|
824
944
|
return [e.slice(t).reduce((o, r) => o + r.toString(16).padStart(2, "0"), ""), e.length];
|
|
825
945
|
}
|
|
826
946
|
});
|
|
827
|
-
function
|
|
828
|
-
return
|
|
947
|
+
function cs(e) {
|
|
948
|
+
return b({
|
|
829
949
|
fixedSize: e.length,
|
|
830
950
|
write: (t, n, o) => (n.set(e, o), o + e.length)
|
|
831
951
|
});
|
|
832
952
|
}
|
|
833
|
-
function
|
|
834
|
-
return
|
|
953
|
+
function us(e) {
|
|
954
|
+
return P({
|
|
835
955
|
fixedSize: e.length,
|
|
836
956
|
read: (t, n) => {
|
|
837
|
-
const o =
|
|
838
|
-
if (!
|
|
839
|
-
throw new
|
|
957
|
+
const o = _s();
|
|
958
|
+
if (!G(t, e, n))
|
|
959
|
+
throw new T(Tt, {
|
|
840
960
|
constant: e,
|
|
841
961
|
data: t,
|
|
842
962
|
hexConstant: o.decode(e),
|
|
@@ -847,89 +967,89 @@ function Mi(e) {
|
|
|
847
967
|
}
|
|
848
968
|
});
|
|
849
969
|
}
|
|
850
|
-
function
|
|
851
|
-
const t =
|
|
852
|
-
return
|
|
970
|
+
function Ie(e) {
|
|
971
|
+
const t = Y(e.map(ee)), n = Y(e.map(Z)) ?? void 0;
|
|
972
|
+
return b({
|
|
853
973
|
...t === null ? {
|
|
854
|
-
getSizeFromValue: (o) => e.map((r, a) =>
|
|
974
|
+
getSizeFromValue: (o) => e.map((r, a) => Q(o[a], r)).reduce((r, a) => r + a, 0),
|
|
855
975
|
maxSize: n
|
|
856
976
|
} : { fixedSize: t },
|
|
857
|
-
write: (o, r, a) => (
|
|
858
|
-
a = i.write(o[
|
|
977
|
+
write: (o, r, a) => (wt("tuple", e.length, o.length), e.forEach((i, s) => {
|
|
978
|
+
a = i.write(o[s], r, a);
|
|
859
979
|
}), a)
|
|
860
980
|
});
|
|
861
981
|
}
|
|
862
|
-
function
|
|
863
|
-
const t =
|
|
864
|
-
return
|
|
982
|
+
function ge(e) {
|
|
983
|
+
const t = Y(e.map(ee)), n = Y(e.map(Z)) ?? void 0;
|
|
984
|
+
return P({
|
|
865
985
|
...t === null ? { maxSize: n } : { fixedSize: t },
|
|
866
986
|
read: (o, r) => {
|
|
867
987
|
const a = [];
|
|
868
988
|
return e.forEach((i) => {
|
|
869
|
-
const [
|
|
870
|
-
a.push(
|
|
989
|
+
const [s, _] = i.read(o, r);
|
|
990
|
+
a.push(s), r = _;
|
|
871
991
|
}), [a, r];
|
|
872
992
|
}
|
|
873
993
|
});
|
|
874
994
|
}
|
|
875
|
-
function
|
|
876
|
-
const n =
|
|
877
|
-
const
|
|
878
|
-
return
|
|
995
|
+
function xt(e, t) {
|
|
996
|
+
const n = Bt(e), o = (a, i, s) => {
|
|
997
|
+
const _ = t(a);
|
|
998
|
+
return me(e, _), e[_].write(a, i, s);
|
|
879
999
|
};
|
|
880
1000
|
if (n !== null)
|
|
881
|
-
return
|
|
882
|
-
const r =
|
|
883
|
-
return
|
|
1001
|
+
return b({ fixedSize: n, write: o });
|
|
1002
|
+
const r = Gt(e);
|
|
1003
|
+
return b({
|
|
884
1004
|
...r !== null ? { maxSize: r } : {},
|
|
885
1005
|
getSizeFromValue: (a) => {
|
|
886
1006
|
const i = t(a);
|
|
887
|
-
return
|
|
1007
|
+
return me(e, i), Q(a, e[i]);
|
|
888
1008
|
},
|
|
889
1009
|
write: o
|
|
890
1010
|
});
|
|
891
1011
|
}
|
|
892
|
-
function
|
|
893
|
-
const n =
|
|
894
|
-
const
|
|
895
|
-
return
|
|
1012
|
+
function kt(e, t) {
|
|
1013
|
+
const n = Bt(e), o = (a, i) => {
|
|
1014
|
+
const s = t(a, i);
|
|
1015
|
+
return me(e, s), e[s].read(a, i);
|
|
896
1016
|
};
|
|
897
1017
|
if (n !== null)
|
|
898
|
-
return
|
|
899
|
-
const r =
|
|
900
|
-
return
|
|
1018
|
+
return P({ fixedSize: n, read: o });
|
|
1019
|
+
const r = Gt(e);
|
|
1020
|
+
return P({ ...r !== null ? { maxSize: r } : {}, read: o });
|
|
901
1021
|
}
|
|
902
|
-
function
|
|
1022
|
+
function me(e, t) {
|
|
903
1023
|
if (typeof e[t] > "u")
|
|
904
|
-
throw new
|
|
1024
|
+
throw new T(Nt, {
|
|
905
1025
|
maxRange: e.length - 1,
|
|
906
1026
|
minRange: 0,
|
|
907
1027
|
variant: t
|
|
908
1028
|
});
|
|
909
1029
|
}
|
|
910
|
-
function
|
|
1030
|
+
function Bt(e) {
|
|
911
1031
|
if (e.length === 0) return 0;
|
|
912
|
-
if (!
|
|
1032
|
+
if (!D(e[0])) return null;
|
|
913
1033
|
const t = e[0].fixedSize;
|
|
914
|
-
return e.every((o) =>
|
|
1034
|
+
return e.every((o) => D(o) && o.fixedSize === t) ? t : null;
|
|
915
1035
|
}
|
|
916
|
-
function
|
|
917
|
-
return
|
|
1036
|
+
function Gt(e) {
|
|
1037
|
+
return ss(e.map((t) => Z(t)));
|
|
918
1038
|
}
|
|
919
|
-
function
|
|
920
|
-
const n = t.discriminator ?? "__kind", o = t.size ??
|
|
921
|
-
return
|
|
1039
|
+
function te(e, t = {}) {
|
|
1040
|
+
const n = t.discriminator ?? "__kind", o = t.size ?? R();
|
|
1041
|
+
return xt(
|
|
922
1042
|
e.map(
|
|
923
|
-
([, r], a) =>
|
|
1043
|
+
([, r], a) => L(Ie([o, r]), (i) => [a, i])
|
|
924
1044
|
),
|
|
925
|
-
(r) =>
|
|
1045
|
+
(r) => Rs(e, r[n])
|
|
926
1046
|
);
|
|
927
1047
|
}
|
|
928
|
-
function
|
|
929
|
-
const n = t.discriminator ?? "__kind", o = t.size ??
|
|
930
|
-
return
|
|
1048
|
+
function ne(e, t = {}) {
|
|
1049
|
+
const n = t.discriminator ?? "__kind", o = t.size ?? S();
|
|
1050
|
+
return kt(
|
|
931
1051
|
e.map(
|
|
932
|
-
([r, a]) =>
|
|
1052
|
+
([r, a]) => q(ge([o, a]), ([, i]) => ({
|
|
933
1053
|
[n]: r,
|
|
934
1054
|
...i
|
|
935
1055
|
}))
|
|
@@ -937,44 +1057,44 @@ function Y(e, t = {}) {
|
|
|
937
1057
|
(r, a) => Number(o.read(r, a)[0])
|
|
938
1058
|
);
|
|
939
1059
|
}
|
|
940
|
-
function
|
|
1060
|
+
function Rs(e, t) {
|
|
941
1061
|
const n = e.findIndex(([o]) => t === o);
|
|
942
1062
|
if (n < 0)
|
|
943
|
-
throw new
|
|
1063
|
+
throw new T(lt, {
|
|
944
1064
|
value: t,
|
|
945
1065
|
variants: e.map(([o]) => o)
|
|
946
1066
|
});
|
|
947
1067
|
return n;
|
|
948
1068
|
}
|
|
949
|
-
function
|
|
1069
|
+
function Vt(e) {
|
|
950
1070
|
const t = [...new Set(Object.values(e).filter((i) => typeof i == "number"))].sort(), n = Object.fromEntries(Object.entries(e).slice(t.length)), o = Object.keys(n), r = Object.values(n), a = [
|
|
951
1071
|
.../* @__PURE__ */ new Set([...o, ...r.filter((i) => typeof i == "string")])
|
|
952
1072
|
];
|
|
953
1073
|
return { enumKeys: o, enumRecord: n, enumValues: r, numericalValues: t, stringValues: a };
|
|
954
1074
|
}
|
|
955
|
-
function
|
|
1075
|
+
function As({
|
|
956
1076
|
enumKeys: e,
|
|
957
1077
|
enumValues: t,
|
|
958
1078
|
variant: n
|
|
959
1079
|
}) {
|
|
960
|
-
const o =
|
|
1080
|
+
const o = Ft(t, (r) => r === n);
|
|
961
1081
|
return o >= 0 ? o : e.findIndex((r) => r === n);
|
|
962
1082
|
}
|
|
963
|
-
function
|
|
1083
|
+
function ds({
|
|
964
1084
|
discriminator: e,
|
|
965
1085
|
enumKeys: t,
|
|
966
1086
|
enumValues: n,
|
|
967
1087
|
useValuesAsDiscriminators: o
|
|
968
1088
|
}) {
|
|
969
|
-
return o ?
|
|
1089
|
+
return o ? Ft(n, (r) => r === e) : e >= 0 && e < t.length ? e : -1;
|
|
970
1090
|
}
|
|
971
|
-
function
|
|
1091
|
+
function Ft(e, t) {
|
|
972
1092
|
let n = e.length;
|
|
973
1093
|
for (; n--; )
|
|
974
1094
|
if (t(e[n], n, e)) return n;
|
|
975
1095
|
return -1;
|
|
976
1096
|
}
|
|
977
|
-
function
|
|
1097
|
+
function zt(e) {
|
|
978
1098
|
if (e.length === 0) return "";
|
|
979
1099
|
let t = [e[0], e[0]];
|
|
980
1100
|
const n = [];
|
|
@@ -984,878 +1104,878 @@ function dt(e) {
|
|
|
984
1104
|
}
|
|
985
1105
|
return n.push(t[0] === t[1] ? `${t[0]}` : `${t[0]}-${t[1]}`), n.join(", ");
|
|
986
1106
|
}
|
|
987
|
-
function
|
|
988
|
-
const n = t.size ??
|
|
989
|
-
if (o && a.some((
|
|
990
|
-
throw new
|
|
991
|
-
stringValues: a.filter((
|
|
1107
|
+
function re(e, t = {}) {
|
|
1108
|
+
const n = t.size ?? R(), o = t.useValuesAsDiscriminators ?? !1, { enumKeys: r, enumValues: a, numericalValues: i, stringValues: s } = Vt(e);
|
|
1109
|
+
if (o && a.some((_) => typeof _ == "string"))
|
|
1110
|
+
throw new T(ve, {
|
|
1111
|
+
stringValues: a.filter((_) => typeof _ == "string")
|
|
992
1112
|
});
|
|
993
|
-
return
|
|
994
|
-
const
|
|
995
|
-
if (
|
|
996
|
-
throw new
|
|
997
|
-
formattedNumericalValues:
|
|
1113
|
+
return L(n, (_) => {
|
|
1114
|
+
const N = As({ enumKeys: r, enumValues: a, variant: _ });
|
|
1115
|
+
if (N < 0)
|
|
1116
|
+
throw new T(Ot, {
|
|
1117
|
+
formattedNumericalValues: zt(i),
|
|
998
1118
|
numericalValues: i,
|
|
999
|
-
stringValues:
|
|
1000
|
-
variant:
|
|
1119
|
+
stringValues: s,
|
|
1120
|
+
variant: _
|
|
1001
1121
|
});
|
|
1002
|
-
return o ? a[
|
|
1122
|
+
return o ? a[N] : N;
|
|
1003
1123
|
});
|
|
1004
1124
|
}
|
|
1005
|
-
function
|
|
1006
|
-
const n = t.size ??
|
|
1007
|
-
if (o && a.some((
|
|
1008
|
-
throw new
|
|
1009
|
-
stringValues: a.filter((
|
|
1125
|
+
function oe(e, t = {}) {
|
|
1126
|
+
const n = t.size ?? S(), o = t.useValuesAsDiscriminators ?? !1, { enumKeys: r, enumValues: a, numericalValues: i } = Vt(e);
|
|
1127
|
+
if (o && a.some((s) => typeof s == "string"))
|
|
1128
|
+
throw new T(ve, {
|
|
1129
|
+
stringValues: a.filter((s) => typeof s == "string")
|
|
1010
1130
|
});
|
|
1011
|
-
return
|
|
1012
|
-
const
|
|
1013
|
-
discriminator:
|
|
1131
|
+
return q(n, (s) => {
|
|
1132
|
+
const _ = Number(s), N = ds({
|
|
1133
|
+
discriminator: _,
|
|
1014
1134
|
enumKeys: r,
|
|
1015
1135
|
enumValues: a,
|
|
1016
1136
|
useValuesAsDiscriminators: o
|
|
1017
1137
|
});
|
|
1018
|
-
if (
|
|
1019
|
-
const
|
|
1020
|
-
throw new
|
|
1021
|
-
discriminator:
|
|
1022
|
-
formattedValidDiscriminators:
|
|
1023
|
-
validDiscriminators:
|
|
1138
|
+
if (N < 0) {
|
|
1139
|
+
const I = o ? i : [...Array(r.length).keys()];
|
|
1140
|
+
throw new T(dt, {
|
|
1141
|
+
discriminator: _,
|
|
1142
|
+
formattedValidDiscriminators: zt(I),
|
|
1143
|
+
validDiscriminators: I
|
|
1024
1144
|
});
|
|
1025
1145
|
}
|
|
1026
|
-
return a[
|
|
1146
|
+
return a[N];
|
|
1027
1147
|
});
|
|
1028
1148
|
}
|
|
1029
|
-
function
|
|
1030
|
-
return
|
|
1149
|
+
function ae() {
|
|
1150
|
+
return b({
|
|
1031
1151
|
fixedSize: 0,
|
|
1032
1152
|
write: (e, t, n) => n
|
|
1033
1153
|
});
|
|
1034
1154
|
}
|
|
1035
|
-
function
|
|
1036
|
-
return
|
|
1155
|
+
function ie() {
|
|
1156
|
+
return P({
|
|
1037
1157
|
fixedSize: 0,
|
|
1038
1158
|
read: (e, t) => [void 0, t]
|
|
1039
1159
|
});
|
|
1040
1160
|
}
|
|
1041
|
-
function
|
|
1042
|
-
const t = e.map(([, r]) => r), n =
|
|
1043
|
-
return
|
|
1161
|
+
function O(e) {
|
|
1162
|
+
const t = e.map(([, r]) => r), n = Y(t.map(ee)), o = Y(t.map(Z)) ?? void 0;
|
|
1163
|
+
return b({
|
|
1044
1164
|
...n === null ? {
|
|
1045
|
-
getSizeFromValue: (r) => e.map(([a, i]) =>
|
|
1165
|
+
getSizeFromValue: (r) => e.map(([a, i]) => Q(r[a], i)).reduce((a, i) => a + i, 0),
|
|
1046
1166
|
maxSize: o
|
|
1047
1167
|
} : { fixedSize: n },
|
|
1048
|
-
write: (r, a, i) => (e.forEach(([
|
|
1049
|
-
i =
|
|
1168
|
+
write: (r, a, i) => (e.forEach(([s, _]) => {
|
|
1169
|
+
i = _.write(r[s], a, i);
|
|
1050
1170
|
}), i)
|
|
1051
1171
|
});
|
|
1052
1172
|
}
|
|
1053
|
-
function
|
|
1054
|
-
const t = e.map(([, r]) => r), n =
|
|
1055
|
-
return
|
|
1173
|
+
function E(e) {
|
|
1174
|
+
const t = e.map(([, r]) => r), n = Y(t.map(ee)), o = Y(t.map(Z)) ?? void 0;
|
|
1175
|
+
return P({
|
|
1056
1176
|
...n === null ? { maxSize: o } : { fixedSize: n },
|
|
1057
1177
|
read: (r, a) => {
|
|
1058
1178
|
const i = {};
|
|
1059
|
-
return e.forEach(([
|
|
1060
|
-
const [
|
|
1061
|
-
a =
|
|
1179
|
+
return e.forEach(([s, _]) => {
|
|
1180
|
+
const [N, I] = _.read(r, a);
|
|
1181
|
+
a = I, i[s] = N;
|
|
1062
1182
|
}), [i, a];
|
|
1063
1183
|
}
|
|
1064
1184
|
});
|
|
1065
1185
|
}
|
|
1066
|
-
var
|
|
1067
|
-
function
|
|
1068
|
-
const n = t.prefix === null ?
|
|
1069
|
-
}) :
|
|
1070
|
-
return
|
|
1186
|
+
var Ht = (e) => ({ __option: "Some", value: e }), Wt = () => ({ __option: "None" }), We = (e) => !!(e && typeof e == "object" && "__option" in e && (e.__option === "Some" && "value" in e || e.__option === "None")), $e = (e) => e.__option === "Some", ls = (e) => e !== null ? Ht(e) : Wt();
|
|
1187
|
+
function Os(e, t = {}) {
|
|
1188
|
+
const n = t.prefix === null ? L(ae(), (r) => {
|
|
1189
|
+
}) : Mt({ size: t.prefix ?? R() }), o = t.noneValue === "zeroes" ? (It(e), g(ae(), e.fixedSize)) : t.noneValue ? cs(t.noneValue) : ae();
|
|
1190
|
+
return xt(
|
|
1071
1191
|
[
|
|
1072
|
-
|
|
1192
|
+
L(Ie([n, o]), (r) => [
|
|
1073
1193
|
!1,
|
|
1074
1194
|
void 0
|
|
1075
1195
|
]),
|
|
1076
|
-
|
|
1196
|
+
L(Ie([n, e]), (r) => [
|
|
1077
1197
|
!0,
|
|
1078
|
-
|
|
1198
|
+
We(r) && $e(r) ? r.value : r
|
|
1079
1199
|
])
|
|
1080
1200
|
],
|
|
1081
1201
|
(r) => {
|
|
1082
|
-
const a =
|
|
1083
|
-
return Number(
|
|
1202
|
+
const a = We(r) ? r : ls(r);
|
|
1203
|
+
return Number($e(a));
|
|
1084
1204
|
}
|
|
1085
1205
|
);
|
|
1086
1206
|
}
|
|
1087
|
-
function
|
|
1088
|
-
const n = t.prefix === null ?
|
|
1089
|
-
return
|
|
1207
|
+
function Es(e, t = {}) {
|
|
1208
|
+
const n = t.prefix === null ? q(ie(), () => !1) : yt({ size: t.prefix ?? S() }), o = t.noneValue === "zeroes" ? (It(e), m(ie(), e.fixedSize)) : t.noneValue ? us(t.noneValue) : ie();
|
|
1209
|
+
return kt(
|
|
1090
1210
|
[
|
|
1091
|
-
|
|
1092
|
-
|
|
1211
|
+
q(ge([n, o]), () => Wt()),
|
|
1212
|
+
q(ge([n, e]), ([, r]) => Ht(r))
|
|
1093
1213
|
],
|
|
1094
1214
|
(r, a) => {
|
|
1095
1215
|
if (t.prefix === null && !t.noneValue)
|
|
1096
1216
|
return +(a < r.length);
|
|
1097
1217
|
if (t.prefix === null && t.noneValue != null) {
|
|
1098
1218
|
const i = t.noneValue === "zeroes" ? new Uint8Array(o.fixedSize).fill(0) : t.noneValue;
|
|
1099
|
-
return
|
|
1219
|
+
return G(r, i, a) ? 0 : 1;
|
|
1100
1220
|
}
|
|
1101
1221
|
return Number(n.read(r, a)[0]);
|
|
1102
1222
|
}
|
|
1103
1223
|
);
|
|
1104
1224
|
}
|
|
1105
|
-
function
|
|
1225
|
+
function W(e) {
|
|
1106
1226
|
if (e.accounts === void 0)
|
|
1107
|
-
throw new
|
|
1227
|
+
throw new T(ot, {
|
|
1108
1228
|
data: e.data,
|
|
1109
1229
|
programAddress: e.programAddress
|
|
1110
1230
|
});
|
|
1111
1231
|
}
|
|
1112
|
-
var
|
|
1232
|
+
var se = /* @__PURE__ */ ((e) => (e[e.WRITABLE_SIGNER = /* 3 */
|
|
1113
1233
|
3] = "WRITABLE_SIGNER", e[e.READONLY_SIGNER = /* 2 */
|
|
1114
1234
|
2] = "READONLY_SIGNER", e[e.WRITABLE = /* 1 */
|
|
1115
1235
|
1] = "WRITABLE", e[e.READONLY = /* 0 */
|
|
1116
|
-
0] = "READONLY", e))(
|
|
1117
|
-
function
|
|
1118
|
-
return e |
|
|
1236
|
+
0] = "READONLY", e))(se || {}), Ns = 2;
|
|
1237
|
+
function Ts(e) {
|
|
1238
|
+
return e | Ns;
|
|
1119
1239
|
}
|
|
1120
|
-
function
|
|
1121
|
-
if (!
|
|
1240
|
+
function fs(e, t, n, o) {
|
|
1241
|
+
if (!St(e, at))
|
|
1122
1242
|
return !1;
|
|
1123
1243
|
const r = t.instructions[e.context.index]?.programAddress;
|
|
1124
1244
|
return !r || r !== n ? !1 : typeof o > "u" || e.context.code === o;
|
|
1125
1245
|
}
|
|
1126
|
-
function
|
|
1246
|
+
function Ss(e) {
|
|
1127
1247
|
return "modifyAndSignTransactions" in e && typeof e.modifyAndSignTransactions == "function";
|
|
1128
1248
|
}
|
|
1129
|
-
function
|
|
1249
|
+
function Is(e) {
|
|
1130
1250
|
return "signTransactions" in e && typeof e.signTransactions == "function";
|
|
1131
1251
|
}
|
|
1132
|
-
function
|
|
1252
|
+
function gs(e) {
|
|
1133
1253
|
return "signAndSendTransactions" in e && typeof e.signAndSendTransactions == "function";
|
|
1134
1254
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1255
|
+
function ms(e) {
|
|
1256
|
+
return Is(e) || Ss(e) || gs(e);
|
|
1137
1257
|
}
|
|
1138
|
-
const
|
|
1139
|
-
var
|
|
1140
|
-
function
|
|
1141
|
-
return
|
|
1258
|
+
const Cs = V, hs = F;
|
|
1259
|
+
var De = /* @__PURE__ */ ((e) => (e[e.Uninitialized = 0] = "Uninitialized", e[e.Closed = 1] = "Closed", e[e.GlobalConfig = 2] = "GlobalConfig", e[e.Automation = 3] = "Automation", e))(De || {});
|
|
1260
|
+
function be() {
|
|
1261
|
+
return re(De);
|
|
1142
1262
|
}
|
|
1143
|
-
function
|
|
1144
|
-
return
|
|
1263
|
+
function Pe() {
|
|
1264
|
+
return oe(De);
|
|
1145
1265
|
}
|
|
1146
|
-
function
|
|
1147
|
-
return
|
|
1266
|
+
function K_() {
|
|
1267
|
+
return f(be(), Pe());
|
|
1148
1268
|
}
|
|
1149
|
-
var
|
|
1150
|
-
function
|
|
1151
|
-
return
|
|
1269
|
+
var Ue = /* @__PURE__ */ ((e) => (e[e.Uninitialized = 0] = "Uninitialized", e[e.HarvestAndReinvest = 1] = "HarvestAndReinvest", e[e.HarvestSwapAndReinvest = 2] = "HarvestSwapAndReinvest", e))(Ue || {});
|
|
1270
|
+
function $t() {
|
|
1271
|
+
return re(Ue);
|
|
1152
1272
|
}
|
|
1153
|
-
function
|
|
1154
|
-
return
|
|
1273
|
+
function Xt() {
|
|
1274
|
+
return oe(Ue);
|
|
1155
1275
|
}
|
|
1156
|
-
function
|
|
1157
|
-
return
|
|
1276
|
+
function j_() {
|
|
1277
|
+
return f($t(), Xt());
|
|
1158
1278
|
}
|
|
1159
|
-
function
|
|
1160
|
-
return
|
|
1161
|
-
["None",
|
|
1279
|
+
function Yt() {
|
|
1280
|
+
return te([
|
|
1281
|
+
["None", ae()],
|
|
1162
1282
|
[
|
|
1163
1283
|
"NextValidExecutionTimestamp",
|
|
1164
|
-
|
|
1165
|
-
["nextValidExecutionTimestamp",
|
|
1166
|
-
["minIntervalSeconds",
|
|
1284
|
+
O([
|
|
1285
|
+
["nextValidExecutionTimestamp", as()],
|
|
1286
|
+
["minIntervalSeconds", Os(Cs())]
|
|
1167
1287
|
])
|
|
1168
1288
|
],
|
|
1169
|
-
["MinFeesOwedA",
|
|
1170
|
-
["MinFeesOwedB",
|
|
1289
|
+
["MinFeesOwedA", O([["minFeesOwedA", d()]])],
|
|
1290
|
+
["MinFeesOwedB", O([["minFeesOwedB", d()]])]
|
|
1171
1291
|
]);
|
|
1172
1292
|
}
|
|
1173
|
-
function
|
|
1174
|
-
return
|
|
1175
|
-
["None",
|
|
1293
|
+
function Kt() {
|
|
1294
|
+
return ne([
|
|
1295
|
+
["None", ie()],
|
|
1176
1296
|
[
|
|
1177
1297
|
"NextValidExecutionTimestamp",
|
|
1178
|
-
|
|
1179
|
-
["nextValidExecutionTimestamp",
|
|
1180
|
-
["minIntervalSeconds",
|
|
1298
|
+
E([
|
|
1299
|
+
["nextValidExecutionTimestamp", is()],
|
|
1300
|
+
["minIntervalSeconds", Es(hs())]
|
|
1181
1301
|
])
|
|
1182
1302
|
],
|
|
1183
|
-
["MinFeesOwedA",
|
|
1184
|
-
["MinFeesOwedB",
|
|
1303
|
+
["MinFeesOwedA", E([["minFeesOwedA", l()]])],
|
|
1304
|
+
["MinFeesOwedB", E([["minFeesOwedB", l()]])]
|
|
1185
1305
|
]);
|
|
1186
1306
|
}
|
|
1187
|
-
function
|
|
1188
|
-
return
|
|
1307
|
+
function J_() {
|
|
1308
|
+
return f(Yt(), Kt());
|
|
1189
1309
|
}
|
|
1190
|
-
function
|
|
1310
|
+
function Z_(e, t) {
|
|
1191
1311
|
return Array.isArray(t) ? { __kind: e, fields: t } : { __kind: e, ...t ?? {} };
|
|
1192
1312
|
}
|
|
1193
|
-
function
|
|
1313
|
+
function q_(e, t) {
|
|
1194
1314
|
return t.__kind === e;
|
|
1195
1315
|
}
|
|
1196
|
-
function
|
|
1197
|
-
return
|
|
1316
|
+
function vs() {
|
|
1317
|
+
return te([
|
|
1198
1318
|
[
|
|
1199
1319
|
"CrankRewardDefaultUpdated",
|
|
1200
|
-
|
|
1201
|
-
["newCrankRewardDefault",
|
|
1202
|
-
["prevCrankRewardDefault",
|
|
1203
|
-
["updatedBy",
|
|
1320
|
+
O([
|
|
1321
|
+
["newCrankRewardDefault", d()],
|
|
1322
|
+
["prevCrankRewardDefault", d()],
|
|
1323
|
+
["updatedBy", c()]
|
|
1204
1324
|
])
|
|
1205
1325
|
],
|
|
1206
1326
|
[
|
|
1207
1327
|
"GlobalConfigAuthorityUpdated",
|
|
1208
|
-
|
|
1209
|
-
["newGlobalConfigAuthority",
|
|
1210
|
-
["prevGlobalConfigAuthority",
|
|
1328
|
+
O([
|
|
1329
|
+
["newGlobalConfigAuthority", c()],
|
|
1330
|
+
["prevGlobalConfigAuthority", c()]
|
|
1211
1331
|
])
|
|
1212
1332
|
],
|
|
1213
1333
|
[
|
|
1214
1334
|
"AutomationCreated",
|
|
1215
|
-
|
|
1216
|
-
["automation",
|
|
1217
|
-
["positionTokenAccount",
|
|
1218
|
-
["actionData",
|
|
1219
|
-
["automationIndex",
|
|
1220
|
-
["conditionsData",
|
|
1221
|
-
["crankReward",
|
|
1335
|
+
O([
|
|
1336
|
+
["automation", c()],
|
|
1337
|
+
["positionTokenAccount", c()],
|
|
1338
|
+
["actionData", g(C(), 64)],
|
|
1339
|
+
["automationIndex", R()],
|
|
1340
|
+
["conditionsData", g(C(), 192)],
|
|
1341
|
+
["crankReward", d()]
|
|
1222
1342
|
])
|
|
1223
1343
|
],
|
|
1224
1344
|
[
|
|
1225
1345
|
"AutomationRemoved",
|
|
1226
|
-
|
|
1227
|
-
["automation",
|
|
1228
|
-
["positionTokenAccount",
|
|
1229
|
-
["actionData",
|
|
1230
|
-
["automationIndex",
|
|
1231
|
-
["conditionsData",
|
|
1232
|
-
["crankReward",
|
|
1346
|
+
O([
|
|
1347
|
+
["automation", c()],
|
|
1348
|
+
["positionTokenAccount", c()],
|
|
1349
|
+
["actionData", g(C(), 64)],
|
|
1350
|
+
["automationIndex", R()],
|
|
1351
|
+
["conditionsData", g(C(), 192)],
|
|
1352
|
+
["crankReward", d()]
|
|
1233
1353
|
])
|
|
1234
1354
|
],
|
|
1235
1355
|
[
|
|
1236
1356
|
"AutomationFunded",
|
|
1237
|
-
|
|
1238
|
-
["automation",
|
|
1239
|
-
["payer",
|
|
1240
|
-
["amountFunded",
|
|
1241
|
-
["method",
|
|
1242
|
-
["value",
|
|
1357
|
+
O([
|
|
1358
|
+
["automation", c()],
|
|
1359
|
+
["payer", c()],
|
|
1360
|
+
["amountFunded", d()],
|
|
1361
|
+
["method", jt()],
|
|
1362
|
+
["value", V()]
|
|
1243
1363
|
])
|
|
1244
1364
|
],
|
|
1245
1365
|
[
|
|
1246
1366
|
"HarvestedAndReinvested",
|
|
1247
|
-
|
|
1248
|
-
["automation",
|
|
1249
|
-
["positionTokenAccount",
|
|
1250
|
-
["automationIndex",
|
|
1251
|
-
["conditionsData",
|
|
1252
|
-
["feesCollectedA",
|
|
1253
|
-
["feesCollectedB",
|
|
1254
|
-
["liquidityIncreasedA",
|
|
1255
|
-
["liquidityIncreasedB",
|
|
1256
|
-
["crankReward",
|
|
1367
|
+
O([
|
|
1368
|
+
["automation", c()],
|
|
1369
|
+
["positionTokenAccount", c()],
|
|
1370
|
+
["automationIndex", R()],
|
|
1371
|
+
["conditionsData", g(C(), 192)],
|
|
1372
|
+
["feesCollectedA", d()],
|
|
1373
|
+
["feesCollectedB", d()],
|
|
1374
|
+
["liquidityIncreasedA", d()],
|
|
1375
|
+
["liquidityIncreasedB", d()],
|
|
1376
|
+
["crankReward", d()]
|
|
1257
1377
|
])
|
|
1258
1378
|
],
|
|
1259
1379
|
[
|
|
1260
1380
|
"HarvestSwapAndReinvestPre",
|
|
1261
|
-
|
|
1262
|
-
["automation",
|
|
1263
|
-
["positionTokenAccount",
|
|
1264
|
-
["automationIndex",
|
|
1265
|
-
["conditionsData",
|
|
1266
|
-
["feesCollectedA",
|
|
1267
|
-
["feesCollectedB",
|
|
1381
|
+
O([
|
|
1382
|
+
["automation", c()],
|
|
1383
|
+
["positionTokenAccount", c()],
|
|
1384
|
+
["automationIndex", R()],
|
|
1385
|
+
["conditionsData", g(C(), 192)],
|
|
1386
|
+
["feesCollectedA", d()],
|
|
1387
|
+
["feesCollectedB", d()]
|
|
1268
1388
|
])
|
|
1269
1389
|
],
|
|
1270
1390
|
[
|
|
1271
1391
|
"HarvestSwapAndReinvestPost",
|
|
1272
|
-
|
|
1273
|
-
["automation",
|
|
1274
|
-
["positionTokenAccount",
|
|
1275
|
-
["postSwapAmountA",
|
|
1276
|
-
["postSwapAmountB",
|
|
1277
|
-
["liquidityIncreasedA",
|
|
1278
|
-
["liquidityIncreasedB",
|
|
1279
|
-
["crankReward",
|
|
1280
|
-
["amountToTransferToUserA",
|
|
1281
|
-
["amountToTransferToUserB",
|
|
1392
|
+
O([
|
|
1393
|
+
["automation", c()],
|
|
1394
|
+
["positionTokenAccount", c()],
|
|
1395
|
+
["postSwapAmountA", d()],
|
|
1396
|
+
["postSwapAmountB", d()],
|
|
1397
|
+
["liquidityIncreasedA", d()],
|
|
1398
|
+
["liquidityIncreasedB", d()],
|
|
1399
|
+
["crankReward", d()],
|
|
1400
|
+
["amountToTransferToUserA", d()],
|
|
1401
|
+
["amountToTransferToUserB", d()]
|
|
1282
1402
|
])
|
|
1283
1403
|
]
|
|
1284
1404
|
]);
|
|
1285
1405
|
}
|
|
1286
|
-
function
|
|
1287
|
-
return
|
|
1406
|
+
function Ls() {
|
|
1407
|
+
return ne([
|
|
1288
1408
|
[
|
|
1289
1409
|
"CrankRewardDefaultUpdated",
|
|
1290
|
-
|
|
1291
|
-
["newCrankRewardDefault",
|
|
1292
|
-
["prevCrankRewardDefault",
|
|
1410
|
+
E([
|
|
1411
|
+
["newCrankRewardDefault", l()],
|
|
1412
|
+
["prevCrankRewardDefault", l()],
|
|
1293
1413
|
["updatedBy", u()]
|
|
1294
1414
|
])
|
|
1295
1415
|
],
|
|
1296
1416
|
[
|
|
1297
1417
|
"GlobalConfigAuthorityUpdated",
|
|
1298
|
-
|
|
1418
|
+
E([
|
|
1299
1419
|
["newGlobalConfigAuthority", u()],
|
|
1300
1420
|
["prevGlobalConfigAuthority", u()]
|
|
1301
1421
|
])
|
|
1302
1422
|
],
|
|
1303
1423
|
[
|
|
1304
1424
|
"AutomationCreated",
|
|
1305
|
-
|
|
1425
|
+
E([
|
|
1306
1426
|
["automation", u()],
|
|
1307
1427
|
["positionTokenAccount", u()],
|
|
1308
|
-
["actionData",
|
|
1309
|
-
["automationIndex",
|
|
1310
|
-
["conditionsData",
|
|
1311
|
-
["crankReward",
|
|
1428
|
+
["actionData", m(h(), 64)],
|
|
1429
|
+
["automationIndex", S()],
|
|
1430
|
+
["conditionsData", m(h(), 192)],
|
|
1431
|
+
["crankReward", l()]
|
|
1312
1432
|
])
|
|
1313
1433
|
],
|
|
1314
1434
|
[
|
|
1315
1435
|
"AutomationRemoved",
|
|
1316
|
-
|
|
1436
|
+
E([
|
|
1317
1437
|
["automation", u()],
|
|
1318
1438
|
["positionTokenAccount", u()],
|
|
1319
|
-
["actionData",
|
|
1320
|
-
["automationIndex",
|
|
1321
|
-
["conditionsData",
|
|
1322
|
-
["crankReward",
|
|
1439
|
+
["actionData", m(h(), 64)],
|
|
1440
|
+
["automationIndex", S()],
|
|
1441
|
+
["conditionsData", m(h(), 192)],
|
|
1442
|
+
["crankReward", l()]
|
|
1323
1443
|
])
|
|
1324
1444
|
],
|
|
1325
1445
|
[
|
|
1326
1446
|
"AutomationFunded",
|
|
1327
|
-
|
|
1447
|
+
E([
|
|
1328
1448
|
["automation", u()],
|
|
1329
1449
|
["payer", u()],
|
|
1330
|
-
["amountFunded",
|
|
1331
|
-
["method",
|
|
1332
|
-
["value",
|
|
1450
|
+
["amountFunded", l()],
|
|
1451
|
+
["method", Jt()],
|
|
1452
|
+
["value", F()]
|
|
1333
1453
|
])
|
|
1334
1454
|
],
|
|
1335
1455
|
[
|
|
1336
1456
|
"HarvestedAndReinvested",
|
|
1337
|
-
|
|
1457
|
+
E([
|
|
1338
1458
|
["automation", u()],
|
|
1339
1459
|
["positionTokenAccount", u()],
|
|
1340
|
-
["automationIndex",
|
|
1341
|
-
["conditionsData",
|
|
1342
|
-
["feesCollectedA",
|
|
1343
|
-
["feesCollectedB",
|
|
1344
|
-
["liquidityIncreasedA",
|
|
1345
|
-
["liquidityIncreasedB",
|
|
1346
|
-
["crankReward",
|
|
1460
|
+
["automationIndex", S()],
|
|
1461
|
+
["conditionsData", m(h(), 192)],
|
|
1462
|
+
["feesCollectedA", l()],
|
|
1463
|
+
["feesCollectedB", l()],
|
|
1464
|
+
["liquidityIncreasedA", l()],
|
|
1465
|
+
["liquidityIncreasedB", l()],
|
|
1466
|
+
["crankReward", l()]
|
|
1347
1467
|
])
|
|
1348
1468
|
],
|
|
1349
1469
|
[
|
|
1350
1470
|
"HarvestSwapAndReinvestPre",
|
|
1351
|
-
|
|
1471
|
+
E([
|
|
1352
1472
|
["automation", u()],
|
|
1353
1473
|
["positionTokenAccount", u()],
|
|
1354
|
-
["automationIndex",
|
|
1355
|
-
["conditionsData",
|
|
1356
|
-
["feesCollectedA",
|
|
1357
|
-
["feesCollectedB",
|
|
1474
|
+
["automationIndex", S()],
|
|
1475
|
+
["conditionsData", m(h(), 192)],
|
|
1476
|
+
["feesCollectedA", l()],
|
|
1477
|
+
["feesCollectedB", l()]
|
|
1358
1478
|
])
|
|
1359
1479
|
],
|
|
1360
1480
|
[
|
|
1361
1481
|
"HarvestSwapAndReinvestPost",
|
|
1362
|
-
|
|
1482
|
+
E([
|
|
1363
1483
|
["automation", u()],
|
|
1364
1484
|
["positionTokenAccount", u()],
|
|
1365
|
-
["postSwapAmountA",
|
|
1366
|
-
["postSwapAmountB",
|
|
1367
|
-
["liquidityIncreasedA",
|
|
1368
|
-
["liquidityIncreasedB",
|
|
1369
|
-
["crankReward",
|
|
1370
|
-
["amountToTransferToUserA",
|
|
1371
|
-
["amountToTransferToUserB",
|
|
1485
|
+
["postSwapAmountA", l()],
|
|
1486
|
+
["postSwapAmountB", l()],
|
|
1487
|
+
["liquidityIncreasedA", l()],
|
|
1488
|
+
["liquidityIncreasedB", l()],
|
|
1489
|
+
["crankReward", l()],
|
|
1490
|
+
["amountToTransferToUserA", l()],
|
|
1491
|
+
["amountToTransferToUserB", l()]
|
|
1372
1492
|
])
|
|
1373
1493
|
]
|
|
1374
1494
|
]);
|
|
1375
1495
|
}
|
|
1376
|
-
function
|
|
1377
|
-
return
|
|
1496
|
+
function Q_() {
|
|
1497
|
+
return f(vs(), Ls());
|
|
1378
1498
|
}
|
|
1379
|
-
function
|
|
1499
|
+
function ec(e, t) {
|
|
1380
1500
|
return Array.isArray(t) ? { __kind: e, fields: t } : { __kind: e, ...t ?? {} };
|
|
1381
1501
|
}
|
|
1382
|
-
function
|
|
1502
|
+
function tc(e, t) {
|
|
1383
1503
|
return t.__kind === e;
|
|
1384
1504
|
}
|
|
1385
|
-
var
|
|
1386
|
-
function
|
|
1387
|
-
return
|
|
1505
|
+
var we = /* @__PURE__ */ ((e) => (e[e.FundByCount = 0] = "FundByCount", e[e.FundByDuration = 1] = "FundByDuration", e))(we || {});
|
|
1506
|
+
function jt() {
|
|
1507
|
+
return re(we);
|
|
1388
1508
|
}
|
|
1389
|
-
function
|
|
1390
|
-
return
|
|
1509
|
+
function Jt() {
|
|
1510
|
+
return oe(we);
|
|
1391
1511
|
}
|
|
1392
|
-
function
|
|
1393
|
-
return
|
|
1512
|
+
function nc() {
|
|
1513
|
+
return f(jt(), Jt());
|
|
1394
1514
|
}
|
|
1395
|
-
function
|
|
1396
|
-
return
|
|
1397
|
-
["FundByCount",
|
|
1398
|
-
["FundByDuration",
|
|
1515
|
+
function Zt() {
|
|
1516
|
+
return te([
|
|
1517
|
+
["FundByCount", O([["count", V()]])],
|
|
1518
|
+
["FundByDuration", O([["durationSeconds", V()]])]
|
|
1399
1519
|
]);
|
|
1400
1520
|
}
|
|
1401
|
-
function
|
|
1402
|
-
return
|
|
1403
|
-
["FundByCount",
|
|
1404
|
-
["FundByDuration",
|
|
1521
|
+
function qt() {
|
|
1522
|
+
return ne([
|
|
1523
|
+
["FundByCount", E([["count", F()]])],
|
|
1524
|
+
["FundByDuration", E([["durationSeconds", F()]])]
|
|
1405
1525
|
]);
|
|
1406
1526
|
}
|
|
1407
|
-
function
|
|
1408
|
-
return
|
|
1527
|
+
function rc() {
|
|
1528
|
+
return f(Zt(), qt());
|
|
1409
1529
|
}
|
|
1410
|
-
function
|
|
1530
|
+
function oc(e, t) {
|
|
1411
1531
|
return Array.isArray(t) ? { __kind: e, fields: t } : { __kind: e, ...t ?? {} };
|
|
1412
1532
|
}
|
|
1413
|
-
function
|
|
1533
|
+
function ac(e, t) {
|
|
1414
1534
|
return t.__kind === e;
|
|
1415
1535
|
}
|
|
1416
|
-
var
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
1536
|
+
var Me = /* @__PURE__ */ ((e) => (e[e.TransferHookA = 0] = "TransferHookA", e[e.TransferHookB = 1] = "TransferHookB", e[e.TransferHookReward = 2] = "TransferHookReward", e[e.TransferHookInput = 3] = "TransferHookInput", e[e.TransferHookIntermediate = 4] = "TransferHookIntermediate", e[e.TransferHookOutput = 5] = "TransferHookOutput", e[e.SupplementalTickArrays = 6] = "SupplementalTickArrays", e[e.SupplementalTickArraysOne = 7] = "SupplementalTickArraysOne", e[e.SupplementalTickArraysTwo = 8] = "SupplementalTickArraysTwo", e))(Me || {});
|
|
1537
|
+
function Qt() {
|
|
1538
|
+
return re(Me);
|
|
1419
1539
|
}
|
|
1420
|
-
function
|
|
1421
|
-
return
|
|
1540
|
+
function en() {
|
|
1541
|
+
return oe(Me);
|
|
1422
1542
|
}
|
|
1423
|
-
function
|
|
1424
|
-
return
|
|
1425
|
-
|
|
1426
|
-
|
|
1543
|
+
function ic() {
|
|
1544
|
+
return f(
|
|
1545
|
+
Qt(),
|
|
1546
|
+
en()
|
|
1427
1547
|
);
|
|
1428
1548
|
}
|
|
1429
|
-
function
|
|
1430
|
-
return
|
|
1431
|
-
["slices",
|
|
1549
|
+
function ps() {
|
|
1550
|
+
return O([
|
|
1551
|
+
["slices", ue(tn())]
|
|
1432
1552
|
]);
|
|
1433
1553
|
}
|
|
1434
|
-
function
|
|
1435
|
-
return
|
|
1436
|
-
["slices",
|
|
1554
|
+
function Ds() {
|
|
1555
|
+
return E([
|
|
1556
|
+
["slices", Re(nn())]
|
|
1437
1557
|
]);
|
|
1438
1558
|
}
|
|
1439
|
-
function
|
|
1440
|
-
return
|
|
1441
|
-
|
|
1442
|
-
|
|
1559
|
+
function sc() {
|
|
1560
|
+
return f(
|
|
1561
|
+
ps(),
|
|
1562
|
+
Ds()
|
|
1443
1563
|
);
|
|
1444
1564
|
}
|
|
1445
|
-
function
|
|
1446
|
-
return
|
|
1447
|
-
["accountsType",
|
|
1448
|
-
["length",
|
|
1565
|
+
function tn() {
|
|
1566
|
+
return O([
|
|
1567
|
+
["accountsType", Qt()],
|
|
1568
|
+
["length", R()]
|
|
1449
1569
|
]);
|
|
1450
1570
|
}
|
|
1451
|
-
function
|
|
1452
|
-
return
|
|
1453
|
-
["accountsType",
|
|
1454
|
-
["length",
|
|
1571
|
+
function nn() {
|
|
1572
|
+
return E([
|
|
1573
|
+
["accountsType", en()],
|
|
1574
|
+
["length", S()]
|
|
1455
1575
|
]);
|
|
1456
1576
|
}
|
|
1457
|
-
function
|
|
1458
|
-
return
|
|
1459
|
-
|
|
1460
|
-
|
|
1577
|
+
function _c() {
|
|
1578
|
+
return f(
|
|
1579
|
+
tn(),
|
|
1580
|
+
nn()
|
|
1461
1581
|
);
|
|
1462
1582
|
}
|
|
1463
|
-
function
|
|
1464
|
-
return
|
|
1583
|
+
function bs() {
|
|
1584
|
+
return te([
|
|
1465
1585
|
[
|
|
1466
1586
|
"ByTokenAmounts",
|
|
1467
|
-
|
|
1468
|
-
["tokenMaxA",
|
|
1469
|
-
["tokenMaxB",
|
|
1470
|
-
["minSqrtPrice",
|
|
1471
|
-
["maxSqrtPrice",
|
|
1587
|
+
O([
|
|
1588
|
+
["tokenMaxA", d()],
|
|
1589
|
+
["tokenMaxB", d()],
|
|
1590
|
+
["minSqrtPrice", w()],
|
|
1591
|
+
["maxSqrtPrice", w()]
|
|
1472
1592
|
])
|
|
1473
1593
|
]
|
|
1474
1594
|
]);
|
|
1475
1595
|
}
|
|
1476
|
-
function
|
|
1477
|
-
return
|
|
1596
|
+
function Ps() {
|
|
1597
|
+
return ne([
|
|
1478
1598
|
[
|
|
1479
1599
|
"ByTokenAmounts",
|
|
1480
|
-
|
|
1481
|
-
["tokenMaxA",
|
|
1482
|
-
["tokenMaxB",
|
|
1483
|
-
["minSqrtPrice",
|
|
1484
|
-
["maxSqrtPrice",
|
|
1600
|
+
E([
|
|
1601
|
+
["tokenMaxA", l()],
|
|
1602
|
+
["tokenMaxB", l()],
|
|
1603
|
+
["minSqrtPrice", M()],
|
|
1604
|
+
["maxSqrtPrice", M()]
|
|
1485
1605
|
])
|
|
1486
1606
|
]
|
|
1487
1607
|
]);
|
|
1488
1608
|
}
|
|
1489
|
-
function
|
|
1490
|
-
return
|
|
1609
|
+
function cc() {
|
|
1610
|
+
return f(bs(), Ps());
|
|
1491
1611
|
}
|
|
1492
|
-
function
|
|
1612
|
+
function uc(e, t) {
|
|
1493
1613
|
return Array.isArray(t) ? { __kind: e, fields: t } : { __kind: e, ...t ?? {} };
|
|
1494
1614
|
}
|
|
1495
|
-
function
|
|
1615
|
+
function Rc(e, t) {
|
|
1496
1616
|
return t.__kind === e;
|
|
1497
1617
|
}
|
|
1498
|
-
function
|
|
1499
|
-
return
|
|
1500
|
-
["discriminator",
|
|
1501
|
-
["whirlpool",
|
|
1502
|
-
["positionMint",
|
|
1503
|
-
["liquidity",
|
|
1504
|
-
["tickLowerIndex",
|
|
1505
|
-
["tickUpperIndex",
|
|
1506
|
-
["feeGrowthCheckpointA",
|
|
1507
|
-
["feeOwedA",
|
|
1508
|
-
["feeGrowthCheckpointB",
|
|
1509
|
-
["feeOwedB",
|
|
1510
|
-
["rewardInfos",
|
|
1618
|
+
function Us() {
|
|
1619
|
+
return O([
|
|
1620
|
+
["discriminator", g(C(), 8)],
|
|
1621
|
+
["whirlpool", c()],
|
|
1622
|
+
["positionMint", c()],
|
|
1623
|
+
["liquidity", w()],
|
|
1624
|
+
["tickLowerIndex", fe()],
|
|
1625
|
+
["tickUpperIndex", fe()],
|
|
1626
|
+
["feeGrowthCheckpointA", w()],
|
|
1627
|
+
["feeOwedA", d()],
|
|
1628
|
+
["feeGrowthCheckpointB", w()],
|
|
1629
|
+
["feeOwedB", d()],
|
|
1630
|
+
["rewardInfos", ue(rn(), { size: 3 })]
|
|
1511
1631
|
]);
|
|
1512
1632
|
}
|
|
1513
|
-
function
|
|
1514
|
-
return
|
|
1515
|
-
["discriminator",
|
|
1633
|
+
function ws() {
|
|
1634
|
+
return E([
|
|
1635
|
+
["discriminator", m(h(), 8)],
|
|
1516
1636
|
["whirlpool", u()],
|
|
1517
1637
|
["positionMint", u()],
|
|
1518
|
-
["liquidity",
|
|
1519
|
-
["tickLowerIndex",
|
|
1520
|
-
["tickUpperIndex",
|
|
1521
|
-
["feeGrowthCheckpointA",
|
|
1522
|
-
["feeOwedA",
|
|
1523
|
-
["feeGrowthCheckpointB",
|
|
1524
|
-
["feeOwedB",
|
|
1525
|
-
["rewardInfos",
|
|
1638
|
+
["liquidity", M()],
|
|
1639
|
+
["tickLowerIndex", Se()],
|
|
1640
|
+
["tickUpperIndex", Se()],
|
|
1641
|
+
["feeGrowthCheckpointA", M()],
|
|
1642
|
+
["feeOwedA", l()],
|
|
1643
|
+
["feeGrowthCheckpointB", M()],
|
|
1644
|
+
["feeOwedB", l()],
|
|
1645
|
+
["rewardInfos", Re(on(), { size: 3 })]
|
|
1526
1646
|
]);
|
|
1527
1647
|
}
|
|
1528
|
-
function
|
|
1529
|
-
return
|
|
1648
|
+
function Ac() {
|
|
1649
|
+
return f(Us(), ws());
|
|
1530
1650
|
}
|
|
1531
|
-
function
|
|
1532
|
-
return
|
|
1533
|
-
["growthInsideCheckpoint",
|
|
1534
|
-
["amountOwed",
|
|
1651
|
+
function rn() {
|
|
1652
|
+
return O([
|
|
1653
|
+
["growthInsideCheckpoint", w()],
|
|
1654
|
+
["amountOwed", d()]
|
|
1535
1655
|
]);
|
|
1536
1656
|
}
|
|
1537
|
-
function
|
|
1538
|
-
return
|
|
1539
|
-
["growthInsideCheckpoint",
|
|
1540
|
-
["amountOwed",
|
|
1657
|
+
function on() {
|
|
1658
|
+
return E([
|
|
1659
|
+
["growthInsideCheckpoint", M()],
|
|
1660
|
+
["amountOwed", l()]
|
|
1541
1661
|
]);
|
|
1542
1662
|
}
|
|
1543
|
-
function
|
|
1544
|
-
return
|
|
1545
|
-
}
|
|
1546
|
-
function
|
|
1547
|
-
return
|
|
1548
|
-
["mint",
|
|
1549
|
-
["owner",
|
|
1550
|
-
["amount",
|
|
1551
|
-
["delegateFlag",
|
|
1552
|
-
["delegate",
|
|
1553
|
-
["state",
|
|
1554
|
-
["isNativeFlag",
|
|
1555
|
-
["nativeAmount",
|
|
1556
|
-
["delegateAmount",
|
|
1557
|
-
["closeAuthorityFlag",
|
|
1558
|
-
["closeAuthority",
|
|
1663
|
+
function dc() {
|
|
1664
|
+
return f(rn(), on());
|
|
1665
|
+
}
|
|
1666
|
+
function Ms() {
|
|
1667
|
+
return O([
|
|
1668
|
+
["mint", c()],
|
|
1669
|
+
["owner", c()],
|
|
1670
|
+
["amount", d()],
|
|
1671
|
+
["delegateFlag", V()],
|
|
1672
|
+
["delegate", c()],
|
|
1673
|
+
["state", an()],
|
|
1674
|
+
["isNativeFlag", V()],
|
|
1675
|
+
["nativeAmount", d()],
|
|
1676
|
+
["delegateAmount", d()],
|
|
1677
|
+
["closeAuthorityFlag", V()],
|
|
1678
|
+
["closeAuthority", c()]
|
|
1559
1679
|
]);
|
|
1560
1680
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return
|
|
1681
|
+
function ys() {
|
|
1682
|
+
return E([
|
|
1563
1683
|
["mint", u()],
|
|
1564
1684
|
["owner", u()],
|
|
1565
|
-
["amount",
|
|
1566
|
-
["delegateFlag",
|
|
1685
|
+
["amount", l()],
|
|
1686
|
+
["delegateFlag", F()],
|
|
1567
1687
|
["delegate", u()],
|
|
1568
|
-
["state",
|
|
1569
|
-
["isNativeFlag",
|
|
1570
|
-
["nativeAmount",
|
|
1571
|
-
["delegateAmount",
|
|
1572
|
-
["closeAuthorityFlag",
|
|
1688
|
+
["state", sn()],
|
|
1689
|
+
["isNativeFlag", F()],
|
|
1690
|
+
["nativeAmount", l()],
|
|
1691
|
+
["delegateAmount", l()],
|
|
1692
|
+
["closeAuthorityFlag", F()],
|
|
1573
1693
|
["closeAuthority", u()]
|
|
1574
1694
|
]);
|
|
1575
1695
|
}
|
|
1576
|
-
function
|
|
1577
|
-
return
|
|
1578
|
-
}
|
|
1579
|
-
var fe = /* @__PURE__ */ ((e) => (e[e.Uninitialized = 0] = "Uninitialized", e[e.Initialized = 1] = "Initialized", e[e.Frozen = 2] = "Frozen", e))(fe || {});
|
|
1580
|
-
function Ut() {
|
|
1581
|
-
return K(fe);
|
|
1696
|
+
function lc() {
|
|
1697
|
+
return f(Ms(), ys());
|
|
1582
1698
|
}
|
|
1583
|
-
|
|
1584
|
-
|
|
1699
|
+
var ye = /* @__PURE__ */ ((e) => (e[e.Uninitialized = 0] = "Uninitialized", e[e.Initialized = 1] = "Initialized", e[e.Frozen = 2] = "Frozen", e))(ye || {});
|
|
1700
|
+
function an() {
|
|
1701
|
+
return re(ye);
|
|
1585
1702
|
}
|
|
1586
|
-
function
|
|
1587
|
-
return
|
|
1588
|
-
}
|
|
1589
|
-
function
|
|
1590
|
-
return
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
["
|
|
1595
|
-
["
|
|
1596
|
-
["
|
|
1597
|
-
["
|
|
1703
|
+
function sn() {
|
|
1704
|
+
return oe(ye);
|
|
1705
|
+
}
|
|
1706
|
+
function Oc() {
|
|
1707
|
+
return f(an(), sn());
|
|
1708
|
+
}
|
|
1709
|
+
function xs() {
|
|
1710
|
+
return O([
|
|
1711
|
+
["mintAuthorityFlag", V()],
|
|
1712
|
+
["mintAuthority", c()],
|
|
1713
|
+
["supply", d()],
|
|
1714
|
+
["decimals", R()],
|
|
1715
|
+
["isInitialized", Mt()],
|
|
1716
|
+
["freezeAuthorityFlag", V()],
|
|
1717
|
+
["freezeAuthority", c()]
|
|
1598
1718
|
]);
|
|
1599
1719
|
}
|
|
1600
|
-
function
|
|
1601
|
-
return
|
|
1602
|
-
["mintAuthorityFlag",
|
|
1720
|
+
function ks() {
|
|
1721
|
+
return E([
|
|
1722
|
+
["mintAuthorityFlag", F()],
|
|
1603
1723
|
["mintAuthority", u()],
|
|
1604
|
-
["supply",
|
|
1605
|
-
["decimals",
|
|
1606
|
-
["isInitialized",
|
|
1607
|
-
["freezeAuthorityFlag",
|
|
1724
|
+
["supply", l()],
|
|
1725
|
+
["decimals", S()],
|
|
1726
|
+
["isInitialized", yt()],
|
|
1727
|
+
["freezeAuthorityFlag", F()],
|
|
1608
1728
|
["freezeAuthority", u()]
|
|
1609
1729
|
]);
|
|
1610
1730
|
}
|
|
1611
|
-
function
|
|
1612
|
-
return
|
|
1731
|
+
function Ec() {
|
|
1732
|
+
return f(xs(), ks());
|
|
1613
1733
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return
|
|
1616
|
-
["UpdateCrankRewardDefault",
|
|
1617
|
-
["UpdateGlobalConfigAuthority",
|
|
1734
|
+
function _n() {
|
|
1735
|
+
return te([
|
|
1736
|
+
["UpdateCrankRewardDefault", O([["newCrankRewardDefault", d()]])],
|
|
1737
|
+
["UpdateGlobalConfigAuthority", O([["newAuthority", c()]])]
|
|
1618
1738
|
]);
|
|
1619
1739
|
}
|
|
1620
|
-
function
|
|
1621
|
-
return
|
|
1622
|
-
["UpdateCrankRewardDefault",
|
|
1623
|
-
["UpdateGlobalConfigAuthority",
|
|
1740
|
+
function cn() {
|
|
1741
|
+
return ne([
|
|
1742
|
+
["UpdateCrankRewardDefault", E([["newCrankRewardDefault", l()]])],
|
|
1743
|
+
["UpdateGlobalConfigAuthority", E([["newAuthority", u()]])]
|
|
1624
1744
|
]);
|
|
1625
1745
|
}
|
|
1626
|
-
function
|
|
1627
|
-
return
|
|
1746
|
+
function Nc() {
|
|
1747
|
+
return f(_n(), cn());
|
|
1628
1748
|
}
|
|
1629
|
-
function
|
|
1749
|
+
function Tc(e, t) {
|
|
1630
1750
|
return Array.isArray(t) ? { __kind: e, fields: t } : { __kind: e, ...t ?? {} };
|
|
1631
1751
|
}
|
|
1632
|
-
function
|
|
1752
|
+
function fc(e, t) {
|
|
1633
1753
|
return t.__kind === e;
|
|
1634
1754
|
}
|
|
1635
|
-
function
|
|
1636
|
-
return
|
|
1637
|
-
["discriminator",
|
|
1638
|
-
["whirlpoolsConfig",
|
|
1639
|
-
["whirlpoolBump",
|
|
1640
|
-
["tickSpacing",
|
|
1641
|
-
["feeTierIndexSeed",
|
|
1642
|
-
["feeRate",
|
|
1643
|
-
["protocolFeeRate",
|
|
1644
|
-
["liquidity",
|
|
1645
|
-
["sqrtPrice",
|
|
1646
|
-
["tickCurrentIndex",
|
|
1647
|
-
["protocolFeeOwedA",
|
|
1648
|
-
["protocolFeeOwedB",
|
|
1649
|
-
["tokenMintA",
|
|
1650
|
-
["tokenVaultA",
|
|
1651
|
-
["feeGrowthGlobalA",
|
|
1652
|
-
["tokenMintB",
|
|
1653
|
-
["tokenVaultB",
|
|
1654
|
-
["feeGrowthGlobalB",
|
|
1655
|
-
["rewardLastUpdatedTimestamp",
|
|
1656
|
-
["rewardInfos",
|
|
1755
|
+
function Bs() {
|
|
1756
|
+
return O([
|
|
1757
|
+
["discriminator", g(C(), 8)],
|
|
1758
|
+
["whirlpoolsConfig", c()],
|
|
1759
|
+
["whirlpoolBump", g(C(), 1)],
|
|
1760
|
+
["tickSpacing", Ee()],
|
|
1761
|
+
["feeTierIndexSeed", g(C(), 2)],
|
|
1762
|
+
["feeRate", Ee()],
|
|
1763
|
+
["protocolFeeRate", Ee()],
|
|
1764
|
+
["liquidity", w()],
|
|
1765
|
+
["sqrtPrice", w()],
|
|
1766
|
+
["tickCurrentIndex", fe()],
|
|
1767
|
+
["protocolFeeOwedA", d()],
|
|
1768
|
+
["protocolFeeOwedB", d()],
|
|
1769
|
+
["tokenMintA", c()],
|
|
1770
|
+
["tokenVaultA", c()],
|
|
1771
|
+
["feeGrowthGlobalA", w()],
|
|
1772
|
+
["tokenMintB", c()],
|
|
1773
|
+
["tokenVaultB", c()],
|
|
1774
|
+
["feeGrowthGlobalB", w()],
|
|
1775
|
+
["rewardLastUpdatedTimestamp", d()],
|
|
1776
|
+
["rewardInfos", ue(un(), { size: 3 })]
|
|
1657
1777
|
]);
|
|
1658
1778
|
}
|
|
1659
|
-
function
|
|
1660
|
-
return
|
|
1661
|
-
["discriminator",
|
|
1779
|
+
function Gs() {
|
|
1780
|
+
return E([
|
|
1781
|
+
["discriminator", m(h(), 8)],
|
|
1662
1782
|
["whirlpoolsConfig", u()],
|
|
1663
|
-
["whirlpoolBump",
|
|
1664
|
-
["tickSpacing",
|
|
1665
|
-
["feeTierIndexSeed",
|
|
1666
|
-
["feeRate",
|
|
1667
|
-
["protocolFeeRate",
|
|
1668
|
-
["liquidity",
|
|
1669
|
-
["sqrtPrice",
|
|
1670
|
-
["tickCurrentIndex",
|
|
1671
|
-
["protocolFeeOwedA",
|
|
1672
|
-
["protocolFeeOwedB",
|
|
1783
|
+
["whirlpoolBump", m(h(), 1)],
|
|
1784
|
+
["tickSpacing", Ne()],
|
|
1785
|
+
["feeTierIndexSeed", m(h(), 2)],
|
|
1786
|
+
["feeRate", Ne()],
|
|
1787
|
+
["protocolFeeRate", Ne()],
|
|
1788
|
+
["liquidity", M()],
|
|
1789
|
+
["sqrtPrice", M()],
|
|
1790
|
+
["tickCurrentIndex", Se()],
|
|
1791
|
+
["protocolFeeOwedA", l()],
|
|
1792
|
+
["protocolFeeOwedB", l()],
|
|
1673
1793
|
["tokenMintA", u()],
|
|
1674
1794
|
["tokenVaultA", u()],
|
|
1675
|
-
["feeGrowthGlobalA",
|
|
1795
|
+
["feeGrowthGlobalA", M()],
|
|
1676
1796
|
["tokenMintB", u()],
|
|
1677
1797
|
["tokenVaultB", u()],
|
|
1678
|
-
["feeGrowthGlobalB",
|
|
1679
|
-
["rewardLastUpdatedTimestamp",
|
|
1680
|
-
["rewardInfos",
|
|
1798
|
+
["feeGrowthGlobalB", M()],
|
|
1799
|
+
["rewardLastUpdatedTimestamp", l()],
|
|
1800
|
+
["rewardInfos", Re(Rn(), { size: 3 })]
|
|
1681
1801
|
]);
|
|
1682
1802
|
}
|
|
1683
|
-
function
|
|
1684
|
-
return
|
|
1685
|
-
}
|
|
1686
|
-
function
|
|
1687
|
-
return
|
|
1688
|
-
["mint",
|
|
1689
|
-
["vault",
|
|
1690
|
-
["extension",
|
|
1691
|
-
["emissionsPerSecondX64",
|
|
1692
|
-
["growthGlobalX64",
|
|
1803
|
+
function Sc() {
|
|
1804
|
+
return f(Bs(), Gs());
|
|
1805
|
+
}
|
|
1806
|
+
function un() {
|
|
1807
|
+
return O([
|
|
1808
|
+
["mint", c()],
|
|
1809
|
+
["vault", c()],
|
|
1810
|
+
["extension", g(C(), 32)],
|
|
1811
|
+
["emissionsPerSecondX64", w()],
|
|
1812
|
+
["growthGlobalX64", w()]
|
|
1693
1813
|
]);
|
|
1694
1814
|
}
|
|
1695
|
-
function
|
|
1696
|
-
return
|
|
1815
|
+
function Rn() {
|
|
1816
|
+
return E([
|
|
1697
1817
|
["mint", u()],
|
|
1698
1818
|
["vault", u()],
|
|
1699
|
-
["extension",
|
|
1700
|
-
["emissionsPerSecondX64",
|
|
1701
|
-
["growthGlobalX64",
|
|
1819
|
+
["extension", m(h(), 32)],
|
|
1820
|
+
["emissionsPerSecondX64", M()],
|
|
1821
|
+
["growthGlobalX64", M()]
|
|
1702
1822
|
]);
|
|
1703
1823
|
}
|
|
1704
|
-
function
|
|
1705
|
-
return
|
|
1706
|
-
}
|
|
1707
|
-
function
|
|
1708
|
-
return
|
|
1709
|
-
["discriminator",
|
|
1710
|
-
["positionTokenAccount",
|
|
1711
|
-
["actionData",
|
|
1712
|
-
["automationIndex",
|
|
1713
|
-
["conditionsData",
|
|
1714
|
-
["bump",
|
|
1715
|
-
["authorityBump",
|
|
1716
|
-
["padding",
|
|
1717
|
-
["crankReward",
|
|
1718
|
-
["automationTokenAccountA",
|
|
1719
|
-
["automationTokenAccountB",
|
|
1720
|
-
["tokenMintA",
|
|
1721
|
-
["tokenMintB",
|
|
1722
|
-
["reserved",
|
|
1824
|
+
function Ic() {
|
|
1825
|
+
return f(un(), Rn());
|
|
1826
|
+
}
|
|
1827
|
+
function Vs() {
|
|
1828
|
+
return O([
|
|
1829
|
+
["discriminator", be()],
|
|
1830
|
+
["positionTokenAccount", c()],
|
|
1831
|
+
["actionData", g(C(), 64)],
|
|
1832
|
+
["automationIndex", R()],
|
|
1833
|
+
["conditionsData", g(C(), 192)],
|
|
1834
|
+
["bump", R()],
|
|
1835
|
+
["authorityBump", R()],
|
|
1836
|
+
["padding", g(C(), 4)],
|
|
1837
|
+
["crankReward", d()],
|
|
1838
|
+
["automationTokenAccountA", c()],
|
|
1839
|
+
["automationTokenAccountB", c()],
|
|
1840
|
+
["tokenMintA", c()],
|
|
1841
|
+
["tokenMintB", c()],
|
|
1842
|
+
["reserved", g(C(), 80)]
|
|
1723
1843
|
]);
|
|
1724
1844
|
}
|
|
1725
|
-
function
|
|
1726
|
-
return
|
|
1727
|
-
["discriminator",
|
|
1845
|
+
function An() {
|
|
1846
|
+
return E([
|
|
1847
|
+
["discriminator", Pe()],
|
|
1728
1848
|
["positionTokenAccount", u()],
|
|
1729
|
-
["actionData",
|
|
1730
|
-
["automationIndex",
|
|
1731
|
-
["conditionsData",
|
|
1732
|
-
["bump",
|
|
1733
|
-
["authorityBump",
|
|
1734
|
-
["padding",
|
|
1735
|
-
["crankReward",
|
|
1849
|
+
["actionData", m(h(), 64)],
|
|
1850
|
+
["automationIndex", S()],
|
|
1851
|
+
["conditionsData", m(h(), 192)],
|
|
1852
|
+
["bump", S()],
|
|
1853
|
+
["authorityBump", S()],
|
|
1854
|
+
["padding", m(h(), 4)],
|
|
1855
|
+
["crankReward", l()],
|
|
1736
1856
|
["automationTokenAccountA", u()],
|
|
1737
1857
|
["automationTokenAccountB", u()],
|
|
1738
1858
|
["tokenMintA", u()],
|
|
1739
1859
|
["tokenMintB", u()],
|
|
1740
|
-
["reserved",
|
|
1860
|
+
["reserved", m(h(), 80)]
|
|
1741
1861
|
]);
|
|
1742
1862
|
}
|
|
1743
|
-
function
|
|
1744
|
-
return
|
|
1863
|
+
function gc() {
|
|
1864
|
+
return f(Vs(), An());
|
|
1745
1865
|
}
|
|
1746
|
-
function
|
|
1747
|
-
return
|
|
1748
|
-
}
|
|
1749
|
-
async function
|
|
1750
|
-
const o = await
|
|
1751
|
-
return
|
|
1752
|
-
}
|
|
1753
|
-
async function
|
|
1754
|
-
const o = await
|
|
1755
|
-
return
|
|
1756
|
-
}
|
|
1757
|
-
async function
|
|
1758
|
-
const o = await
|
|
1759
|
-
return
|
|
1760
|
-
}
|
|
1761
|
-
async function
|
|
1762
|
-
return (await
|
|
1763
|
-
}
|
|
1764
|
-
function
|
|
1765
|
-
return
|
|
1766
|
-
["discriminator",
|
|
1767
|
-
["bump",
|
|
1768
|
-
["padding",
|
|
1769
|
-
["globalConfigAuthority",
|
|
1770
|
-
["crankRewardDefault",
|
|
1771
|
-
["reserved",
|
|
1866
|
+
function dn(e) {
|
|
1867
|
+
return Ct(e, An());
|
|
1868
|
+
}
|
|
1869
|
+
async function mc(e, t, n) {
|
|
1870
|
+
const o = await Fs(e, t, n);
|
|
1871
|
+
return pt(o), o;
|
|
1872
|
+
}
|
|
1873
|
+
async function Fs(e, t, n) {
|
|
1874
|
+
const o = await vt(e, t, n);
|
|
1875
|
+
return dn(o);
|
|
1876
|
+
}
|
|
1877
|
+
async function Cc(e, t, n) {
|
|
1878
|
+
const o = await zs(e, t, n);
|
|
1879
|
+
return Dt(o), o;
|
|
1880
|
+
}
|
|
1881
|
+
async function zs(e, t, n) {
|
|
1882
|
+
return (await Lt(e, t, n)).map((r) => dn(r));
|
|
1883
|
+
}
|
|
1884
|
+
function Hs() {
|
|
1885
|
+
return O([
|
|
1886
|
+
["discriminator", be()],
|
|
1887
|
+
["bump", R()],
|
|
1888
|
+
["padding", g(C(), 6)],
|
|
1889
|
+
["globalConfigAuthority", c()],
|
|
1890
|
+
["crankRewardDefault", d()],
|
|
1891
|
+
["reserved", g(C(), 976)]
|
|
1772
1892
|
]);
|
|
1773
1893
|
}
|
|
1774
|
-
function
|
|
1775
|
-
return
|
|
1776
|
-
["discriminator",
|
|
1777
|
-
["bump",
|
|
1778
|
-
["padding",
|
|
1894
|
+
function ln() {
|
|
1895
|
+
return E([
|
|
1896
|
+
["discriminator", Pe()],
|
|
1897
|
+
["bump", S()],
|
|
1898
|
+
["padding", m(h(), 6)],
|
|
1779
1899
|
["globalConfigAuthority", u()],
|
|
1780
|
-
["crankRewardDefault",
|
|
1781
|
-
["reserved",
|
|
1900
|
+
["crankRewardDefault", l()],
|
|
1901
|
+
["reserved", m(h(), 976)]
|
|
1782
1902
|
]);
|
|
1783
1903
|
}
|
|
1784
|
-
function
|
|
1785
|
-
return
|
|
1904
|
+
function hc() {
|
|
1905
|
+
return f(Hs(), ln());
|
|
1786
1906
|
}
|
|
1787
|
-
function
|
|
1788
|
-
return
|
|
1907
|
+
function On(e) {
|
|
1908
|
+
return Ct(e, ln());
|
|
1789
1909
|
}
|
|
1790
|
-
async function
|
|
1791
|
-
const o = await
|
|
1792
|
-
return
|
|
1910
|
+
async function vc(e, t, n) {
|
|
1911
|
+
const o = await Ws(e, t, n);
|
|
1912
|
+
return pt(o), o;
|
|
1793
1913
|
}
|
|
1794
|
-
async function
|
|
1795
|
-
const o = await
|
|
1796
|
-
return
|
|
1914
|
+
async function Ws(e, t, n) {
|
|
1915
|
+
const o = await vt(e, t, n);
|
|
1916
|
+
return On(o);
|
|
1797
1917
|
}
|
|
1798
|
-
async function
|
|
1799
|
-
const o = await
|
|
1800
|
-
return
|
|
1918
|
+
async function Lc(e, t, n) {
|
|
1919
|
+
const o = await $s(e, t, n);
|
|
1920
|
+
return Dt(o), o;
|
|
1801
1921
|
}
|
|
1802
|
-
async function
|
|
1803
|
-
return (await
|
|
1922
|
+
async function $s(e, t, n) {
|
|
1923
|
+
return (await Lt(e, t, n)).map((r) => On(r));
|
|
1804
1924
|
}
|
|
1805
|
-
function
|
|
1925
|
+
function Xs(e) {
|
|
1806
1926
|
if (!e)
|
|
1807
1927
|
throw new Error("Expected a Address.");
|
|
1808
1928
|
return typeof e == "object" && "address" in e ? e.address : Array.isArray(e) ? e[0] : e;
|
|
1809
1929
|
}
|
|
1810
|
-
function
|
|
1930
|
+
function K(e, t) {
|
|
1811
1931
|
return (n) => {
|
|
1812
1932
|
if (!n.value)
|
|
1813
1933
|
return Object.freeze({
|
|
1814
1934
|
address: e,
|
|
1815
|
-
role:
|
|
1935
|
+
role: se.READONLY
|
|
1816
1936
|
});
|
|
1817
|
-
const o = n.isWritable ?
|
|
1937
|
+
const o = n.isWritable ? se.WRITABLE : se.READONLY;
|
|
1818
1938
|
return Object.freeze({
|
|
1819
|
-
address:
|
|
1820
|
-
role:
|
|
1821
|
-
...
|
|
1939
|
+
address: Xs(n.value),
|
|
1940
|
+
role: Xe(n.value) ? Ts(o) : o,
|
|
1941
|
+
...Xe(n.value) ? { signer: n.value } : {}
|
|
1822
1942
|
});
|
|
1823
1943
|
};
|
|
1824
1944
|
}
|
|
1825
|
-
function
|
|
1826
|
-
return !!e && typeof e == "object" && "address" in e &&
|
|
1945
|
+
function Xe(e) {
|
|
1946
|
+
return !!e && typeof e == "object" && "address" in e && ms(e);
|
|
1827
1947
|
}
|
|
1828
|
-
const
|
|
1829
|
-
function
|
|
1830
|
-
return
|
|
1831
|
-
}
|
|
1832
|
-
function
|
|
1833
|
-
return
|
|
1834
|
-
|
|
1835
|
-
["discriminator",
|
|
1836
|
-
["action",
|
|
1837
|
-
["automationIndex",
|
|
1838
|
-
["conditions",
|
|
1948
|
+
const En = 2;
|
|
1949
|
+
function pc() {
|
|
1950
|
+
return R().encode(En);
|
|
1951
|
+
}
|
|
1952
|
+
function Nn() {
|
|
1953
|
+
return L(
|
|
1954
|
+
O([
|
|
1955
|
+
["discriminator", R()],
|
|
1956
|
+
["action", $t()],
|
|
1957
|
+
["automationIndex", R()],
|
|
1958
|
+
["conditions", ue(Yt(), { size: 3 })]
|
|
1839
1959
|
]),
|
|
1840
|
-
(e) => ({ ...e, discriminator:
|
|
1960
|
+
(e) => ({ ...e, discriminator: En })
|
|
1841
1961
|
);
|
|
1842
1962
|
}
|
|
1843
|
-
function
|
|
1844
|
-
return
|
|
1845
|
-
["discriminator",
|
|
1846
|
-
["action",
|
|
1847
|
-
["automationIndex",
|
|
1848
|
-
["conditions",
|
|
1963
|
+
function Tn() {
|
|
1964
|
+
return E([
|
|
1965
|
+
["discriminator", S()],
|
|
1966
|
+
["action", Xt()],
|
|
1967
|
+
["automationIndex", S()],
|
|
1968
|
+
["conditions", Re(Kt(), { size: 3 })]
|
|
1849
1969
|
]);
|
|
1850
1970
|
}
|
|
1851
|
-
function
|
|
1852
|
-
return
|
|
1853
|
-
|
|
1854
|
-
|
|
1971
|
+
function Dc() {
|
|
1972
|
+
return f(
|
|
1973
|
+
Nn(),
|
|
1974
|
+
Tn()
|
|
1855
1975
|
);
|
|
1856
1976
|
}
|
|
1857
|
-
function
|
|
1858
|
-
const n = t?.programAddress ??
|
|
1977
|
+
function bc(e, t) {
|
|
1978
|
+
const n = t?.programAddress ?? p, r = {
|
|
1859
1979
|
positionOwner: { value: e.positionOwner ?? null, isWritable: !0 },
|
|
1860
1980
|
automation: { value: e.automation ?? null, isWritable: !0 },
|
|
1861
1981
|
automationTokenAccountA: {
|
|
@@ -1881,7 +2001,7 @@ function Fs(e, t) {
|
|
|
1881
2001
|
ataProgram: { value: e.ataProgram ?? null, isWritable: !1 }
|
|
1882
2002
|
}, a = { ...e };
|
|
1883
2003
|
r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111"), r.ataProgram.value || (r.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
|
1884
|
-
const i =
|
|
2004
|
+
const i = K(n);
|
|
1885
2005
|
return Object.freeze({
|
|
1886
2006
|
accounts: [
|
|
1887
2007
|
i(r.positionOwner),
|
|
@@ -1899,13 +2019,13 @@ function Fs(e, t) {
|
|
|
1899
2019
|
i(r.systemProgram),
|
|
1900
2020
|
i(r.ataProgram)
|
|
1901
2021
|
],
|
|
1902
|
-
data:
|
|
2022
|
+
data: Nn().encode(
|
|
1903
2023
|
a
|
|
1904
2024
|
),
|
|
1905
2025
|
programAddress: n
|
|
1906
2026
|
});
|
|
1907
2027
|
}
|
|
1908
|
-
function
|
|
2028
|
+
function Ys(e) {
|
|
1909
2029
|
if (e.accounts.length < 14)
|
|
1910
2030
|
throw new Error("Not enough accounts");
|
|
1911
2031
|
let t = 0;
|
|
@@ -1931,55 +2051,55 @@ function E_(e) {
|
|
|
1931
2051
|
systemProgram: n(),
|
|
1932
2052
|
ataProgram: n()
|
|
1933
2053
|
},
|
|
1934
|
-
data:
|
|
2054
|
+
data: Tn().decode(e.data)
|
|
1935
2055
|
};
|
|
1936
2056
|
}
|
|
1937
|
-
const
|
|
1938
|
-
function
|
|
1939
|
-
return
|
|
2057
|
+
const fn = 4;
|
|
2058
|
+
function Pc() {
|
|
2059
|
+
return R().encode(fn);
|
|
1940
2060
|
}
|
|
1941
|
-
function
|
|
1942
|
-
return
|
|
1943
|
-
|
|
1944
|
-
["discriminator",
|
|
1945
|
-
["instructionData",
|
|
2061
|
+
function Sn() {
|
|
2062
|
+
return L(
|
|
2063
|
+
O([
|
|
2064
|
+
["discriminator", R()],
|
|
2065
|
+
["instructionData", Zt()]
|
|
1946
2066
|
]),
|
|
1947
|
-
(e) => ({ ...e, discriminator:
|
|
2067
|
+
(e) => ({ ...e, discriminator: fn })
|
|
1948
2068
|
);
|
|
1949
2069
|
}
|
|
1950
|
-
function
|
|
1951
|
-
return
|
|
1952
|
-
["discriminator",
|
|
1953
|
-
["instructionData",
|
|
2070
|
+
function In() {
|
|
2071
|
+
return E([
|
|
2072
|
+
["discriminator", S()],
|
|
2073
|
+
["instructionData", qt()]
|
|
1954
2074
|
]);
|
|
1955
2075
|
}
|
|
1956
|
-
function
|
|
1957
|
-
return
|
|
1958
|
-
|
|
1959
|
-
|
|
2076
|
+
function Uc() {
|
|
2077
|
+
return f(
|
|
2078
|
+
Sn(),
|
|
2079
|
+
In()
|
|
1960
2080
|
);
|
|
1961
2081
|
}
|
|
1962
|
-
function
|
|
1963
|
-
const n = t?.programAddress ??
|
|
2082
|
+
function wc(e, t) {
|
|
2083
|
+
const n = t?.programAddress ?? p, r = {
|
|
1964
2084
|
payer: { value: e.payer ?? null, isWritable: !0 },
|
|
1965
2085
|
automation: { value: e.automation ?? null, isWritable: !0 },
|
|
1966
2086
|
systemProgram: { value: e.systemProgram ?? null, isWritable: !1 }
|
|
1967
2087
|
}, a = { ...e };
|
|
1968
2088
|
r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111");
|
|
1969
|
-
const i =
|
|
2089
|
+
const i = K(n);
|
|
1970
2090
|
return Object.freeze({
|
|
1971
2091
|
accounts: [
|
|
1972
2092
|
i(r.payer),
|
|
1973
2093
|
i(r.automation),
|
|
1974
2094
|
i(r.systemProgram)
|
|
1975
2095
|
],
|
|
1976
|
-
data:
|
|
2096
|
+
data: Sn().encode(
|
|
1977
2097
|
a
|
|
1978
2098
|
),
|
|
1979
2099
|
programAddress: n
|
|
1980
2100
|
});
|
|
1981
2101
|
}
|
|
1982
|
-
function
|
|
2102
|
+
function Ks(e) {
|
|
1983
2103
|
if (e.accounts.length < 3)
|
|
1984
2104
|
throw new Error("Not enough accounts");
|
|
1985
2105
|
let t = 0;
|
|
@@ -1994,30 +2114,30 @@ function N_(e) {
|
|
|
1994
2114
|
automation: n(),
|
|
1995
2115
|
systemProgram: n()
|
|
1996
2116
|
},
|
|
1997
|
-
data:
|
|
2117
|
+
data: In().decode(e.data)
|
|
1998
2118
|
};
|
|
1999
2119
|
}
|
|
2000
|
-
const
|
|
2001
|
-
function
|
|
2002
|
-
return
|
|
2120
|
+
const gn = 5;
|
|
2121
|
+
function Mc() {
|
|
2122
|
+
return R().encode(gn);
|
|
2003
2123
|
}
|
|
2004
|
-
function
|
|
2005
|
-
return
|
|
2124
|
+
function mn() {
|
|
2125
|
+
return L(O([["discriminator", R()]]), (e) => ({
|
|
2006
2126
|
...e,
|
|
2007
|
-
discriminator:
|
|
2127
|
+
discriminator: gn
|
|
2008
2128
|
}));
|
|
2009
2129
|
}
|
|
2010
|
-
function
|
|
2011
|
-
return
|
|
2130
|
+
function Cn() {
|
|
2131
|
+
return E([["discriminator", S()]]);
|
|
2012
2132
|
}
|
|
2013
|
-
function
|
|
2014
|
-
return
|
|
2015
|
-
|
|
2016
|
-
|
|
2133
|
+
function yc() {
|
|
2134
|
+
return f(
|
|
2135
|
+
mn(),
|
|
2136
|
+
Cn()
|
|
2017
2137
|
);
|
|
2018
2138
|
}
|
|
2019
|
-
function
|
|
2020
|
-
const n = t?.programAddress ??
|
|
2139
|
+
function xc(e, t) {
|
|
2140
|
+
const n = t?.programAddress ?? p, r = {
|
|
2021
2141
|
crankOperator: { value: e.crankOperator ?? null, isWritable: !0 },
|
|
2022
2142
|
automation: { value: e.automation ?? null, isWritable: !0 },
|
|
2023
2143
|
automationTokenAccountA: {
|
|
@@ -2064,7 +2184,7 @@ function Ys(e, t) {
|
|
|
2064
2184
|
ataProgram: { value: e.ataProgram ?? null, isWritable: !1 }
|
|
2065
2185
|
};
|
|
2066
2186
|
r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111"), r.ataProgram.value || (r.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
|
2067
|
-
const a =
|
|
2187
|
+
const a = K(n);
|
|
2068
2188
|
return Object.freeze({
|
|
2069
2189
|
accounts: [
|
|
2070
2190
|
a(r.crankOperator),
|
|
@@ -2091,11 +2211,11 @@ function Ys(e, t) {
|
|
|
2091
2211
|
a(r.whirlpoolProgram),
|
|
2092
2212
|
a(r.ataProgram)
|
|
2093
2213
|
],
|
|
2094
|
-
data:
|
|
2214
|
+
data: mn().encode({}),
|
|
2095
2215
|
programAddress: n
|
|
2096
2216
|
});
|
|
2097
2217
|
}
|
|
2098
|
-
function
|
|
2218
|
+
function js(e) {
|
|
2099
2219
|
if (e.accounts.length < 23)
|
|
2100
2220
|
throw new Error("Not enough accounts");
|
|
2101
2221
|
let t = 0;
|
|
@@ -2130,30 +2250,30 @@ function T_(e) {
|
|
|
2130
2250
|
whirlpoolProgram: n(),
|
|
2131
2251
|
ataProgram: n()
|
|
2132
2252
|
},
|
|
2133
|
-
data:
|
|
2253
|
+
data: Cn().decode(e.data)
|
|
2134
2254
|
};
|
|
2135
2255
|
}
|
|
2136
|
-
const
|
|
2137
|
-
function
|
|
2138
|
-
return
|
|
2256
|
+
const hn = 7;
|
|
2257
|
+
function kc() {
|
|
2258
|
+
return R().encode(hn);
|
|
2139
2259
|
}
|
|
2140
|
-
function
|
|
2141
|
-
return
|
|
2260
|
+
function vn() {
|
|
2261
|
+
return L(O([["discriminator", R()]]), (e) => ({
|
|
2142
2262
|
...e,
|
|
2143
|
-
discriminator:
|
|
2263
|
+
discriminator: hn
|
|
2144
2264
|
}));
|
|
2145
2265
|
}
|
|
2146
|
-
function
|
|
2147
|
-
return
|
|
2266
|
+
function Ln() {
|
|
2267
|
+
return E([["discriminator", S()]]);
|
|
2148
2268
|
}
|
|
2149
|
-
function
|
|
2150
|
-
return
|
|
2151
|
-
|
|
2152
|
-
|
|
2269
|
+
function Bc() {
|
|
2270
|
+
return f(
|
|
2271
|
+
vn(),
|
|
2272
|
+
Ln()
|
|
2153
2273
|
);
|
|
2154
2274
|
}
|
|
2155
|
-
function
|
|
2156
|
-
const n = t?.programAddress ??
|
|
2275
|
+
function Gc(e, t) {
|
|
2276
|
+
const n = t?.programAddress ?? p, r = {
|
|
2157
2277
|
crankOperator: { value: e.crankOperator ?? null, isWritable: !0 },
|
|
2158
2278
|
crankOperatorTokenAccountA: {
|
|
2159
2279
|
value: e.crankOperatorTokenAccountA ?? null,
|
|
@@ -2202,7 +2322,7 @@ function Js(e, t) {
|
|
|
2202
2322
|
}
|
|
2203
2323
|
};
|
|
2204
2324
|
r.instructionsSysvar.value || (r.instructionsSysvar.value = "Sysvar1nstructions1111111111111111111111111");
|
|
2205
|
-
const a =
|
|
2325
|
+
const a = K(n);
|
|
2206
2326
|
return Object.freeze({
|
|
2207
2327
|
accounts: [
|
|
2208
2328
|
a(r.crankOperator),
|
|
@@ -2228,11 +2348,11 @@ function Js(e, t) {
|
|
|
2228
2348
|
a(r.whirlpoolProgram),
|
|
2229
2349
|
a(r.instructionsSysvar)
|
|
2230
2350
|
],
|
|
2231
|
-
data:
|
|
2351
|
+
data: vn().encode({}),
|
|
2232
2352
|
programAddress: n
|
|
2233
2353
|
});
|
|
2234
2354
|
}
|
|
2235
|
-
function
|
|
2355
|
+
function Js(e) {
|
|
2236
2356
|
if (e.accounts.length < 22)
|
|
2237
2357
|
throw new Error("Not enough accounts");
|
|
2238
2358
|
let t = 0;
|
|
@@ -2266,30 +2386,30 @@ function S_(e) {
|
|
|
2266
2386
|
whirlpoolProgram: n(),
|
|
2267
2387
|
instructionsSysvar: n()
|
|
2268
2388
|
},
|
|
2269
|
-
data:
|
|
2389
|
+
data: Ln().decode(e.data)
|
|
2270
2390
|
};
|
|
2271
2391
|
}
|
|
2272
|
-
const
|
|
2273
|
-
function
|
|
2274
|
-
return
|
|
2392
|
+
const pn = 6;
|
|
2393
|
+
function Vc() {
|
|
2394
|
+
return R().encode(pn);
|
|
2275
2395
|
}
|
|
2276
|
-
function
|
|
2277
|
-
return
|
|
2396
|
+
function Dn() {
|
|
2397
|
+
return L(O([["discriminator", R()]]), (e) => ({
|
|
2278
2398
|
...e,
|
|
2279
|
-
discriminator:
|
|
2399
|
+
discriminator: pn
|
|
2280
2400
|
}));
|
|
2281
2401
|
}
|
|
2282
|
-
function
|
|
2283
|
-
return
|
|
2402
|
+
function bn() {
|
|
2403
|
+
return E([["discriminator", S()]]);
|
|
2284
2404
|
}
|
|
2285
|
-
function
|
|
2286
|
-
return
|
|
2287
|
-
|
|
2288
|
-
|
|
2405
|
+
function Fc() {
|
|
2406
|
+
return f(
|
|
2407
|
+
Dn(),
|
|
2408
|
+
bn()
|
|
2289
2409
|
);
|
|
2290
2410
|
}
|
|
2291
|
-
function
|
|
2292
|
-
const n = t?.programAddress ??
|
|
2411
|
+
function zc(e, t) {
|
|
2412
|
+
const n = t?.programAddress ?? p, r = {
|
|
2293
2413
|
crankOperator: { value: e.crankOperator ?? null, isWritable: !0 },
|
|
2294
2414
|
crankOperatorTokenAccountA: {
|
|
2295
2415
|
value: e.crankOperatorTokenAccountA ?? null,
|
|
@@ -2331,7 +2451,7 @@ function Qs(e, t) {
|
|
|
2331
2451
|
ataProgram: { value: e.ataProgram ?? null, isWritable: !1 }
|
|
2332
2452
|
};
|
|
2333
2453
|
r.instructionsSysvar.value || (r.instructionsSysvar.value = "Sysvar1nstructions1111111111111111111111111"), r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111"), r.ataProgram.value || (r.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
|
2334
|
-
const a =
|
|
2454
|
+
const a = K(n);
|
|
2335
2455
|
return Object.freeze({
|
|
2336
2456
|
accounts: [
|
|
2337
2457
|
a(r.crankOperator),
|
|
@@ -2356,11 +2476,11 @@ function Qs(e, t) {
|
|
|
2356
2476
|
a(r.systemProgram),
|
|
2357
2477
|
a(r.ataProgram)
|
|
2358
2478
|
],
|
|
2359
|
-
data:
|
|
2479
|
+
data: Dn().encode({}),
|
|
2360
2480
|
programAddress: n
|
|
2361
2481
|
});
|
|
2362
2482
|
}
|
|
2363
|
-
function
|
|
2483
|
+
function Zs(e) {
|
|
2364
2484
|
if (e.accounts.length < 21)
|
|
2365
2485
|
throw new Error("Not enough accounts");
|
|
2366
2486
|
let t = 0;
|
|
@@ -2393,60 +2513,60 @@ function I_(e) {
|
|
|
2393
2513
|
systemProgram: n(),
|
|
2394
2514
|
ataProgram: n()
|
|
2395
2515
|
},
|
|
2396
|
-
data:
|
|
2516
|
+
data: bn().decode(e.data)
|
|
2397
2517
|
};
|
|
2398
2518
|
}
|
|
2399
|
-
const
|
|
2400
|
-
function
|
|
2401
|
-
return
|
|
2519
|
+
const Pn = 0;
|
|
2520
|
+
function Hc() {
|
|
2521
|
+
return R().encode(Pn);
|
|
2402
2522
|
}
|
|
2403
|
-
function
|
|
2404
|
-
return
|
|
2405
|
-
|
|
2406
|
-
["discriminator",
|
|
2407
|
-
["globalConfigAuthority",
|
|
2408
|
-
["crankRewardDefault",
|
|
2523
|
+
function Un() {
|
|
2524
|
+
return L(
|
|
2525
|
+
O([
|
|
2526
|
+
["discriminator", R()],
|
|
2527
|
+
["globalConfigAuthority", c()],
|
|
2528
|
+
["crankRewardDefault", d()]
|
|
2409
2529
|
]),
|
|
2410
2530
|
(e) => ({
|
|
2411
2531
|
...e,
|
|
2412
|
-
discriminator:
|
|
2532
|
+
discriminator: Pn
|
|
2413
2533
|
})
|
|
2414
2534
|
);
|
|
2415
2535
|
}
|
|
2416
|
-
function
|
|
2417
|
-
return
|
|
2418
|
-
["discriminator",
|
|
2536
|
+
function wn() {
|
|
2537
|
+
return E([
|
|
2538
|
+
["discriminator", S()],
|
|
2419
2539
|
["globalConfigAuthority", u()],
|
|
2420
|
-
["crankRewardDefault",
|
|
2540
|
+
["crankRewardDefault", l()]
|
|
2421
2541
|
]);
|
|
2422
2542
|
}
|
|
2423
|
-
function
|
|
2424
|
-
return
|
|
2425
|
-
|
|
2426
|
-
|
|
2543
|
+
function Wc() {
|
|
2544
|
+
return f(
|
|
2545
|
+
Un(),
|
|
2546
|
+
wn()
|
|
2427
2547
|
);
|
|
2428
2548
|
}
|
|
2429
|
-
function
|
|
2430
|
-
const n = t?.programAddress ??
|
|
2549
|
+
function $c(e, t) {
|
|
2550
|
+
const n = t?.programAddress ?? p, r = {
|
|
2431
2551
|
deployer: { value: e.deployer ?? null, isWritable: !0 },
|
|
2432
2552
|
globalConfig: { value: e.globalConfig ?? null, isWritable: !0 },
|
|
2433
2553
|
systemProgram: { value: e.systemProgram ?? null, isWritable: !1 }
|
|
2434
2554
|
}, a = { ...e };
|
|
2435
2555
|
r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111");
|
|
2436
|
-
const i =
|
|
2556
|
+
const i = K(n);
|
|
2437
2557
|
return Object.freeze({
|
|
2438
2558
|
accounts: [
|
|
2439
2559
|
i(r.deployer),
|
|
2440
2560
|
i(r.globalConfig),
|
|
2441
2561
|
i(r.systemProgram)
|
|
2442
2562
|
],
|
|
2443
|
-
data:
|
|
2563
|
+
data: Un().encode(
|
|
2444
2564
|
a
|
|
2445
2565
|
),
|
|
2446
2566
|
programAddress: n
|
|
2447
2567
|
});
|
|
2448
2568
|
}
|
|
2449
|
-
function
|
|
2569
|
+
function qs(e) {
|
|
2450
2570
|
if (e.accounts.length < 3)
|
|
2451
2571
|
throw new Error("Not enough accounts");
|
|
2452
2572
|
let t = 0;
|
|
@@ -2461,30 +2581,30 @@ function f_(e) {
|
|
|
2461
2581
|
globalConfig: n(),
|
|
2462
2582
|
systemProgram: n()
|
|
2463
2583
|
},
|
|
2464
|
-
data:
|
|
2584
|
+
data: wn().decode(e.data)
|
|
2465
2585
|
};
|
|
2466
2586
|
}
|
|
2467
|
-
const
|
|
2468
|
-
function
|
|
2469
|
-
return
|
|
2587
|
+
const Mn = 3;
|
|
2588
|
+
function Xc() {
|
|
2589
|
+
return R().encode(Mn);
|
|
2470
2590
|
}
|
|
2471
|
-
function
|
|
2472
|
-
return
|
|
2591
|
+
function yn() {
|
|
2592
|
+
return L(O([["discriminator", R()]]), (e) => ({
|
|
2473
2593
|
...e,
|
|
2474
|
-
discriminator:
|
|
2594
|
+
discriminator: Mn
|
|
2475
2595
|
}));
|
|
2476
2596
|
}
|
|
2477
|
-
function
|
|
2478
|
-
return
|
|
2597
|
+
function xn() {
|
|
2598
|
+
return E([["discriminator", S()]]);
|
|
2479
2599
|
}
|
|
2480
|
-
function
|
|
2481
|
-
return
|
|
2482
|
-
|
|
2483
|
-
|
|
2600
|
+
function Yc() {
|
|
2601
|
+
return f(
|
|
2602
|
+
yn(),
|
|
2603
|
+
xn()
|
|
2484
2604
|
);
|
|
2485
2605
|
}
|
|
2486
|
-
function
|
|
2487
|
-
const n = t?.programAddress ??
|
|
2606
|
+
function Kc(e, t) {
|
|
2607
|
+
const n = t?.programAddress ?? p, r = {
|
|
2488
2608
|
positionOwner: { value: e.positionOwner ?? null, isWritable: !0 },
|
|
2489
2609
|
positionOwnerTokenAccountA: {
|
|
2490
2610
|
value: e.positionOwnerTokenAccountA ?? null,
|
|
@@ -2506,7 +2626,7 @@ function ac(e, t) {
|
|
|
2506
2626
|
ataProgram: { value: e.ataProgram ?? null, isWritable: !1 }
|
|
2507
2627
|
};
|
|
2508
2628
|
r.systemProgram.value || (r.systemProgram.value = "11111111111111111111111111111111"), r.ataProgram.value || (r.ataProgram.value = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL");
|
|
2509
|
-
const a =
|
|
2629
|
+
const a = K(n);
|
|
2510
2630
|
return Object.freeze({
|
|
2511
2631
|
accounts: [
|
|
2512
2632
|
a(r.positionOwner),
|
|
@@ -2520,11 +2640,11 @@ function ac(e, t) {
|
|
|
2520
2640
|
a(r.systemProgram),
|
|
2521
2641
|
a(r.ataProgram)
|
|
2522
2642
|
],
|
|
2523
|
-
data:
|
|
2643
|
+
data: yn().encode({}),
|
|
2524
2644
|
programAddress: n
|
|
2525
2645
|
});
|
|
2526
2646
|
}
|
|
2527
|
-
function
|
|
2647
|
+
function Qs(e) {
|
|
2528
2648
|
if (e.accounts.length < 10)
|
|
2529
2649
|
throw new Error("Not enough accounts");
|
|
2530
2650
|
let t = 0;
|
|
@@ -2546,57 +2666,57 @@ function m_(e) {
|
|
|
2546
2666
|
systemProgram: n(),
|
|
2547
2667
|
ataProgram: n()
|
|
2548
2668
|
},
|
|
2549
|
-
data:
|
|
2669
|
+
data: xn().decode(e.data)
|
|
2550
2670
|
};
|
|
2551
2671
|
}
|
|
2552
|
-
const
|
|
2553
|
-
function
|
|
2554
|
-
return
|
|
2672
|
+
const kn = 1;
|
|
2673
|
+
function jc() {
|
|
2674
|
+
return R().encode(kn);
|
|
2555
2675
|
}
|
|
2556
|
-
function
|
|
2557
|
-
return
|
|
2558
|
-
|
|
2559
|
-
["discriminator",
|
|
2560
|
-
["instructionData",
|
|
2676
|
+
function Bn() {
|
|
2677
|
+
return L(
|
|
2678
|
+
O([
|
|
2679
|
+
["discriminator", R()],
|
|
2680
|
+
["instructionData", _n()]
|
|
2561
2681
|
]),
|
|
2562
2682
|
(e) => ({
|
|
2563
2683
|
...e,
|
|
2564
|
-
discriminator:
|
|
2684
|
+
discriminator: kn
|
|
2565
2685
|
})
|
|
2566
2686
|
);
|
|
2567
2687
|
}
|
|
2568
|
-
function
|
|
2569
|
-
return
|
|
2570
|
-
["discriminator",
|
|
2571
|
-
["instructionData",
|
|
2688
|
+
function Gn() {
|
|
2689
|
+
return E([
|
|
2690
|
+
["discriminator", S()],
|
|
2691
|
+
["instructionData", cn()]
|
|
2572
2692
|
]);
|
|
2573
2693
|
}
|
|
2574
|
-
function
|
|
2575
|
-
return
|
|
2576
|
-
|
|
2577
|
-
|
|
2694
|
+
function Jc() {
|
|
2695
|
+
return f(
|
|
2696
|
+
Bn(),
|
|
2697
|
+
Gn()
|
|
2578
2698
|
);
|
|
2579
2699
|
}
|
|
2580
|
-
function
|
|
2581
|
-
const n = t?.programAddress ??
|
|
2700
|
+
function Zc(e, t) {
|
|
2701
|
+
const n = t?.programAddress ?? p, r = {
|
|
2582
2702
|
globalConfigAuthority: {
|
|
2583
2703
|
value: e.globalConfigAuthority ?? null,
|
|
2584
2704
|
isWritable: !1
|
|
2585
2705
|
},
|
|
2586
2706
|
globalConfig: { value: e.globalConfig ?? null, isWritable: !0 }
|
|
2587
|
-
}, a = { ...e }, i =
|
|
2707
|
+
}, a = { ...e }, i = K(n);
|
|
2588
2708
|
return Object.freeze({
|
|
2589
2709
|
accounts: [
|
|
2590
2710
|
i(r.globalConfigAuthority),
|
|
2591
2711
|
i(r.globalConfig)
|
|
2592
2712
|
],
|
|
2593
|
-
data:
|
|
2713
|
+
data: Bn().encode(
|
|
2594
2714
|
a
|
|
2595
2715
|
),
|
|
2596
2716
|
programAddress: n
|
|
2597
2717
|
});
|
|
2598
2718
|
}
|
|
2599
|
-
function
|
|
2719
|
+
function e_(e) {
|
|
2600
2720
|
if (e.accounts.length < 2)
|
|
2601
2721
|
throw new Error("Not enough accounts");
|
|
2602
2722
|
let t = 0;
|
|
@@ -2610,313 +2730,611 @@ function g_(e) {
|
|
|
2610
2730
|
globalConfigAuthority: n(),
|
|
2611
2731
|
globalConfig: n()
|
|
2612
2732
|
},
|
|
2613
|
-
data:
|
|
2733
|
+
data: Gn().decode(e.data)
|
|
2614
2734
|
};
|
|
2615
2735
|
}
|
|
2616
|
-
const
|
|
2617
|
-
var
|
|
2618
|
-
function
|
|
2736
|
+
const p = "wpAutoU2kNC95CB9SzvSRmhC52ncPabVY225e3pfQA8";
|
|
2737
|
+
var t_ = /* @__PURE__ */ ((e) => (e[e.Automation = 0] = "Automation", e[e.GlobalConfig = 1] = "GlobalConfig", e))(t_ || {}), n_ = /* @__PURE__ */ ((e) => (e[e.InitializeGlobalConfig = 0] = "InitializeGlobalConfig", e[e.UpdateGlobalConfig = 1] = "UpdateGlobalConfig", e[e.CreateAutomation = 2] = "CreateAutomation", e[e.RemoveAutomations = 3] = "RemoveAutomations", e[e.FundAutomation = 4] = "FundAutomation", e[e.HarvestAndReinvest = 5] = "HarvestAndReinvest", e[e.HarvestSwapAndReinvestPre = 6] = "HarvestSwapAndReinvestPre", e[e.HarvestSwapAndReinvestPost = 7] = "HarvestSwapAndReinvestPost", e))(n_ || {});
|
|
2738
|
+
function r_(e) {
|
|
2619
2739
|
const t = "data" in e ? e.data : e;
|
|
2620
|
-
if (
|
|
2740
|
+
if (G(t, R().encode(0), 0))
|
|
2621
2741
|
return 0;
|
|
2622
|
-
if (
|
|
2742
|
+
if (G(t, R().encode(1), 0))
|
|
2623
2743
|
return 1;
|
|
2624
|
-
if (
|
|
2744
|
+
if (G(t, R().encode(2), 0))
|
|
2625
2745
|
return 2;
|
|
2626
|
-
if (
|
|
2746
|
+
if (G(t, R().encode(3), 0))
|
|
2627
2747
|
return 3;
|
|
2628
|
-
if (
|
|
2748
|
+
if (G(t, R().encode(4), 0))
|
|
2629
2749
|
return 4;
|
|
2630
|
-
if (
|
|
2750
|
+
if (G(t, R().encode(5), 0))
|
|
2631
2751
|
return 5;
|
|
2632
|
-
if (
|
|
2752
|
+
if (G(t, R().encode(6), 0))
|
|
2633
2753
|
return 6;
|
|
2634
|
-
if (
|
|
2754
|
+
if (G(t, R().encode(7), 0))
|
|
2635
2755
|
return 7;
|
|
2636
2756
|
throw new Error(
|
|
2637
2757
|
"The provided instruction could not be identified as a whirlpoolsAutomationProgram instruction."
|
|
2638
2758
|
);
|
|
2639
2759
|
}
|
|
2640
|
-
function
|
|
2641
|
-
const t =
|
|
2760
|
+
function qc(e) {
|
|
2761
|
+
const t = r_(e);
|
|
2642
2762
|
switch (t) {
|
|
2643
2763
|
case 0:
|
|
2644
|
-
return
|
|
2764
|
+
return W(e), {
|
|
2645
2765
|
instructionType: 0,
|
|
2646
|
-
...
|
|
2766
|
+
...qs(e)
|
|
2647
2767
|
};
|
|
2648
2768
|
case 1:
|
|
2649
|
-
return
|
|
2769
|
+
return W(e), {
|
|
2650
2770
|
instructionType: 1,
|
|
2651
|
-
...
|
|
2771
|
+
...e_(e)
|
|
2652
2772
|
};
|
|
2653
2773
|
case 2:
|
|
2654
|
-
return
|
|
2774
|
+
return W(e), {
|
|
2655
2775
|
instructionType: 2,
|
|
2656
|
-
...
|
|
2776
|
+
...Ys(e)
|
|
2657
2777
|
};
|
|
2658
2778
|
case 3:
|
|
2659
|
-
return
|
|
2779
|
+
return W(e), {
|
|
2660
2780
|
instructionType: 3,
|
|
2661
|
-
...
|
|
2781
|
+
...Qs(e)
|
|
2662
2782
|
};
|
|
2663
2783
|
case 4:
|
|
2664
|
-
return
|
|
2784
|
+
return W(e), {
|
|
2665
2785
|
instructionType: 4,
|
|
2666
|
-
...
|
|
2786
|
+
...Ks(e)
|
|
2667
2787
|
};
|
|
2668
2788
|
case 5:
|
|
2669
|
-
return
|
|
2789
|
+
return W(e), {
|
|
2670
2790
|
instructionType: 5,
|
|
2671
|
-
...
|
|
2791
|
+
...js(e)
|
|
2672
2792
|
};
|
|
2673
2793
|
case 6:
|
|
2674
|
-
return
|
|
2794
|
+
return W(e), {
|
|
2675
2795
|
instructionType: 6,
|
|
2676
|
-
...
|
|
2796
|
+
...Zs(e)
|
|
2677
2797
|
};
|
|
2678
2798
|
case 7:
|
|
2679
|
-
return
|
|
2799
|
+
return W(e), {
|
|
2680
2800
|
instructionType: 7,
|
|
2681
|
-
...
|
|
2801
|
+
...Js(e)
|
|
2682
2802
|
};
|
|
2683
2803
|
default:
|
|
2684
2804
|
throw new Error(`Unrecognized instruction type: ${t}`);
|
|
2685
2805
|
}
|
|
2686
2806
|
}
|
|
2687
|
-
const
|
|
2688
|
-
let
|
|
2689
|
-
process.env.NODE_ENV !== "production" && (
|
|
2690
|
-
[
|
|
2691
|
-
[
|
|
2692
|
-
[
|
|
2693
|
-
[
|
|
2694
|
-
[
|
|
2695
|
-
[
|
|
2696
|
-
[
|
|
2697
|
-
[
|
|
2698
|
-
[
|
|
2699
|
-
[
|
|
2700
|
-
[
|
|
2701
|
-
[
|
|
2702
|
-
[
|
|
2703
|
-
[
|
|
2704
|
-
[
|
|
2705
|
-
[
|
|
2706
|
-
[
|
|
2707
|
-
[
|
|
2708
|
-
[
|
|
2709
|
-
[
|
|
2710
|
-
[
|
|
2711
|
-
[
|
|
2712
|
-
[
|
|
2713
|
-
[
|
|
2714
|
-
[
|
|
2715
|
-
[
|
|
2716
|
-
[
|
|
2717
|
-
[
|
|
2718
|
-
[
|
|
2719
|
-
[
|
|
2720
|
-
[
|
|
2721
|
-
[
|
|
2807
|
+
const o_ = 6e3, a_ = 6001, i_ = 6002, s_ = 6003, __ = 6004, c_ = 6005, u_ = 6006, R_ = 6007, A_ = 6008, d_ = 6009, l_ = 6010, O_ = 6011, E_ = 6012, N_ = 6013, T_ = 6014, f_ = 6015, S_ = 6016, I_ = 6017, g_ = 6018, m_ = 6019, C_ = 6020, h_ = 6021, v_ = 6022, L_ = 6023, p_ = 6024, D_ = 6025, b_ = 6026, P_ = 6027, U_ = 6028, w_ = 6029, M_ = 6030, y_ = 6031;
|
|
2808
|
+
let Vn;
|
|
2809
|
+
process.env.NODE_ENV !== "production" && (Vn = {
|
|
2810
|
+
[d_]: "Account already initialized",
|
|
2811
|
+
[l_]: "Account not initialized",
|
|
2812
|
+
[g_]: "Arithmetic error",
|
|
2813
|
+
[h_]: "Condition violation",
|
|
2814
|
+
[A_]: "Emit event error",
|
|
2815
|
+
[u_]: "Invalid account address",
|
|
2816
|
+
[__]: "Incorrect owner",
|
|
2817
|
+
[a_]: "Incorrect program id",
|
|
2818
|
+
[b_]: "Insufficient funds to pay crank reward",
|
|
2819
|
+
[U_]: "Insufficient instruction count after this instruction",
|
|
2820
|
+
[P_]: "Insufficient instruction count before this instruction",
|
|
2821
|
+
[w_]: "Invalid accompanying instruction",
|
|
2822
|
+
[R_]: "Invalid account data",
|
|
2823
|
+
[s_]: "Invalid account role",
|
|
2824
|
+
[E_]: "Invalid action",
|
|
2825
|
+
[f_]: "Invalid action data length",
|
|
2826
|
+
[C_]: "Invalid amount to fund automation",
|
|
2827
|
+
[I_]: "Invalid automation action",
|
|
2828
|
+
[T_]: "Invalid automation_index",
|
|
2829
|
+
[N_]: "Invalid condition",
|
|
2830
|
+
[S_]: "Invalid condition data length",
|
|
2831
|
+
[v_]: "Invalid accounts for CPI",
|
|
2832
|
+
[L_]: "Invalid instruction data for CPI",
|
|
2833
|
+
[p_]: "Invalid crank reward",
|
|
2834
|
+
[M_]: "Invalid intermediate swap",
|
|
2835
|
+
[m_]: "Invalid next valid exection timestamp condition",
|
|
2836
|
+
[O_]: "Position token amount must be 1",
|
|
2837
|
+
[y_]: "Invalid remaining accounts length",
|
|
2838
|
+
[c_]: "Invalid seeds",
|
|
2839
|
+
[i_]: "Not enough account keys",
|
|
2840
|
+
[D_]: "Redundant global config update",
|
|
2841
|
+
[o_]: "Unknown instruction discriminator"
|
|
2722
2842
|
});
|
|
2723
|
-
function
|
|
2724
|
-
return process.env.NODE_ENV !== "production" ?
|
|
2843
|
+
function Qc(e) {
|
|
2844
|
+
return process.env.NODE_ENV !== "production" ? Vn[e] : "Error message not available in production bundles.";
|
|
2725
2845
|
}
|
|
2726
|
-
function
|
|
2727
|
-
return
|
|
2846
|
+
function eu(e, t, n) {
|
|
2847
|
+
return fs(
|
|
2728
2848
|
e,
|
|
2729
2849
|
t,
|
|
2730
|
-
|
|
2850
|
+
p,
|
|
2731
2851
|
n
|
|
2732
2852
|
);
|
|
2733
2853
|
}
|
|
2734
|
-
const
|
|
2854
|
+
const tu = 64;
|
|
2855
|
+
/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
2856
|
+
function x_(e) {
|
|
2857
|
+
return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
|
|
2858
|
+
}
|
|
2859
|
+
function Fn(e, t, n = "") {
|
|
2860
|
+
const o = x_(e), r = e?.length;
|
|
2861
|
+
if (!o || t !== void 0) {
|
|
2862
|
+
const i = n && `"${n}" `, s = "", _ = o ? `length=${r}` : `type=${typeof e}`;
|
|
2863
|
+
throw new Error(i + "expected Uint8Array" + s + ", got " + _);
|
|
2864
|
+
}
|
|
2865
|
+
return e;
|
|
2866
|
+
}
|
|
2867
|
+
function Ye(e, t = !0) {
|
|
2868
|
+
if (e.destroyed)
|
|
2869
|
+
throw new Error("Hash instance has been destroyed");
|
|
2870
|
+
if (t && e.finished)
|
|
2871
|
+
throw new Error("Hash#digest() has already been called");
|
|
2872
|
+
}
|
|
2873
|
+
function k_(e, t) {
|
|
2874
|
+
Fn(e, void 0, "digestInto() output");
|
|
2875
|
+
const n = t.outputLen;
|
|
2876
|
+
if (e.length < n)
|
|
2877
|
+
throw new Error('"digestInto() output" expected to be of length >=' + n);
|
|
2878
|
+
}
|
|
2879
|
+
function Ce(...e) {
|
|
2880
|
+
for (let t = 0; t < e.length; t++)
|
|
2881
|
+
e[t].fill(0);
|
|
2882
|
+
}
|
|
2883
|
+
function Te(e) {
|
|
2884
|
+
return new DataView(e.buffer, e.byteOffset, e.byteLength);
|
|
2885
|
+
}
|
|
2886
|
+
function B(e, t) {
|
|
2887
|
+
return e << 32 - t | e >>> t;
|
|
2888
|
+
}
|
|
2889
|
+
function B_(e, t = {}) {
|
|
2890
|
+
const n = (r, a) => e(a).update(r).digest(), o = e(void 0);
|
|
2891
|
+
return n.outputLen = o.outputLen, n.blockLen = o.blockLen, n.create = (r) => e(r), Object.assign(n, t), Object.freeze(n);
|
|
2892
|
+
}
|
|
2893
|
+
const G_ = (e) => ({
|
|
2894
|
+
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e])
|
|
2895
|
+
});
|
|
2896
|
+
function V_(e, t, n) {
|
|
2897
|
+
return e & t ^ ~e & n;
|
|
2898
|
+
}
|
|
2899
|
+
function F_(e, t, n) {
|
|
2900
|
+
return e & t ^ e & n ^ t & n;
|
|
2901
|
+
}
|
|
2902
|
+
class z_ {
|
|
2903
|
+
blockLen;
|
|
2904
|
+
outputLen;
|
|
2905
|
+
padOffset;
|
|
2906
|
+
isLE;
|
|
2907
|
+
// For partial updates less than block size
|
|
2908
|
+
buffer;
|
|
2909
|
+
view;
|
|
2910
|
+
finished = !1;
|
|
2911
|
+
length = 0;
|
|
2912
|
+
pos = 0;
|
|
2913
|
+
destroyed = !1;
|
|
2914
|
+
constructor(t, n, o, r) {
|
|
2915
|
+
this.blockLen = t, this.outputLen = n, this.padOffset = o, this.isLE = r, this.buffer = new Uint8Array(t), this.view = Te(this.buffer);
|
|
2916
|
+
}
|
|
2917
|
+
update(t) {
|
|
2918
|
+
Ye(this), Fn(t);
|
|
2919
|
+
const { view: n, buffer: o, blockLen: r } = this, a = t.length;
|
|
2920
|
+
for (let i = 0; i < a; ) {
|
|
2921
|
+
const s = Math.min(r - this.pos, a - i);
|
|
2922
|
+
if (s === r) {
|
|
2923
|
+
const _ = Te(t);
|
|
2924
|
+
for (; r <= a - i; i += r)
|
|
2925
|
+
this.process(_, i);
|
|
2926
|
+
continue;
|
|
2927
|
+
}
|
|
2928
|
+
o.set(t.subarray(i, i + s), this.pos), this.pos += s, i += s, this.pos === r && (this.process(n, 0), this.pos = 0);
|
|
2929
|
+
}
|
|
2930
|
+
return this.length += t.length, this.roundClean(), this;
|
|
2931
|
+
}
|
|
2932
|
+
digestInto(t) {
|
|
2933
|
+
Ye(this), k_(t, this), this.finished = !0;
|
|
2934
|
+
const { buffer: n, view: o, blockLen: r, isLE: a } = this;
|
|
2935
|
+
let { pos: i } = this;
|
|
2936
|
+
n[i++] = 128, Ce(this.buffer.subarray(i)), this.padOffset > r - i && (this.process(o, 0), i = 0);
|
|
2937
|
+
for (let A = i; A < r; A++)
|
|
2938
|
+
n[A] = 0;
|
|
2939
|
+
o.setBigUint64(r - 8, BigInt(this.length * 8), a), this.process(o, 0);
|
|
2940
|
+
const s = Te(t), _ = this.outputLen;
|
|
2941
|
+
if (_ % 4)
|
|
2942
|
+
throw new Error("_sha2: outputLen must be aligned to 32bit");
|
|
2943
|
+
const N = _ / 4, I = this.get();
|
|
2944
|
+
if (N > I.length)
|
|
2945
|
+
throw new Error("_sha2: outputLen bigger than state");
|
|
2946
|
+
for (let A = 0; A < N; A++)
|
|
2947
|
+
s.setUint32(4 * A, I[A], a);
|
|
2948
|
+
}
|
|
2949
|
+
digest() {
|
|
2950
|
+
const { buffer: t, outputLen: n } = this;
|
|
2951
|
+
this.digestInto(t);
|
|
2952
|
+
const o = t.slice(0, n);
|
|
2953
|
+
return this.destroy(), o;
|
|
2954
|
+
}
|
|
2955
|
+
_cloneInto(t) {
|
|
2956
|
+
t ||= new this.constructor(), t.set(...this.get());
|
|
2957
|
+
const { blockLen: n, buffer: o, length: r, finished: a, destroyed: i, pos: s } = this;
|
|
2958
|
+
return t.destroyed = i, t.finished = a, t.length = r, t.pos = s, r % n && t.buffer.set(o), t;
|
|
2959
|
+
}
|
|
2960
|
+
clone() {
|
|
2961
|
+
return this._cloneInto();
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
const $ = /* @__PURE__ */ Uint32Array.from([
|
|
2965
|
+
1779033703,
|
|
2966
|
+
3144134277,
|
|
2967
|
+
1013904242,
|
|
2968
|
+
2773480762,
|
|
2969
|
+
1359893119,
|
|
2970
|
+
2600822924,
|
|
2971
|
+
528734635,
|
|
2972
|
+
1541459225
|
|
2973
|
+
]), H_ = /* @__PURE__ */ Uint32Array.from([
|
|
2974
|
+
1116352408,
|
|
2975
|
+
1899447441,
|
|
2976
|
+
3049323471,
|
|
2977
|
+
3921009573,
|
|
2978
|
+
961987163,
|
|
2979
|
+
1508970993,
|
|
2980
|
+
2453635748,
|
|
2981
|
+
2870763221,
|
|
2982
|
+
3624381080,
|
|
2983
|
+
310598401,
|
|
2984
|
+
607225278,
|
|
2985
|
+
1426881987,
|
|
2986
|
+
1925078388,
|
|
2987
|
+
2162078206,
|
|
2988
|
+
2614888103,
|
|
2989
|
+
3248222580,
|
|
2990
|
+
3835390401,
|
|
2991
|
+
4022224774,
|
|
2992
|
+
264347078,
|
|
2993
|
+
604807628,
|
|
2994
|
+
770255983,
|
|
2995
|
+
1249150122,
|
|
2996
|
+
1555081692,
|
|
2997
|
+
1996064986,
|
|
2998
|
+
2554220882,
|
|
2999
|
+
2821834349,
|
|
3000
|
+
2952996808,
|
|
3001
|
+
3210313671,
|
|
3002
|
+
3336571891,
|
|
3003
|
+
3584528711,
|
|
3004
|
+
113926993,
|
|
3005
|
+
338241895,
|
|
3006
|
+
666307205,
|
|
3007
|
+
773529912,
|
|
3008
|
+
1294757372,
|
|
3009
|
+
1396182291,
|
|
3010
|
+
1695183700,
|
|
3011
|
+
1986661051,
|
|
3012
|
+
2177026350,
|
|
3013
|
+
2456956037,
|
|
3014
|
+
2730485921,
|
|
3015
|
+
2820302411,
|
|
3016
|
+
3259730800,
|
|
3017
|
+
3345764771,
|
|
3018
|
+
3516065817,
|
|
3019
|
+
3600352804,
|
|
3020
|
+
4094571909,
|
|
3021
|
+
275423344,
|
|
3022
|
+
430227734,
|
|
3023
|
+
506948616,
|
|
3024
|
+
659060556,
|
|
3025
|
+
883997877,
|
|
3026
|
+
958139571,
|
|
3027
|
+
1322822218,
|
|
3028
|
+
1537002063,
|
|
3029
|
+
1747873779,
|
|
3030
|
+
1955562222,
|
|
3031
|
+
2024104815,
|
|
3032
|
+
2227730452,
|
|
3033
|
+
2361852424,
|
|
3034
|
+
2428436474,
|
|
3035
|
+
2756734187,
|
|
3036
|
+
3204031479,
|
|
3037
|
+
3329325298
|
|
3038
|
+
]), X = /* @__PURE__ */ new Uint32Array(64);
|
|
3039
|
+
class W_ extends z_ {
|
|
3040
|
+
constructor(t) {
|
|
3041
|
+
super(64, t, 8, !1);
|
|
3042
|
+
}
|
|
3043
|
+
get() {
|
|
3044
|
+
const { A: t, B: n, C: o, D: r, E: a, F: i, G: s, H: _ } = this;
|
|
3045
|
+
return [t, n, o, r, a, i, s, _];
|
|
3046
|
+
}
|
|
3047
|
+
// prettier-ignore
|
|
3048
|
+
set(t, n, o, r, a, i, s, _) {
|
|
3049
|
+
this.A = t | 0, this.B = n | 0, this.C = o | 0, this.D = r | 0, this.E = a | 0, this.F = i | 0, this.G = s | 0, this.H = _ | 0;
|
|
3050
|
+
}
|
|
3051
|
+
process(t, n) {
|
|
3052
|
+
for (let A = 0; A < 16; A++, n += 4)
|
|
3053
|
+
X[A] = t.getUint32(n, !1);
|
|
3054
|
+
for (let A = 16; A < 64; A++) {
|
|
3055
|
+
const y = X[A - 15], H = X[A - 2], ke = B(y, 7) ^ B(y, 18) ^ y >>> 3, de = B(H, 17) ^ B(H, 19) ^ H >>> 10;
|
|
3056
|
+
X[A] = de + X[A - 7] + ke + X[A - 16] | 0;
|
|
3057
|
+
}
|
|
3058
|
+
let { A: o, B: r, C: a, D: i, E: s, F: _, G: N, H: I } = this;
|
|
3059
|
+
for (let A = 0; A < 64; A++) {
|
|
3060
|
+
const y = B(s, 6) ^ B(s, 11) ^ B(s, 25), H = I + y + V_(s, _, N) + H_[A] + X[A] | 0, de = (B(o, 2) ^ B(o, 13) ^ B(o, 22)) + F_(o, r, a) | 0;
|
|
3061
|
+
I = N, N = _, _ = s, s = i + H | 0, i = a, a = r, r = o, o = H + de | 0;
|
|
3062
|
+
}
|
|
3063
|
+
o = o + this.A | 0, r = r + this.B | 0, a = a + this.C | 0, i = i + this.D | 0, s = s + this.E | 0, _ = _ + this.F | 0, N = N + this.G | 0, I = I + this.H | 0, this.set(o, r, a, i, s, _, N, I);
|
|
3064
|
+
}
|
|
3065
|
+
roundClean() {
|
|
3066
|
+
Ce(X);
|
|
3067
|
+
}
|
|
3068
|
+
destroy() {
|
|
3069
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), Ce(this.buffer);
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3072
|
+
class $_ extends W_ {
|
|
3073
|
+
// We cannot use array here since array allows indexing by variable
|
|
3074
|
+
// which means optimizer/compiler cannot use registers.
|
|
3075
|
+
A = $[0] | 0;
|
|
3076
|
+
B = $[1] | 0;
|
|
3077
|
+
C = $[2] | 0;
|
|
3078
|
+
D = $[3] | 0;
|
|
3079
|
+
E = $[4] | 0;
|
|
3080
|
+
F = $[5] | 0;
|
|
3081
|
+
G = $[6] | 0;
|
|
3082
|
+
H = $[7] | 0;
|
|
3083
|
+
constructor() {
|
|
3084
|
+
super(32);
|
|
3085
|
+
}
|
|
3086
|
+
}
|
|
3087
|
+
const X_ = /* @__PURE__ */ B_(
|
|
3088
|
+
() => new $_(),
|
|
3089
|
+
/* @__PURE__ */ G_(1)
|
|
3090
|
+
), Ae = c(), Ke = Le(), Y_ = new TextEncoder().encode("ProgramDerivedAddress");
|
|
3091
|
+
function xe(e, t) {
|
|
3092
|
+
const n = Ke.encode(e);
|
|
3093
|
+
for (let o = 255; o > 0; o--) {
|
|
3094
|
+
const r = [];
|
|
3095
|
+
for (const s of t) r.push(...s);
|
|
3096
|
+
r.push(o), r.push(...n), r.push(...Y_);
|
|
3097
|
+
const a = X_(new Uint8Array(r)), i = Ke.decode(a);
|
|
3098
|
+
if (es(i)) return [i, o];
|
|
3099
|
+
}
|
|
3100
|
+
throw new Error("Failed to find viable PDA bump seed");
|
|
3101
|
+
}
|
|
3102
|
+
async function nu() {
|
|
3103
|
+
return pe({
|
|
3104
|
+
programAddress: p,
|
|
3105
|
+
seeds: [new TextEncoder().encode("global_config")]
|
|
3106
|
+
});
|
|
3107
|
+
}
|
|
3108
|
+
async function ru(e, t) {
|
|
3109
|
+
return pe({
|
|
3110
|
+
programAddress: p,
|
|
3111
|
+
seeds: [
|
|
3112
|
+
new TextEncoder().encode("automation"),
|
|
3113
|
+
Ae.encode(e),
|
|
3114
|
+
new Uint8Array([t])
|
|
3115
|
+
]
|
|
3116
|
+
});
|
|
3117
|
+
}
|
|
3118
|
+
async function ou(e) {
|
|
3119
|
+
return pe({
|
|
3120
|
+
programAddress: p,
|
|
3121
|
+
seeds: [
|
|
3122
|
+
new TextEncoder().encode("automation-authority"),
|
|
3123
|
+
Ae.encode(e)
|
|
3124
|
+
]
|
|
3125
|
+
});
|
|
3126
|
+
}
|
|
3127
|
+
function au() {
|
|
3128
|
+
return xe(p, [
|
|
3129
|
+
new TextEncoder().encode("global_config")
|
|
3130
|
+
]);
|
|
3131
|
+
}
|
|
3132
|
+
function iu(e, t) {
|
|
3133
|
+
return xe(p, [
|
|
3134
|
+
new TextEncoder().encode("automation"),
|
|
3135
|
+
Ae.encode(e),
|
|
3136
|
+
new Uint8Array([t])
|
|
3137
|
+
]);
|
|
3138
|
+
}
|
|
3139
|
+
function su(e) {
|
|
3140
|
+
return xe(p, [
|
|
3141
|
+
new TextEncoder().encode("automation-authority"),
|
|
3142
|
+
Ae.encode(e)
|
|
3143
|
+
]);
|
|
3144
|
+
}
|
|
3145
|
+
const _u = "J5YZi2SoRbaAFcMJWcvkQRUgpB3YdMHJ4AEKhEV6ED7x";
|
|
2735
3146
|
export {
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
3147
|
+
De as AccountDiscriminator,
|
|
3148
|
+
Ue as Action,
|
|
3149
|
+
En as CREATE_AUTOMATION_DISCRIMINATOR,
|
|
3150
|
+
fn as FUND_AUTOMATION_DISCRIMINATOR,
|
|
3151
|
+
we as FundAutomationMethod,
|
|
3152
|
+
gn as HARVEST_AND_REINVEST_DISCRIMINATOR,
|
|
3153
|
+
hn as HARVEST_SWAP_AND_REINVEST_POST_DISCRIMINATOR,
|
|
3154
|
+
pn as HARVEST_SWAP_AND_REINVEST_PRE_DISCRIMINATOR,
|
|
3155
|
+
Pn as INITIALIZE_GLOBAL_CONFIG_DISCRIMINATOR,
|
|
3156
|
+
Me as IncreaseLiquidityByTokenAmountsAccountsType,
|
|
3157
|
+
tu as MAX_AUTOMATION_INDEX,
|
|
3158
|
+
Mn as REMOVE_AUTOMATIONS_DISCRIMINATOR,
|
|
3159
|
+
ye as TokenAccountState,
|
|
3160
|
+
kn as UPDATE_GLOBAL_CONFIG_DISCRIMINATOR,
|
|
3161
|
+
d_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__ACCOUNT_ALREADY_INITIALIZED,
|
|
3162
|
+
l_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__ACCOUNT_NOT_INITIALIZED,
|
|
3163
|
+
g_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__ARITHMETIC_ERROR,
|
|
3164
|
+
h_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__CONDITION_VIOLATION,
|
|
3165
|
+
A_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__EMIT_EVENT_ERROR,
|
|
3166
|
+
u_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INCORRECT_ACCOUNT_ADDRESS,
|
|
3167
|
+
__ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INCORRECT_OWNER,
|
|
3168
|
+
a_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INCORRECT_PROGRAM_ID,
|
|
3169
|
+
b_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_FUNDS_TO_PAY_CRANK_REWARD,
|
|
3170
|
+
U_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_INSTRUCTION_COUNT_AFTER,
|
|
3171
|
+
P_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INSUFFICIENT_INSTRUCTION_COUNT_BEFORE,
|
|
3172
|
+
w_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACCOMPANYING_INSTRUCTION,
|
|
3173
|
+
R_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACCOUNT_DATA,
|
|
3174
|
+
s_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACCOUNT_ROLE,
|
|
3175
|
+
E_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACTION,
|
|
3176
|
+
f_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_ACTION_DATA_LENGTH,
|
|
3177
|
+
C_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_AMOUNT_TO_FUND_AUTOMATION,
|
|
3178
|
+
I_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_AUTOMATION_ACTION,
|
|
3179
|
+
T_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_AUTOMATION_INDEX,
|
|
3180
|
+
N_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_CONDITION,
|
|
3181
|
+
S_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_CONDITION_DATA_LENGTH,
|
|
3182
|
+
p_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_CRANK_REWARD,
|
|
3183
|
+
v_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_C_P_I_ACCOUNTS,
|
|
3184
|
+
L_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_C_P_I_INSTRUCTION_DATA,
|
|
3185
|
+
M_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_INTERMEDIATE_SWAP,
|
|
3186
|
+
m_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_NEXT_VALID_EXECUTION_TIMESTAMP_CONDITION,
|
|
3187
|
+
O_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_POSITION_TOKEN_AMOUNT,
|
|
3188
|
+
y_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_REMAINING_ACCOUNTS_LENGTH,
|
|
3189
|
+
c_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__INVALID_SEEDS,
|
|
3190
|
+
i_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__NOT_ENOUGH_ACCOUNT_KEYS,
|
|
3191
|
+
D_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__REDUNDANT_GLOBAL_CONFIG_UPDATE,
|
|
3192
|
+
o_ as WHIRLPOOLS_AUTOMATION_PROGRAM_ERROR__UNKNOWN_INSTRUCTION_DISCRIMINATOR,
|
|
3193
|
+
p as WHIRLPOOLS_AUTOMATION_PROGRAM_PROGRAM_ADDRESS,
|
|
3194
|
+
_u as WHIRLPOOLS_AUTOMATION_PROGRAM_STAGING_ADDRESS,
|
|
3195
|
+
t_ as WhirlpoolsAutomationProgramAccount,
|
|
3196
|
+
n_ as WhirlpoolsAutomationProgramInstruction,
|
|
3197
|
+
Yi as address,
|
|
3198
|
+
Z_ as condition,
|
|
3199
|
+
dn as decodeAutomation,
|
|
3200
|
+
On as decodeGlobalConfig,
|
|
3201
|
+
ec as event,
|
|
3202
|
+
Cc as fetchAllAutomation,
|
|
3203
|
+
Lc as fetchAllGlobalConfig,
|
|
3204
|
+
zs as fetchAllMaybeAutomation,
|
|
3205
|
+
$s as fetchAllMaybeGlobalConfig,
|
|
3206
|
+
mc as fetchAutomation,
|
|
3207
|
+
vc as fetchGlobalConfig,
|
|
3208
|
+
Fs as fetchMaybeAutomation,
|
|
3209
|
+
Ws as fetchMaybeGlobalConfig,
|
|
3210
|
+
ru as findAutomationAddress,
|
|
3211
|
+
iu as findAutomationAddressSync,
|
|
3212
|
+
ou as findAutomationAuthorityAddress,
|
|
3213
|
+
su as findAutomationAuthorityAddressSync,
|
|
3214
|
+
nu as findGlobalConfigAddress,
|
|
3215
|
+
au as findGlobalConfigAddressSync,
|
|
3216
|
+
oc as fundAutomationVariant,
|
|
3217
|
+
K_ as getAccountDiscriminatorCodec,
|
|
3218
|
+
Pe as getAccountDiscriminatorDecoder,
|
|
3219
|
+
be as getAccountDiscriminatorEncoder,
|
|
3220
|
+
j_ as getActionCodec,
|
|
3221
|
+
Xt as getActionDecoder,
|
|
3222
|
+
$t as getActionEncoder,
|
|
2805
3223
|
u as getAddressDecoder,
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
3224
|
+
c as getAddressEncoder,
|
|
3225
|
+
gc as getAutomationCodec,
|
|
3226
|
+
An as getAutomationDecoder,
|
|
3227
|
+
Vs as getAutomationEncoder,
|
|
3228
|
+
J_ as getConditionCodec,
|
|
3229
|
+
Kt as getConditionDecoder,
|
|
3230
|
+
Yt as getConditionEncoder,
|
|
3231
|
+
pc as getCreateAutomationDiscriminatorBytes,
|
|
3232
|
+
bc as getCreateAutomationInstruction,
|
|
3233
|
+
Dc as getCreateAutomationInstructionDataCodec,
|
|
3234
|
+
Tn as getCreateAutomationInstructionDataDecoder,
|
|
3235
|
+
Nn as getCreateAutomationInstructionDataEncoder,
|
|
3236
|
+
Q_ as getEventCodec,
|
|
3237
|
+
Ls as getEventDecoder,
|
|
3238
|
+
vs as getEventEncoder,
|
|
3239
|
+
Pc as getFundAutomationDiscriminatorBytes,
|
|
3240
|
+
wc as getFundAutomationInstruction,
|
|
3241
|
+
Uc as getFundAutomationInstructionDataCodec,
|
|
3242
|
+
In as getFundAutomationInstructionDataDecoder,
|
|
3243
|
+
Sn as getFundAutomationInstructionDataEncoder,
|
|
3244
|
+
nc as getFundAutomationMethodCodec,
|
|
3245
|
+
Jt as getFundAutomationMethodDecoder,
|
|
3246
|
+
jt as getFundAutomationMethodEncoder,
|
|
3247
|
+
rc as getFundAutomationVariantCodec,
|
|
3248
|
+
qt as getFundAutomationVariantDecoder,
|
|
3249
|
+
Zt as getFundAutomationVariantEncoder,
|
|
3250
|
+
hc as getGlobalConfigCodec,
|
|
3251
|
+
ln as getGlobalConfigDecoder,
|
|
3252
|
+
Hs as getGlobalConfigEncoder,
|
|
3253
|
+
Mc as getHarvestAndReinvestDiscriminatorBytes,
|
|
3254
|
+
xc as getHarvestAndReinvestInstruction,
|
|
3255
|
+
yc as getHarvestAndReinvestInstructionDataCodec,
|
|
3256
|
+
Cn as getHarvestAndReinvestInstructionDataDecoder,
|
|
3257
|
+
mn as getHarvestAndReinvestInstructionDataEncoder,
|
|
3258
|
+
kc as getHarvestSwapAndReinvestPostDiscriminatorBytes,
|
|
3259
|
+
Gc as getHarvestSwapAndReinvestPostInstruction,
|
|
3260
|
+
Bc as getHarvestSwapAndReinvestPostInstructionDataCodec,
|
|
3261
|
+
Ln as getHarvestSwapAndReinvestPostInstructionDataDecoder,
|
|
3262
|
+
vn as getHarvestSwapAndReinvestPostInstructionDataEncoder,
|
|
3263
|
+
Vc as getHarvestSwapAndReinvestPreDiscriminatorBytes,
|
|
3264
|
+
zc as getHarvestSwapAndReinvestPreInstruction,
|
|
3265
|
+
Fc as getHarvestSwapAndReinvestPreInstructionDataCodec,
|
|
3266
|
+
bn as getHarvestSwapAndReinvestPreInstructionDataDecoder,
|
|
3267
|
+
Dn as getHarvestSwapAndReinvestPreInstructionDataEncoder,
|
|
3268
|
+
ic as getIncreaseLiquidityByTokenAmountsAccountsTypeCodec,
|
|
3269
|
+
en as getIncreaseLiquidityByTokenAmountsAccountsTypeDecoder,
|
|
3270
|
+
Qt as getIncreaseLiquidityByTokenAmountsAccountsTypeEncoder,
|
|
3271
|
+
sc as getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoCodec,
|
|
3272
|
+
Ds as getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoDecoder,
|
|
3273
|
+
ps as getIncreaseLiquidityByTokenAmountsRemainingAccountsInfoEncoder,
|
|
3274
|
+
_c as getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceCodec,
|
|
3275
|
+
nn as getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceDecoder,
|
|
3276
|
+
tn as getIncreaseLiquidityByTokenAmountsRemainingAccountsSliceEncoder,
|
|
3277
|
+
cc as getIncreaseLiquidityMethodCodec,
|
|
3278
|
+
Ps as getIncreaseLiquidityMethodDecoder,
|
|
3279
|
+
bs as getIncreaseLiquidityMethodEncoder,
|
|
3280
|
+
Hc as getInitializeGlobalConfigDiscriminatorBytes,
|
|
3281
|
+
$c as getInitializeGlobalConfigInstruction,
|
|
3282
|
+
Wc as getInitializeGlobalConfigInstructionDataCodec,
|
|
3283
|
+
wn as getInitializeGlobalConfigInstructionDataDecoder,
|
|
3284
|
+
Un as getInitializeGlobalConfigInstructionDataEncoder,
|
|
3285
|
+
hs as getNonZeroU32Decoder,
|
|
3286
|
+
Cs as getNonZeroU32Encoder,
|
|
3287
|
+
Ac as getPositionCodec,
|
|
3288
|
+
ws as getPositionDecoder,
|
|
3289
|
+
Us as getPositionEncoder,
|
|
3290
|
+
dc as getPositionRewardInfoCodec,
|
|
3291
|
+
on as getPositionRewardInfoDecoder,
|
|
3292
|
+
rn as getPositionRewardInfoEncoder,
|
|
3293
|
+
Xc as getRemoveAutomationsDiscriminatorBytes,
|
|
3294
|
+
Kc as getRemoveAutomationsInstruction,
|
|
3295
|
+
Yc as getRemoveAutomationsInstructionDataCodec,
|
|
3296
|
+
xn as getRemoveAutomationsInstructionDataDecoder,
|
|
3297
|
+
yn as getRemoveAutomationsInstructionDataEncoder,
|
|
3298
|
+
lc as getTokenAccountCodec,
|
|
3299
|
+
ys as getTokenAccountDecoder,
|
|
3300
|
+
Ms as getTokenAccountEncoder,
|
|
3301
|
+
Oc as getTokenAccountStateCodec,
|
|
3302
|
+
sn as getTokenAccountStateDecoder,
|
|
3303
|
+
an as getTokenAccountStateEncoder,
|
|
3304
|
+
Ec as getTokenMintCodec,
|
|
3305
|
+
ks as getTokenMintDecoder,
|
|
3306
|
+
xs as getTokenMintEncoder,
|
|
3307
|
+
jc as getUpdateGlobalConfigDiscriminatorBytes,
|
|
3308
|
+
Zc as getUpdateGlobalConfigInstruction,
|
|
3309
|
+
Jc as getUpdateGlobalConfigInstructionDataCodec,
|
|
3310
|
+
Gn as getUpdateGlobalConfigInstructionDataDecoder,
|
|
3311
|
+
Bn as getUpdateGlobalConfigInstructionDataEncoder,
|
|
3312
|
+
Nc as getUpdateGlobalConfigVariantCodec,
|
|
3313
|
+
cn as getUpdateGlobalConfigVariantDecoder,
|
|
3314
|
+
_n as getUpdateGlobalConfigVariantEncoder,
|
|
3315
|
+
Sc as getWhirlpoolCodec,
|
|
3316
|
+
Gs as getWhirlpoolDecoder,
|
|
3317
|
+
Bs as getWhirlpoolEncoder,
|
|
3318
|
+
Ic as getWhirlpoolRewardInfoCodec,
|
|
3319
|
+
Rn as getWhirlpoolRewardInfoDecoder,
|
|
3320
|
+
un as getWhirlpoolRewardInfoEncoder,
|
|
3321
|
+
Qc as getWhirlpoolsAutomationProgramErrorMessage,
|
|
3322
|
+
r_ as identifyWhirlpoolsAutomationProgramInstruction,
|
|
3323
|
+
uc as increaseLiquidityMethod,
|
|
3324
|
+
q_ as isCondition,
|
|
3325
|
+
tc as isEvent,
|
|
3326
|
+
ac as isFundAutomationVariant,
|
|
3327
|
+
Rc as isIncreaseLiquidityMethod,
|
|
3328
|
+
fc as isUpdateGlobalConfigVariant,
|
|
3329
|
+
eu as isWhirlpoolsAutomationProgramError,
|
|
3330
|
+
Ys as parseCreateAutomationInstruction,
|
|
3331
|
+
Ks as parseFundAutomationInstruction,
|
|
3332
|
+
js as parseHarvestAndReinvestInstruction,
|
|
3333
|
+
Js as parseHarvestSwapAndReinvestPostInstruction,
|
|
3334
|
+
Zs as parseHarvestSwapAndReinvestPreInstruction,
|
|
3335
|
+
qs as parseInitializeGlobalConfigInstruction,
|
|
3336
|
+
Qs as parseRemoveAutomationsInstruction,
|
|
3337
|
+
e_ as parseUpdateGlobalConfigInstruction,
|
|
3338
|
+
qc as parseWhirlpoolsAutomationProgramInstruction,
|
|
3339
|
+
Tc as updateGlobalConfigVariant
|
|
2922
3340
|
};
|