@orca-so/whirlpools-automation 0.1.3 → 0.3.0

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