viem 2.55.7 → 2.55.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +36 -0
- package/_cjs/account-abstraction/utils/formatters/userOperationRequest.js +1 -1
- package/_cjs/account-abstraction/utils/formatters/userOperationRequest.js.map +1 -1
- package/_cjs/actions/public/estimateFeesPerGas.js +1 -1
- package/_cjs/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_cjs/actions/public/fillTransaction.js +1 -1
- package/_cjs/actions/public/fillTransaction.js.map +1 -1
- package/_cjs/chains/definitions/0gMainnet.js +1 -1
- package/_cjs/chains/definitions/0gMainnet.js.map +1 -1
- package/_cjs/chains/definitions/0gTestnet.js +2 -2
- package/_cjs/chains/definitions/0gTestnet.js.map +1 -1
- package/_cjs/chains/definitions/eduChain.js +9 -2
- package/_cjs/chains/definitions/eduChain.js.map +1 -1
- package/_cjs/chains/definitions/eduChainTestnet.js +3 -4
- package/_cjs/chains/definitions/eduChainTestnet.js.map +1 -1
- package/_cjs/chains/definitions/polygonAmoy.js +1 -1
- package/_cjs/chains/definitions/polygonAmoy.js.map +1 -1
- package/_cjs/errors/version.js +1 -1
- package/_cjs/errors/version.js.map +1 -1
- package/_cjs/tempo/Abis.js +918 -543
- package/_cjs/tempo/Abis.js.map +1 -1
- package/_cjs/tempo/Addresses.js +2 -1
- package/_cjs/tempo/Addresses.js.map +1 -1
- package/_cjs/tempo/Decorator.js.map +1 -1
- package/_cjs/tempo/actions/earn.js +171 -137
- package/_cjs/tempo/actions/earn.js.map +1 -1
- package/_cjs/tempo/chainConfig.js +3 -1
- package/_cjs/tempo/chainConfig.js.map +1 -1
- package/_cjs/tempo/zones/Abis.js +6 -0
- package/_cjs/tempo/zones/Abis.js.map +1 -1
- package/_cjs/tempo/zones/Addresses.js +17 -0
- package/_cjs/tempo/zones/Addresses.js.map +1 -0
- package/_cjs/tempo/zones/index.js +2 -2
- package/_cjs/tempo/zones/index.js.map +1 -1
- package/_cjs/tempo/zones/zone.js +30 -16
- package/_cjs/tempo/zones/zone.js.map +1 -1
- package/_esm/account-abstraction/utils/formatters/userOperationRequest.js +1 -1
- package/_esm/account-abstraction/utils/formatters/userOperationRequest.js.map +1 -1
- package/_esm/actions/public/estimateFeesPerGas.js +1 -1
- package/_esm/actions/public/estimateFeesPerGas.js.map +1 -1
- package/_esm/actions/public/fillTransaction.js +1 -1
- package/_esm/actions/public/fillTransaction.js.map +1 -1
- package/_esm/chains/definitions/0gMainnet.js +1 -1
- package/_esm/chains/definitions/0gMainnet.js.map +1 -1
- package/_esm/chains/definitions/0gTestnet.js +2 -2
- package/_esm/chains/definitions/0gTestnet.js.map +1 -1
- package/_esm/chains/definitions/eduChain.js +9 -2
- package/_esm/chains/definitions/eduChain.js.map +1 -1
- package/_esm/chains/definitions/eduChainTestnet.js +3 -4
- package/_esm/chains/definitions/eduChainTestnet.js.map +1 -1
- package/_esm/chains/definitions/polygonAmoy.js +1 -1
- package/_esm/chains/definitions/polygonAmoy.js.map +1 -1
- package/_esm/errors/version.js +1 -1
- package/_esm/errors/version.js.map +1 -1
- package/_esm/tempo/Abis.js +919 -544
- package/_esm/tempo/Abis.js.map +1 -1
- package/_esm/tempo/Addresses.js +1 -0
- package/_esm/tempo/Addresses.js.map +1 -1
- package/_esm/tempo/Decorator.js.map +1 -1
- package/_esm/tempo/actions/earn.js +214 -174
- package/_esm/tempo/actions/earn.js.map +1 -1
- package/_esm/tempo/chainConfig.js +3 -1
- package/_esm/tempo/chainConfig.js.map +1 -1
- package/_esm/tempo/zones/Abis.js +6 -0
- package/_esm/tempo/zones/Abis.js.map +1 -1
- package/_esm/tempo/zones/Addresses.js +14 -0
- package/_esm/tempo/zones/Addresses.js.map +1 -0
- package/_esm/tempo/zones/index.js +2 -1
- package/_esm/tempo/zones/index.js.map +1 -1
- package/_esm/tempo/zones/zone.js +29 -15
- package/_esm/tempo/zones/zone.js.map +1 -1
- package/_types/chains/definitions/0gMainnet.d.ts +1 -1
- package/_types/chains/definitions/0gTestnet.d.ts +3 -3
- package/_types/chains/definitions/eduChain.d.ts +9 -11
- package/_types/chains/definitions/eduChain.d.ts.map +1 -1
- package/_types/chains/definitions/eduChainTestnet.d.ts +3 -4
- package/_types/chains/definitions/eduChainTestnet.d.ts.map +1 -1
- package/_types/chains/definitions/polygonAmoy.d.ts +1 -1
- package/_types/errors/version.d.ts +1 -1
- package/_types/errors/version.d.ts.map +1 -1
- package/_types/package.json +1 -0
- package/_types/tempo/Abis.d.ts +1423 -777
- package/_types/tempo/Abis.d.ts.map +1 -1
- package/_types/tempo/Addresses.d.ts +1 -0
- package/_types/tempo/Addresses.d.ts.map +1 -1
- package/_types/tempo/Decorator.d.ts +21 -15
- package/_types/tempo/Decorator.d.ts.map +1 -1
- package/_types/tempo/actions/earn.d.ts +850 -1913
- package/_types/tempo/actions/earn.d.ts.map +1 -1
- package/_types/tempo/chainConfig.d.ts.map +1 -1
- package/_types/tempo/zones/Abis.d.ts +20 -0
- package/_types/tempo/zones/Abis.d.ts.map +1 -1
- package/_types/tempo/zones/Addresses.d.ts +13 -0
- package/_types/tempo/zones/Addresses.d.ts.map +1 -0
- package/_types/tempo/zones/index.d.ts +2 -1
- package/_types/tempo/zones/index.d.ts.map +1 -1
- package/_types/tempo/zones/zone.d.ts +14 -33
- package/_types/tempo/zones/zone.d.ts.map +1 -1
- package/account-abstraction/utils/formatters/userOperationRequest.ts +4 -3
- package/actions/public/estimateFeesPerGas.ts +1 -1
- package/actions/public/fillTransaction.ts +1 -1
- package/chains/definitions/0gMainnet.ts +1 -1
- package/chains/definitions/0gTestnet.ts +2 -2
- package/chains/definitions/eduChain.ts +9 -2
- package/chains/definitions/eduChainTestnet.ts +3 -4
- package/chains/definitions/polygonAmoy.ts +1 -1
- package/errors/version.ts +1 -1
- package/package.json +2 -2
- package/tempo/Abis.ts +920 -545
- package/tempo/Addresses.ts +1 -0
- package/tempo/Decorator.ts +21 -15
- package/tempo/actions/earn.ts +311 -250
- package/tempo/chainConfig.ts +5 -1
- package/tempo/zones/Abis.ts +6 -0
- package/tempo/zones/Addresses.ts +15 -0
- package/tempo/zones/index.ts +1 -1
- package/tempo/zones/zone.ts +38 -17
package/tempo/Addresses.ts
CHANGED
|
@@ -14,4 +14,5 @@ export const tip20ChannelReserve = '0x4d50500000000000000000000000000000000000'
|
|
|
14
14
|
export const tip20Factory = '0x20fc000000000000000000000000000000000000'
|
|
15
15
|
export const tip403Registry = '0x403c000000000000000000000000000000000000'
|
|
16
16
|
export const validator = '0xcccccccc00000000000000000000000000000000'
|
|
17
|
+
export const validatorV2 = '0xcccccccc00000000000000000000000000000001'
|
|
17
18
|
export const zoneOutbox = '0x1c00000000000000000000000000000000000002'
|
package/tempo/Decorator.ts
CHANGED
|
@@ -1745,8 +1745,8 @@ type DecoratorBase<
|
|
|
1745
1745
|
}
|
|
1746
1746
|
earn: {
|
|
1747
1747
|
/**
|
|
1748
|
-
* Creates and attaches an admission-only TIP-403 policy to an Earn
|
|
1749
|
-
*
|
|
1748
|
+
* Creates and attaches an admission-only TIP-403 policy to an Earn share
|
|
1749
|
+
* token. Existing holders remain able to send shares while
|
|
1750
1750
|
* recipients and mint recipients must belong to the same whitelist.
|
|
1751
1751
|
*
|
|
1752
1752
|
* @example
|
|
@@ -1765,7 +1765,7 @@ type DecoratorBase<
|
|
|
1765
1765
|
parameters: earnActions.configureExitSafePolicy.Parameters<account>,
|
|
1766
1766
|
) => Promise<earnActions.configureExitSafePolicy.ReturnValue>
|
|
1767
1767
|
/**
|
|
1768
|
-
* Deposits assets into a vault and mints
|
|
1768
|
+
* Deposits assets into a vault and mints Earn shares to `recipient`. The
|
|
1769
1769
|
* transaction includes the required asset approval.
|
|
1770
1770
|
*
|
|
1771
1771
|
* @example
|
|
@@ -1795,7 +1795,7 @@ type DecoratorBase<
|
|
|
1795
1795
|
parameters: earnActions.deposit.Parameters<chain, account>,
|
|
1796
1796
|
) => Promise<earnActions.deposit.ReturnValue>
|
|
1797
1797
|
/**
|
|
1798
|
-
* Deposits venue shares into a vault and mints
|
|
1798
|
+
* Deposits venue shares into a vault and mints Earn shares to
|
|
1799
1799
|
* `recipient`. The transaction includes the required venue share approval.
|
|
1800
1800
|
*
|
|
1801
1801
|
* @example
|
|
@@ -1897,7 +1897,9 @@ type DecoratorBase<
|
|
|
1897
1897
|
* recipient: '0x...',
|
|
1898
1898
|
* recoveryRecipient: '0x...',
|
|
1899
1899
|
* shareAmountMin: 99_500_000n,
|
|
1900
|
+
* vault: '0x...',
|
|
1900
1901
|
* vaultAssetAmountMin: 99_000_000n,
|
|
1902
|
+
* zoneId: 7,
|
|
1901
1903
|
* })
|
|
1902
1904
|
* const hash = await zoneClient.earn.privateDeposit(prepared)
|
|
1903
1905
|
* ```
|
|
@@ -1950,7 +1952,7 @@ type DecoratorBase<
|
|
|
1950
1952
|
parameters: earnActions.getFeeState.Parameters,
|
|
1951
1953
|
) => Promise<earnActions.getFeeState.ReturnValue>
|
|
1952
1954
|
/**
|
|
1953
|
-
* Gets an account's asset and
|
|
1955
|
+
* Gets an account's asset and Earn share balances, allowances, and
|
|
1954
1956
|
* current share value. The value includes fees.
|
|
1955
1957
|
*
|
|
1956
1958
|
* @example
|
|
@@ -1972,7 +1974,7 @@ type DecoratorBase<
|
|
|
1972
1974
|
* ```
|
|
1973
1975
|
*
|
|
1974
1976
|
* @param parameters - Parameters.
|
|
1975
|
-
* @returns The asset and
|
|
1977
|
+
* @returns The asset and Earn share balances, allowances, and value.
|
|
1976
1978
|
*/
|
|
1977
1979
|
getPosition: (
|
|
1978
1980
|
parameters: earnActions.getPosition.Parameters<account>,
|
|
@@ -2005,7 +2007,7 @@ type DecoratorBase<
|
|
|
2005
2007
|
parameters: earnActions.getVault.Parameters,
|
|
2006
2008
|
) => Promise<earnActions.getVault.ReturnValue>
|
|
2007
2009
|
/**
|
|
2008
|
-
* Gets the asset output for an exact
|
|
2010
|
+
* Gets the asset output for an exact Earn share input, including fees.
|
|
2009
2011
|
*
|
|
2010
2012
|
* @example
|
|
2011
2013
|
* ```ts
|
|
@@ -2031,7 +2033,7 @@ type DecoratorBase<
|
|
|
2031
2033
|
parameters: earnActions.getRedeemQuote.Parameters,
|
|
2032
2034
|
) => Promise<earnActions.getRedeemQuote.ReturnValue>
|
|
2033
2035
|
/**
|
|
2034
|
-
* Gets the
|
|
2036
|
+
* Gets the Earn shares required for an exact asset output, including
|
|
2035
2037
|
* fees and ceiling rounding.
|
|
2036
2038
|
*
|
|
2037
2039
|
* @example
|
|
@@ -2052,14 +2054,14 @@ type DecoratorBase<
|
|
|
2052
2054
|
* ```
|
|
2053
2055
|
*
|
|
2054
2056
|
* @param parameters - Parameters.
|
|
2055
|
-
* @returns The required
|
|
2057
|
+
* @returns The required Earn share input, ceiling-rounded.
|
|
2056
2058
|
*/
|
|
2057
2059
|
getWithdrawQuote: (
|
|
2058
2060
|
parameters: earnActions.getWithdrawQuote.Parameters,
|
|
2059
2061
|
) => Promise<earnActions.getWithdrawQuote.ReturnValue>
|
|
2060
2062
|
/**
|
|
2061
|
-
* Redeems
|
|
2062
|
-
* includes the required
|
|
2063
|
+
* Redeems Earn shares for assets sent to `recipient`. The transaction
|
|
2064
|
+
* includes the required Earn share approval.
|
|
2063
2065
|
*
|
|
2064
2066
|
* @example
|
|
2065
2067
|
* ```ts
|
|
@@ -2088,7 +2090,7 @@ type DecoratorBase<
|
|
|
2088
2090
|
parameters: earnActions.redeem.Parameters<chain, account>,
|
|
2089
2091
|
) => Promise<earnActions.redeem.ReturnValue>
|
|
2090
2092
|
/**
|
|
2091
|
-
* Redeems
|
|
2093
|
+
* Redeems Earn shares and returns the confirmed receipt and event data.
|
|
2092
2094
|
*
|
|
2093
2095
|
* @example
|
|
2094
2096
|
* ```ts
|
|
@@ -2117,7 +2119,7 @@ type DecoratorBase<
|
|
|
2117
2119
|
parameters: earnActions.redeemSync.Parameters<chain, account>,
|
|
2118
2120
|
) => Promise<earnActions.redeemSync.ReturnValue>
|
|
2119
2121
|
/**
|
|
2120
|
-
* Withdraws
|
|
2122
|
+
* Withdraws Earn shares from a Zone and redeems them on the parent chain.
|
|
2121
2123
|
*
|
|
2122
2124
|
* @example
|
|
2123
2125
|
* ```ts
|
|
@@ -2127,6 +2129,8 @@ type DecoratorBase<
|
|
|
2127
2129
|
* recoveryRecipient: '0x...',
|
|
2128
2130
|
* shareAmount: 100_000_000n,
|
|
2129
2131
|
* slippageBps: 50,
|
|
2132
|
+
* vault: '0x...',
|
|
2133
|
+
* zoneId: 7,
|
|
2130
2134
|
* })
|
|
2131
2135
|
* const hash = await zoneClient.earn.privateRedeem(prepared)
|
|
2132
2136
|
* ```
|
|
@@ -2162,6 +2166,7 @@ type DecoratorBase<
|
|
|
2162
2166
|
* actionId: prepared.actionId,
|
|
2163
2167
|
* fromBlock: prepared.fromBlock,
|
|
2164
2168
|
* gateway: '0x...',
|
|
2169
|
+
* vault: '0x...',
|
|
2165
2170
|
* })
|
|
2166
2171
|
* ```
|
|
2167
2172
|
*
|
|
@@ -2180,6 +2185,7 @@ type DecoratorBase<
|
|
|
2180
2185
|
* actionId: prepared.actionId,
|
|
2181
2186
|
* fromBlock: prepared.fromBlock,
|
|
2182
2187
|
* gateway: '0x...',
|
|
2188
|
+
* vault: '0x...',
|
|
2183
2189
|
* })
|
|
2184
2190
|
* ```
|
|
2185
2191
|
*
|
|
@@ -2190,7 +2196,7 @@ type DecoratorBase<
|
|
|
2190
2196
|
parameters: earnActions.waitForPrivateRedeem.Parameters,
|
|
2191
2197
|
) => Promise<earnActions.waitForPrivateRedeem.ReturnType>
|
|
2192
2198
|
/**
|
|
2193
|
-
* Verifies that an Earn
|
|
2199
|
+
* Verifies that an Earn share token uses the expected exit-safe
|
|
2194
2200
|
* TIP-403 policy and that every required member can receive transfers and
|
|
2195
2201
|
* mints.
|
|
2196
2202
|
*
|
|
@@ -2212,7 +2218,7 @@ type DecoratorBase<
|
|
|
2212
2218
|
) => Promise<earnActions.validateExitSafePolicy.ReturnValue>
|
|
2213
2219
|
/**
|
|
2214
2220
|
* Withdraws an exact asset amount to `recipient`, up to the specified
|
|
2215
|
-
*
|
|
2221
|
+
* Earn share limit. The transaction includes the required Earn share
|
|
2216
2222
|
* approval; use `redeem` for a full exit.
|
|
2217
2223
|
*
|
|
2218
2224
|
* @example
|