viem 2.52.2 → 2.53.1

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.
Files changed (67) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
  3. package/_cjs/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
  4. package/_cjs/chains/definitions/monad.js +5 -5
  5. package/_cjs/chains/definitions/monad.js.map +1 -1
  6. package/_cjs/chains/definitions/whitechainSepolia.js +31 -0
  7. package/_cjs/chains/definitions/whitechainSepolia.js.map +1 -0
  8. package/_cjs/chains/index.js +4 -2
  9. package/_cjs/chains/index.js.map +1 -1
  10. package/_cjs/errors/version.js +1 -1
  11. package/_cjs/tempo/Abis.js +1866 -1866
  12. package/_cjs/tempo/Abis.js.map +1 -1
  13. package/_cjs/tempo/Client.js +27 -0
  14. package/_cjs/tempo/Client.js.map +1 -0
  15. package/_cjs/tempo/Scopes.js +39 -0
  16. package/_cjs/tempo/Scopes.js.map +1 -0
  17. package/_cjs/tempo/Selectors.js +226 -0
  18. package/_cjs/tempo/Selectors.js.map +1 -0
  19. package/_cjs/tempo/index.js +13 -1
  20. package/_cjs/tempo/index.js.map +1 -1
  21. package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js +2 -0
  22. package/_esm/account-abstraction/actions/bundler/estimateUserOperationGas.js.map +1 -1
  23. package/_esm/chains/definitions/monad.js +5 -5
  24. package/_esm/chains/definitions/monad.js.map +1 -1
  25. package/_esm/chains/definitions/whitechainSepolia.js +28 -0
  26. package/_esm/chains/definitions/whitechainSepolia.js.map +1 -0
  27. package/_esm/chains/index.js +1 -0
  28. package/_esm/chains/index.js.map +1 -1
  29. package/_esm/errors/version.js +1 -1
  30. package/_esm/tempo/Abis.js +1865 -1865
  31. package/_esm/tempo/Abis.js.map +1 -1
  32. package/_esm/tempo/Client.js +66 -0
  33. package/_esm/tempo/Client.js.map +1 -0
  34. package/_esm/tempo/Scopes.js +49 -0
  35. package/_esm/tempo/Scopes.js.map +1 -0
  36. package/_esm/tempo/Selectors.js +224 -0
  37. package/_esm/tempo/Selectors.js.map +1 -0
  38. package/_esm/tempo/index.js +9 -0
  39. package/_esm/tempo/index.js.map +1 -1
  40. package/_types/account-abstraction/actions/bundler/estimateUserOperationGas.d.ts.map +1 -1
  41. package/_types/chains/definitions/monad.d.ts +5 -5
  42. package/_types/chains/definitions/whitechainSepolia.d.ts +46 -0
  43. package/_types/chains/definitions/whitechainSepolia.d.ts.map +1 -0
  44. package/_types/chains/index.d.ts +1 -0
  45. package/_types/chains/index.d.ts.map +1 -1
  46. package/_types/errors/version.d.ts +1 -1
  47. package/_types/tempo/Abis.d.ts +5816 -5816
  48. package/_types/tempo/Abis.d.ts.map +1 -1
  49. package/_types/tempo/Client.d.ts +98 -0
  50. package/_types/tempo/Client.d.ts.map +1 -0
  51. package/_types/tempo/Scopes.d.ts +48 -0
  52. package/_types/tempo/Scopes.d.ts.map +1 -0
  53. package/_types/tempo/Selectors.d.ts +223 -0
  54. package/_types/tempo/Selectors.d.ts.map +1 -0
  55. package/_types/tempo/index.d.ts +9 -0
  56. package/_types/tempo/index.d.ts.map +1 -1
  57. package/account-abstraction/actions/bundler/estimateUserOperationGas.ts +2 -0
  58. package/chains/definitions/monad.ts +5 -5
  59. package/chains/definitions/whitechainSepolia.ts +28 -0
  60. package/chains/index.ts +1 -0
  61. package/errors/version.ts +1 -1
  62. package/package.json +1 -1
  63. package/tempo/Abis.ts +1869 -1869
  64. package/tempo/Client.ts +172 -0
  65. package/tempo/Scopes.ts +124 -0
  66. package/tempo/Selectors.ts +260 -0
  67. package/tempo/index.ts +34 -0
@@ -0,0 +1,172 @@
1
+ import type { Address } from 'abitype'
2
+ import type { TokenId } from 'ox/tempo'
3
+
4
+ import type { JsonRpcAccount } from '../accounts/types.js'
5
+ import {
6
+ type Client as Client_,
7
+ type ClientConfig as ClientConfig_,
8
+ createClient as createClient_,
9
+ } from '../clients/createClient.js'
10
+ import {
11
+ type PublicActions,
12
+ publicActions,
13
+ } from '../clients/decorators/public.js'
14
+ import {
15
+ type WalletActions,
16
+ walletActions,
17
+ } from '../clients/decorators/wallet.js'
18
+ import type { Transport } from '../clients/transports/createTransport.js'
19
+ import { http } from '../clients/transports/http.js'
20
+ import type { ErrorType } from '../errors/utils.js'
21
+ import type { Account } from '../types/account.js'
22
+ import type { Chain } from '../types/chain.js'
23
+ import type { RpcSchema } from '../types/eip1193.js'
24
+ import type { Prettify } from '../types/utils.js'
25
+ import { tempo, tempoTestnet } from './Chain.js'
26
+ import { type Decorator, decorator as tempoActions } from './Decorator.js'
27
+
28
+ /**
29
+ * Configuration for a Tempo {@link Client}.
30
+ *
31
+ * Extends Viem's {@link ClientConfig} with Tempo-specific defaults: `chain`
32
+ * and `transport` become optional, and a `testnet` flag is added to select
33
+ * the Tempo testnet chain.
34
+ */
35
+ export type ClientConfig<
36
+ transport extends Transport = Transport,
37
+ chain extends Chain | undefined = Chain | undefined,
38
+ accountOrAddress extends Account | Address | undefined =
39
+ | Account
40
+ | Address
41
+ | undefined,
42
+ rpcSchema extends RpcSchema | undefined = undefined,
43
+ > = Prettify<
44
+ Omit<
45
+ ClientConfig_<transport, chain, accountOrAddress, rpcSchema>,
46
+ 'chain' | 'transport'
47
+ > & {
48
+ /**
49
+ * Chain for the Client.
50
+ *
51
+ * @default tempo (or `tempoTestnet` when `testnet` is truthy)
52
+ */
53
+ chain?: chain | Chain | undefined
54
+ /**
55
+ * Default fee token for the Client. Extended onto the chain so it applies
56
+ * to every transaction sent with the Client.
57
+ */
58
+ feeToken?: TokenId.TokenIdOrAddress | undefined
59
+ /**
60
+ * Whether to use the Tempo testnet chain.
61
+ *
62
+ * Ignored when `chain` is provided.
63
+ *
64
+ * @default false
65
+ */
66
+ testnet?: boolean | undefined
67
+ /**
68
+ * The RPC transport.
69
+ *
70
+ * @default http()
71
+ */
72
+ transport?: transport | Transport | undefined
73
+ }
74
+ >
75
+
76
+ /**
77
+ * A Tempo {@link Client}: Viem's base Client decorated with
78
+ * `publicActions`, `walletActions`, and `tempoActions`.
79
+ */
80
+ export type Client<
81
+ transport extends Transport = Transport,
82
+ chain extends Chain | undefined = Chain | undefined,
83
+ account extends Account | undefined = Account | undefined,
84
+ rpcSchema extends RpcSchema | undefined = undefined,
85
+ > = Prettify<
86
+ Client_<
87
+ transport,
88
+ chain,
89
+ account,
90
+ rpcSchema,
91
+ PublicActions<transport, chain, account> &
92
+ WalletActions<chain, account> &
93
+ Decorator<chain, account>
94
+ >
95
+ >
96
+
97
+ export type CreateClientErrorType = ErrorType
98
+
99
+ /**
100
+ * Creates a Tempo {@link Client}: an extension of Viem's `createClient`
101
+ * decorated with `publicActions`, `walletActions`, and `tempoActions`.
102
+ *
103
+ * Defaults to the `tempo` mainnet chain and `http` transport, so a minimal
104
+ * client can be created with `createClient()`. Pass `testnet` to use the
105
+ * Tempo testnet, or `chain` to override the chain entirely. Pass `feeToken`
106
+ * to set a default fee token for every transaction.
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * import { createClient } from 'viem/tempo'
111
+ *
112
+ * // Minimal client (tempo mainnet, http transport).
113
+ * const client = createClient()
114
+ * ```
115
+ *
116
+ * @example
117
+ * ```ts
118
+ * import { Account, createClient, http } from 'viem/tempo'
119
+ *
120
+ * // Testnet client with an account and custom transport.
121
+ * const client = createClient({
122
+ * account: Account.fromSecp256k1('0x...'),
123
+ * testnet: true,
124
+ * transport: http('https://rpc.example.com'),
125
+ * })
126
+ * ```
127
+ *
128
+ * @example
129
+ * ```ts
130
+ * import { createClient } from 'viem/tempo'
131
+ *
132
+ * // Client with a default fee token.
133
+ * const client = createClient({
134
+ * feeToken: '0x20c0000000000000000000000000000000000001',
135
+ * })
136
+ * ```
137
+ *
138
+ * @param parameters - Parameters.
139
+ * @returns The Tempo Client.
140
+ */
141
+ export function createClient<
142
+ transport extends Transport = Transport,
143
+ chain extends Chain | undefined = typeof tempo,
144
+ accountOrAddress extends Account | Address | undefined = undefined,
145
+ rpcSchema extends RpcSchema | undefined = undefined,
146
+ >(
147
+ parameters: ClientConfig<transport, chain, accountOrAddress, rpcSchema> = {},
148
+ ): Client<
149
+ transport,
150
+ chain,
151
+ accountOrAddress extends Address
152
+ ? Prettify<JsonRpcAccount<accountOrAddress>>
153
+ : accountOrAddress,
154
+ rpcSchema
155
+ > {
156
+ const { chain, feeToken, testnet, transport, ...rest } = parameters
157
+ const baseChain = chain ?? (testnet ? tempoTestnet : tempo)
158
+ const resolvedChain =
159
+ feeToken && typeof (baseChain as { extend?: unknown }).extend === 'function'
160
+ ? (baseChain as { extend: (e: { feeToken: unknown }) => Chain }).extend({
161
+ feeToken,
162
+ })
163
+ : baseChain
164
+ return createClient_({
165
+ ...rest,
166
+ chain: resolvedChain,
167
+ transport: transport ?? http(),
168
+ } as ClientConfig_)
169
+ .extend(publicActions)
170
+ .extend(walletActions)
171
+ .extend(tempoActions()) as never
172
+ }
@@ -0,0 +1,124 @@
1
+ import type { Address } from 'abitype'
2
+ import type { KeyAuthorization } from 'ox/tempo'
3
+ import * as Selectors from './Selectors.js'
4
+
5
+ export type Selector = NonNullable<KeyAuthorization.Scope['selector']>
6
+
7
+ export type Options = {
8
+ /** Recipient allowlist for selectors that support recipient restrictions. */
9
+ recipients?: readonly Address[] | undefined
10
+ }
11
+
12
+ export type Scope<
13
+ address extends Address = Address,
14
+ selector extends Selector | undefined = Selector | undefined,
15
+ > = Omit<KeyAuthorization.Scope, 'address' | 'recipients' | 'selector'> & {
16
+ address: address
17
+ recipients?: readonly Address[] | undefined
18
+ selector?: selector | undefined
19
+ }
20
+
21
+ export type Target<address extends Address = Address> = {
22
+ /** Allows any selector on the target. */
23
+ any: () => Scope<address, undefined>
24
+ /** Allows calls matching the selector on the target. */
25
+ selector: <selector extends Selector>(
26
+ selector: selector,
27
+ options?: Options | undefined,
28
+ ) => Scope<address, selector>
29
+ }
30
+
31
+ export type SelectorMap = Record<string, Selector | Record<string, Selector>>
32
+
33
+ export type Contract<
34
+ address extends Address = Address,
35
+ selectors extends SelectorMap = SelectorMap,
36
+ > = Target<address> & {
37
+ readonly [name in keyof selectors]: selectors[name] extends Selector
38
+ ? (options?: Options | undefined) => Scope<address, selectors[name]>
39
+ : selectors[name] extends Record<string, Selector>
40
+ ? OverloadedSelector<address, selectors[name]>
41
+ : never
42
+ }
43
+
44
+ export type OverloadedSelector<
45
+ address extends Address = Address,
46
+ selectors extends Record<string, Selector> = Record<string, Selector>,
47
+ > = {
48
+ readonly [signature in keyof selectors]: (
49
+ options?: Options | undefined,
50
+ ) => Scope<address, selectors[signature]>
51
+ } & {
52
+ selector: <signature extends keyof selectors>(
53
+ signature: signature,
54
+ options?: Options | undefined,
55
+ ) => Scope<address, selectors[signature]>
56
+ }
57
+
58
+ export type Tip20<address extends Address = Address> = Contract<
59
+ address,
60
+ typeof Selectors.tip20
61
+ >
62
+
63
+ /**
64
+ * Creates a call scope builder for an arbitrary target.
65
+ *
66
+ * @experimental
67
+ */
68
+ export function target<address extends Address>(
69
+ address: address,
70
+ ): Target<address> {
71
+ return {
72
+ any: () => ({ address }),
73
+ selector: (selector, options) => ({
74
+ address,
75
+ ...(options && 'recipients' in options
76
+ ? { recipients: options.recipients }
77
+ : {}),
78
+ selector,
79
+ }),
80
+ }
81
+ }
82
+
83
+ /**
84
+ * Creates a typed call scope builder from a selector map.
85
+ *
86
+ * @experimental
87
+ */
88
+ export function contract<
89
+ address extends Address,
90
+ selectors extends SelectorMap,
91
+ >(address: address, selectors: selectors): Contract<address, selectors> {
92
+ const target_ = target(address)
93
+ const result: Record<string, unknown> = { ...target_ }
94
+
95
+ for (const [name, selector] of Object.entries(selectors)) {
96
+ if (typeof selector === 'string') {
97
+ result[name] = (options?: Options | undefined) =>
98
+ target_.selector(selector, options)
99
+ continue
100
+ }
101
+
102
+ const overloads: Record<string, unknown> = {}
103
+ for (const [signature, overloadSelector] of Object.entries(selector)) {
104
+ overloads[signature] = (options?: Options | undefined) =>
105
+ target_.selector(overloadSelector, options)
106
+ }
107
+ overloads.selector = (signature: string, options?: Options | undefined) =>
108
+ target_.selector(selector[signature]!, options)
109
+ result[name] = overloads
110
+ }
111
+
112
+ return result as Contract<address, selectors>
113
+ }
114
+
115
+ /**
116
+ * Creates a call scope builder for a TIP-20 token.
117
+ *
118
+ * @experimental
119
+ */
120
+ export function tip20<address extends Address>(
121
+ address: address,
122
+ ): Tip20<address> {
123
+ return contract(address, Selectors.tip20)
124
+ }
@@ -0,0 +1,260 @@
1
+ // Generated with `pnpm gen:abis`. Do not modify manually.
2
+
3
+ import type { Abi, ExtractAbiFunctionNames } from 'abitype'
4
+ import type { Hex } from '../types/misc.js'
5
+ import type * as Abis from './Abis.js'
6
+
7
+ type FunctionSelectors<abi extends Abi, excluded extends string = never> = {
8
+ readonly [name in Exclude<ExtractAbiFunctionNames<abi>, excluded>]: Hex
9
+ }
10
+
11
+ type OverloadedFunctionSelectors<names extends string> = {
12
+ readonly [name in names]: Record<string, Hex>
13
+ }
14
+
15
+ export const accountKeychain = {
16
+ authorizeAdminKey: '0x9a424307',
17
+ authorizeKey: {
18
+ 'authorizeKey(address,uint8,(uint64,bool,(address,uint256,uint64)[],bool,(address,(bytes4,address[])[])[]))':
19
+ '0x980a6025',
20
+ 'authorizeKey(address,uint8,(uint64,bool,(address,uint256,uint64)[],bool,(address,(bytes4,address[])[])[]),bytes32)':
21
+ '0xe3c154d2',
22
+ 'authorizeKey(address,uint8,uint64,bool,(address,uint256)[])': '0x54063a55',
23
+ },
24
+ burnKeyAuthorizationWitness: '0xcff31c46',
25
+ getAllowedCalls: '0x0163e7ec',
26
+ getKey: '0xbc298553',
27
+ getRemainingLimit: '0x63b4290d',
28
+ getRemainingLimitWithPeriod: '0xa7f72cab',
29
+ getTransactionKey: '0xb07fbc1a',
30
+ isAdminKey: '0x9009a18d',
31
+ isKeyAuthorizationWitnessBurned: '0x8e6c7e11',
32
+ removeAllowedCalls: '0xf3941811',
33
+ revokeKey: '0x5ae7ab32',
34
+ setAllowedCalls: '0xf5456703',
35
+ updateSpendingLimit: '0xcbbb4480',
36
+ } as const satisfies FunctionSelectors<
37
+ typeof Abis.accountKeychain,
38
+ 'authorizeKey'
39
+ > &
40
+ OverloadedFunctionSelectors<'authorizeKey'>
41
+
42
+ export const addressRegistry = {
43
+ decodeVirtualAddress: '0xb35d6fb9',
44
+ getMaster: '0xd84ab166',
45
+ isImplicitlyApproved: '0xa8da6aa7',
46
+ isVirtualAddress: '0xd501235a',
47
+ registerVirtualMaster: '0x5c559d20',
48
+ resolveRecipient: '0xfbea9d67',
49
+ resolveVirtualAddress: '0xe2fc56ef',
50
+ } as const satisfies FunctionSelectors<typeof Abis.addressRegistry>
51
+
52
+ export const nonce = {
53
+ getNonce: '0x89535803',
54
+ } as const satisfies FunctionSelectors<typeof Abis.nonce>
55
+
56
+ export const receivePolicyGuard = {
57
+ balanceOf: '0x78415365',
58
+ burnBlockedReceipt: '0x96c1264c',
59
+ claim: '0xbb1757cf',
60
+ } as const satisfies FunctionSelectors<typeof Abis.receivePolicyGuard>
61
+
62
+ export const signatureVerifier = {
63
+ recover: '0x19045a25',
64
+ verify: '0x1a86b550',
65
+ verifyKeychain: '0x6c0c731e',
66
+ verifyKeychainAdmin: '0x5f6fc5b7',
67
+ } as const satisfies FunctionSelectors<typeof Abis.signatureVerifier>
68
+
69
+ export const stablecoinDex = {
70
+ MAX_PRICE: '0x01c11d96',
71
+ MAX_TICK: '0x6882a888',
72
+ MIN_ORDER_AMOUNT: '0x40bf2aa4',
73
+ MIN_PRICE: '0xad9f20a6',
74
+ MIN_TICK: '0xa1634b14',
75
+ PRICE_SCALE: '0xc33f59d3',
76
+ TICK_SPACING: '0x46ca626b',
77
+ balanceOf: '0xf7888aec',
78
+ books: '0x0c0dee70',
79
+ cancel: '0x81649d06',
80
+ cancelStaleOrder: '0x928b0e7f',
81
+ createPair: '0x9ccb0744',
82
+ getOrder: '0x117d4128',
83
+ getTickLevel: '0x949bc662',
84
+ nextOrderId: '0x2a58b330',
85
+ pairKey: '0xcd27ca82',
86
+ place: '0x63813125',
87
+ placeFlip: '0x922828f1',
88
+ priceToTick: '0x87b4e352',
89
+ quoteSwapExactAmountIn: '0xe7c98f1a',
90
+ quoteSwapExactAmountOut: '0x1576fa0e',
91
+ swapExactAmountIn: '0xf8856c0f',
92
+ swapExactAmountOut: '0xf0122b75',
93
+ tickToPrice: '0x269a311d',
94
+ withdraw: '0x08fab167',
95
+ } as const satisfies FunctionSelectors<typeof Abis.stablecoinDex>
96
+
97
+ export const tip20 = {
98
+ BURN_BLOCKED_ROLE: '0x32ad9be8',
99
+ DOMAIN_SEPARATOR: '0x3644e515',
100
+ ISSUER_ROLE: '0x82aefa24',
101
+ PAUSE_ROLE: '0x389ed267',
102
+ UNPAUSE_ROLE: '0x309756fb',
103
+ allowance: '0xdd62ed3e',
104
+ approve: '0x095ea7b3',
105
+ balanceOf: '0x70a08231',
106
+ burn: '0x42966c68',
107
+ burnBlocked: '0xec0cf3dc',
108
+ burnWithMemo: '0x38f23b0b',
109
+ changeTransferPolicyId: '0xfd5e9420',
110
+ claimRewards: '0x372500ab',
111
+ completeQuoteTokenUpdate: '0x638bc4a3',
112
+ currency: '0xe5a6b10f',
113
+ decimals: '0x313ce567',
114
+ distributeReward: '0x940a4e45',
115
+ getPendingRewards: '0xf6ed2017',
116
+ getRoleAdmin: '0x248a9ca3',
117
+ globalRewardPerToken: '0x726ce324',
118
+ grantRole: '0x2f2ff15d',
119
+ hasRole: '0xac4ab3fb',
120
+ logoURI: '0x6bb38b28',
121
+ mint: '0x40c10f19',
122
+ mintWithMemo: '0xe44f0b12',
123
+ name: '0x06fdde03',
124
+ nextQuoteToken: '0x7d0819b7',
125
+ nonces: '0x7ecebe00',
126
+ optedInSupply: '0x8ef39dce',
127
+ pause: '0x8456cb59',
128
+ paused: '0x5c975abb',
129
+ permit: '0xd505accf',
130
+ quoteToken: '0x217a4b70',
131
+ renounceRole: '0x8bb9c5bf',
132
+ revokeRole: '0xd547741f',
133
+ setLogoURI: '0xc30ff6df',
134
+ setNextQuoteToken: '0x4593223f',
135
+ setRewardRecipient: '0xe521136f',
136
+ setRoleAdmin: '0x1e4e0091',
137
+ setSupplyCap: '0xb6a3f59a',
138
+ supplyCap: '0x8f770ad0',
139
+ symbol: '0x95d89b41',
140
+ totalSupply: '0x18160ddd',
141
+ transfer: '0xa9059cbb',
142
+ transferFrom: '0x23b872dd',
143
+ transferFromWithMemo: '0x929c2539',
144
+ transferPolicyId: '0x9c4bad29',
145
+ transferWithMemo: '0x95777d59',
146
+ unpause: '0x3f4ba83a',
147
+ userRewardInfo: '0x360b8ed9',
148
+ } as const satisfies FunctionSelectors<typeof Abis.tip20>
149
+
150
+ export const tip20ChannelReserve = {
151
+ CLOSE_GRACE_PERIOD: '0x956c8327',
152
+ VOUCHER_TYPEHASH: '0x94739e87',
153
+ close: '0x73b57f74',
154
+ computeChannelId: '0x185eeeac',
155
+ domainSeparator: '0xf698da25',
156
+ getChannel: '0xeef95313',
157
+ getChannelState: '0xd18da8b1',
158
+ getChannelStatesBatch: '0xd1f4cda2',
159
+ getVoucherDigest: '0xf3b349e8',
160
+ open: '0xedc53b00',
161
+ requestClose: '0x675402e5',
162
+ settle: '0x97fb5104',
163
+ topUp: '0xdc48471e',
164
+ withdraw: '0x41e2c664',
165
+ } as const satisfies FunctionSelectors<typeof Abis.tip20ChannelReserve>
166
+
167
+ export const tip20Factory = {
168
+ createToken: {
169
+ 'createToken(string,string,string,address,address,bytes32)': '0x68130445',
170
+ 'createToken(string,string,string,address,address,bytes32,string)':
171
+ '0x5323d222',
172
+ },
173
+ getTokenAddress: '0x9ed7cd64',
174
+ isTIP20: '0x35ec42c9',
175
+ } as const satisfies FunctionSelectors<
176
+ typeof Abis.tip20Factory,
177
+ 'createToken'
178
+ > &
179
+ OverloadedFunctionSelectors<'createToken'>
180
+
181
+ export const tip403Registry = {
182
+ compoundPolicyData: '0xb6266019',
183
+ createCompoundPolicy: '0x5da414ee',
184
+ createPolicy: '0xca5d55f6',
185
+ createPolicyWithAccounts: '0xa2d3044f',
186
+ isAuthorized: '0x55a1179e',
187
+ isAuthorizedMintRecipient: '0xb389e305',
188
+ isAuthorizedRecipient: '0x6fbc13d6',
189
+ isAuthorizedSender: '0x14abd81d',
190
+ modifyPolicyBlacklist: '0xc62b27d4',
191
+ modifyPolicyWhitelist: '0x71ec67a3',
192
+ policyData: '0x50214329',
193
+ policyExists: '0x330f5637',
194
+ policyIdCounter: '0x3cc32f9c',
195
+ receivePolicy: '0xe111e611',
196
+ setPolicyAdmin: '0x25f7d376',
197
+ setReceivePolicy: '0xdda03d86',
198
+ validateReceivePolicy: '0xb72b0c59',
199
+ } as const satisfies FunctionSelectors<typeof Abis.tip403Registry>
200
+
201
+ export const feeManager = {
202
+ collectedFees: '0x4c97f766',
203
+ distributeFees: '0xa6c07924',
204
+ setUserToken: '0xe7897444',
205
+ setValidatorToken: '0xb60d2ddb',
206
+ userTokens: '0xed498fa8',
207
+ validatorTokens: '0x6dc54a7a',
208
+ } as const satisfies FunctionSelectors<typeof Abis.feeManager>
209
+
210
+ export const feeAmm = {
211
+ M: '0x693f917e',
212
+ MIN_LIQUIDITY: '0x21b77d63',
213
+ N: '0xc9e525df',
214
+ SCALE: '0xeced5526',
215
+ burn: '0xfa291e53',
216
+ getPool: '0x531aa03e',
217
+ getPoolId: '0x2ef61c21',
218
+ liquidityBalances: '0x4fb5bf7f',
219
+ mint: '0xf1aa8cb8',
220
+ pools: '0xb5217bb4',
221
+ rebalanceSwap: '0x1bd94ac7',
222
+ totalSupply: '0xb524abcf',
223
+ } as const satisfies FunctionSelectors<typeof Abis.feeAmm>
224
+
225
+ export const validatorConfig = {
226
+ addValidator: '0xffb4822e',
227
+ changeOwner: '0xa6f9dae1',
228
+ changeValidatorStatus: '0xa1b3f4a9',
229
+ changeValidatorStatusByIndex: '0x5aa3d0e1',
230
+ getNextFullDkgCeremony: '0x281a69ec',
231
+ getValidators: '0xb7ab4db5',
232
+ owner: '0x8da5cb5b',
233
+ setNextFullDkgCeremony: '0xc3576d46',
234
+ updateValidator: '0x09970c76',
235
+ validatorCount: '0x0f43a677',
236
+ validators: '0xfa52c7d8',
237
+ validatorsArray: '0x031fadbd',
238
+ } as const satisfies FunctionSelectors<typeof Abis.validatorConfig>
239
+
240
+ export const validatorConfigV2 = {
241
+ addValidator: '0x6dcf616a',
242
+ deactivateValidator: '0x8f289544',
243
+ getActiveValidators: '0x9de70258',
244
+ getInitializedAtHeight: '0xf926b083',
245
+ getNextNetworkIdentityRotationEpoch: '0x42739f79',
246
+ initializeIfMigrated: '0x2f88bb4f',
247
+ isInitialized: '0x392e53cd',
248
+ migrateValidator: '0xc8e73200',
249
+ owner: '0x8da5cb5b',
250
+ rotateValidator: '0x82f20dbe',
251
+ setFeeRecipient: '0x572e4068',
252
+ setIpAddresses: '0x55f25dc6',
253
+ setNetworkIdentityRotationEpoch: '0xcb8425d2',
254
+ transferOwnership: '0xf2fde38b',
255
+ transferValidatorOwnership: '0x9e38a5f1',
256
+ validatorByAddress: '0x1a6dda94',
257
+ validatorByIndex: '0xecb14a34',
258
+ validatorByPublicKey: '0x1b425d5e',
259
+ validatorCount: '0x0f43a677',
260
+ } as const satisfies FunctionSelectors<typeof Abis.validatorConfigV2>
package/tempo/index.ts CHANGED
@@ -22,12 +22,42 @@ export {
22
22
  VirtualAddress,
23
23
  VirtualMaster,
24
24
  } from 'ox/tempo'
25
+ export {
26
+ type CustomTransport,
27
+ type CustomTransportConfig,
28
+ type CustomTransportErrorType,
29
+ custom,
30
+ } from '../clients/transports/custom.js'
31
+ export {
32
+ type FallbackTransport,
33
+ type FallbackTransportConfig,
34
+ type FallbackTransportErrorType,
35
+ fallback,
36
+ } from '../clients/transports/fallback.js'
37
+ export {
38
+ type HttpTransport,
39
+ type HttpTransportConfig,
40
+ type HttpTransportErrorType,
41
+ http,
42
+ } from '../clients/transports/http.js'
43
+ export {
44
+ type WebSocketTransport,
45
+ type WebSocketTransportConfig,
46
+ type WebSocketTransportErrorType,
47
+ webSocket,
48
+ } from '../clients/transports/webSocket.js'
25
49
  export * as Abis from './Abis.js'
26
50
  export * as Account from './Account.js'
27
51
  export * as Addresses from './Addresses.js'
28
52
  export * as Actions from './actions/index.js'
29
53
  export * as Capabilities from './Capabilities.js'
30
54
  export * as Chain from './Chain.js'
55
+ export {
56
+ type Client,
57
+ type ClientConfig,
58
+ type CreateClientErrorType,
59
+ createClient,
60
+ } from './Client.js'
31
61
  export {
32
62
  type Decorator as TempoActions,
33
63
  decorator as tempoActions,
@@ -38,6 +68,10 @@ export * as Formatters from './Formatters.js'
38
68
  export * as Hardfork from './Hardfork.js'
39
69
  export * as KeyAuthorizationManager from './KeyAuthorizationManager.js'
40
70
  export * as P256 from './P256.js'
71
+ /** @experimental */
72
+ export * as Scopes from './Scopes.js'
73
+ /** @experimental */
74
+ export * as Selectors from './Selectors.js'
41
75
  export * as Storage from './Storage.js'
42
76
  export * as TokenIds from './TokenIds.js'
43
77
  // Export types required for inference.