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