viem 0.0.1-alpha.3 → 0.0.1-alpha.31

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 (101) hide show
  1. package/chains/package.json +1 -1
  2. package/contract/package.json +4 -0
  3. package/dist/chain-00b37e4e.d.ts +543 -0
  4. package/dist/chain-38182d92.d.ts +5 -0
  5. package/dist/chains.d.ts +1305 -74
  6. package/dist/chains.js +125 -130
  7. package/dist/chains.js.map +1 -0
  8. package/dist/chains.mjs +129 -0
  9. package/dist/chains.mjs.map +1 -0
  10. package/dist/chunk-5STAX3WF.js +265 -0
  11. package/dist/chunk-5STAX3WF.js.map +1 -0
  12. package/dist/chunk-6ZFIUYGC.mjs +3436 -0
  13. package/dist/chunk-6ZFIUYGC.mjs.map +1 -0
  14. package/dist/chunk-APXHGB76.mjs +197 -0
  15. package/dist/chunk-APXHGB76.mjs.map +1 -0
  16. package/dist/chunk-C54QK7K3.mjs +210 -0
  17. package/dist/chunk-C54QK7K3.mjs.map +1 -0
  18. package/dist/{chunk-YZEQFYZ3.js → chunk-IBWRBL2I.mjs} +725 -556
  19. package/dist/chunk-IBWRBL2I.mjs.map +1 -0
  20. package/dist/chunk-J7QHQ26Y.js +3436 -0
  21. package/dist/chunk-J7QHQ26Y.js.map +1 -0
  22. package/dist/chunk-MYFKW55L.js +210 -0
  23. package/dist/chunk-MYFKW55L.js.map +1 -0
  24. package/dist/chunk-NCPBWOQA.js +1216 -0
  25. package/dist/chunk-NCPBWOQA.js.map +1 -0
  26. package/dist/chunk-QBB3DFIB.mjs +265 -0
  27. package/dist/chunk-QBB3DFIB.mjs.map +1 -0
  28. package/dist/chunk-UUULPQHV.js +197 -0
  29. package/dist/chunk-UUULPQHV.js.map +1 -0
  30. package/dist/contract.d.ts +11 -0
  31. package/dist/contract.js +57 -0
  32. package/dist/contract.js.map +1 -0
  33. package/dist/contract.mjs +57 -0
  34. package/dist/contract.mjs.map +1 -0
  35. package/dist/createClient-5258d590.d.ts +70 -0
  36. package/dist/createPublicClient-99be385b.d.ts +650 -0
  37. package/dist/{eip1193-8b4d90ce.d.ts → eip1193-fcdeee04.d.ts} +13 -10
  38. package/dist/ens.d.ts +22 -0
  39. package/dist/ens.js +22 -0
  40. package/dist/ens.js.map +1 -0
  41. package/dist/ens.mjs +22 -0
  42. package/dist/ens.mjs.map +1 -0
  43. package/dist/formatAbiItem-50cb39d8.d.ts +14 -0
  44. package/dist/getAbiItem-6d4f64d2.d.ts +97 -0
  45. package/dist/index.d.ts +251 -67
  46. package/dist/index.js +769 -344
  47. package/dist/index.js.map +1 -0
  48. package/dist/index.mjs +769 -0
  49. package/dist/index.mjs.map +1 -0
  50. package/dist/namehash-88f4639d.d.ts +22 -0
  51. package/dist/parseGwei-8af7a0a6.d.ts +509 -0
  52. package/dist/public.d.ts +29 -0
  53. package/dist/public.js +60 -0
  54. package/dist/public.js.map +1 -0
  55. package/dist/public.mjs +60 -0
  56. package/dist/public.mjs.map +1 -0
  57. package/dist/test-79ec416c.d.ts +213 -0
  58. package/dist/test.d.ts +20 -0
  59. package/dist/test.js +62 -0
  60. package/dist/test.js.map +1 -0
  61. package/dist/test.mjs +62 -0
  62. package/dist/test.mjs.map +1 -0
  63. package/dist/utils/index.d.ts +52 -7
  64. package/dist/utils/index.js +187 -126
  65. package/dist/utils/index.js.map +1 -0
  66. package/dist/utils/index.mjs +187 -0
  67. package/dist/utils/index.mjs.map +1 -0
  68. package/dist/wallet-cf5c8351.d.ts +115 -0
  69. package/dist/wallet.d.ts +7 -0
  70. package/dist/wallet.js +24 -0
  71. package/dist/wallet.js.map +1 -0
  72. package/dist/wallet.mjs +24 -0
  73. package/dist/wallet.mjs.map +1 -0
  74. package/dist/window.d.ts +5 -2
  75. package/dist/window.js +1 -0
  76. package/dist/window.js.map +1 -0
  77. package/dist/window.mjs +1 -0
  78. package/dist/window.mjs.map +1 -0
  79. package/ens/package.json +4 -0
  80. package/package.json +46 -73
  81. package/public/package.json +4 -0
  82. package/test/package.json +4 -0
  83. package/utils/package.json +1 -1
  84. package/wallet/package.json +4 -0
  85. package/window/package.json +1 -1
  86. package/actions/package.json +0 -4
  87. package/clients/package.json +0 -4
  88. package/dist/actions/index.d.ts +0 -7
  89. package/dist/actions/index.js +0 -124
  90. package/dist/chunk-SRDTRROA.js +0 -1214
  91. package/dist/chunk-TLEMV4T3.js +0 -258
  92. package/dist/chunk-WZITKXV3.js +0 -996
  93. package/dist/clients/index.d.ts +0 -7
  94. package/dist/clients/index.js +0 -23
  95. package/dist/createWalletClient-15ad1601.d.ts +0 -130
  96. package/dist/parseGwei-0f85e8ca.d.ts +0 -248
  97. package/dist/rpc-15b85963.d.ts +0 -292
  98. package/dist/rpc-26932bae.d.ts +0 -61
  99. package/dist/transactionRequest-f538ea86.d.ts +0 -44
  100. package/dist/watchAsset-0c9d01e2.d.ts +0 -522
  101. package/dist/webSocket-b55b0951.d.ts +0 -83
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/actions/test/dropTransaction.ts","../src/actions/test/getAutomine.ts","../src/actions/test/getTxpoolContent.ts","../src/actions/test/getTxpoolStatus.ts","../src/actions/test/impersonateAccount.ts","../src/actions/test/increaseTime.ts","../src/actions/test/inspectTxpool.ts","../src/actions/test/mine.ts","../src/actions/test/removeBlockTimestampInterval.ts","../src/actions/test/reset.ts","../src/actions/test/revert.ts","../src/actions/test/sendUnsignedTransaction.ts","../src/actions/test/setAutomine.ts","../src/actions/test/setBalance.ts","../src/actions/test/setBlockGasLimit.ts","../src/actions/test/setBlockTimestampInterval.ts","../src/actions/test/setCode.ts","../src/actions/test/setCoinbase.ts","../src/actions/test/setIntervalMining.ts","../src/actions/test/setLoggingEnabled.ts","../src/actions/test/setMinGasPrice.ts","../src/actions/test/setNextBlockBaseFeePerGas.ts","../src/actions/test/setNextBlockTimestamp.ts","../src/actions/test/setNonce.ts","../src/actions/test/setRpcUrl.ts","../src/actions/test/setStorageAt.ts","../src/actions/test/snapshot.ts","../src/actions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;AAAA,IACR,QAAQ,CAAC,YAAY,SAAS,CAAC;AAAA,EACjC,CAAC;AACH;;;ACLA,eAAsB,SACpB,QACA,EAAE,SAAS,MAAM,GACjB;AACA,SAAO,MAAM,OAAO,QAAQ;AAAA,IAC1B,QAAQ,GAAG,OAAO;AAAA,IAClB,QAAQ,CAAC,SAAS,YAAY,KAAK,CAAC;AAAA,EACtC,CAAC;AACH;;;ACjBA,eAAsB,UAAU,QAAoB,YAAoB;AACtE,SAAO,MAAM,OAAO,QAAQ;AAAA,IAC1B,QAAQ,GAAG,OAAO;AAAA,IAClB,QAAQ,CAAC,UAAU;AAAA,EACrB,CAAC;AACH;;;ACMA,eAAsB,aACpB,QACA,EAAE,SAAS,OAAO,MAAM,GACxB;AACA,SAAO,MAAM,OAAO,QAAQ;AAAA,IAC1B,QAAQ,GAAG,OAAO;AAAA,IAClB,QAAQ;AAAA,MACN;AAAA,MACA,OAAO,UAAU,WAAW,YAAY,KAAK,IAAI;AAAA,MACjD;AAAA,IACF;AAAA,EACF,CAAC;AACH;;;ACvBA,eAAsB,SAAS,QAAoB;AACjD,SAAO,MAAM,OAAO,QAAQ;AAAA,IAC1B,QAAQ;AAAA,EACV,CAAC;AACH;;;ACEA,eAAsB,yBACpB,QACA,EAAE,QAAQ,GACV;AACA,SAAO,MAAM,OAAO,QAAQ;AAAA,IAC1B,QAAQ,GAAG,OAAO;AAAA,IAClB,QAAQ,CAAC,OAAO;AAAA,EAClB,CAAC;AACH","sourcesContent":["import type { TestClient } from '../../clients'\nimport type { Hash } from '../../types'\n\nexport type DropTransactionArgs = {\n /** The hash of the transaction to drop. */\n hash: Hash\n}\n\nexport async function dropTransaction(\n client: TestClient,\n { hash }: DropTransactionArgs,\n) {\n return await client.request({\n method: `${client.mode}_dropTransaction`,\n params: [hash],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport type GetAutomineResponse = boolean\n\nexport async function getAutomine(\n client: TestClient,\n): Promise<GetAutomineResponse> {\n return await client.request({\n method: `${client.mode}_getAutomine`,\n })\n}\n","import { Address } from 'abitype'\nimport type { TestClient } from '../../clients'\nimport { RpcTransaction } from '../../types'\n\nexport type GetTxPoolContentResponse = {\n pending: Record<Address, Record<string, RpcTransaction>>\n queued: Record<Address, Record<string, RpcTransaction>>\n}\n\nexport async function getTxpoolContent(\n client: TestClient,\n): Promise<GetTxPoolContentResponse> {\n return await client.request({\n method: 'txpool_content',\n })\n}\n","import type { TestClient } from '../../clients'\nimport { hexToNumber } from '../../utils'\n\nexport type GetTxPoolStatusResponse = {\n pending: number\n queued: number\n}\n\nexport async function getTxpoolStatus(\n client: TestClient,\n): Promise<GetTxPoolStatusResponse> {\n const { pending, queued } = await client.request({\n method: 'txpool_status',\n })\n return {\n pending: hexToNumber(pending),\n queued: hexToNumber(queued),\n }\n}\n","import type { TestClient } from '../../clients'\nimport type { Address } from '../../types'\n\nexport type ImpersonateAccountArgs = {\n /** The account to impersonate. */\n address: Address\n}\n\nexport async function impersonateAccount(\n client: TestClient,\n { address }: ImpersonateAccountArgs,\n) {\n return await client.request({\n method: `${client.mode}_impersonateAccount`,\n params: [address],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type IncreaseTimeArgs = {\n /** The amount of seconds to jump forward in time. */\n seconds: number\n}\n\nexport async function increaseTime(\n client: TestClient,\n { seconds }: IncreaseTimeArgs,\n) {\n return await client.request({\n method: 'evm_increaseTime',\n params: [numberToHex(seconds)],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { Address } from '../../types'\n\nexport type InspectTxpoolResponse = {\n pending: Record<Address, Record<string, string>>\n queued: Record<Address, Record<string, string>>\n}\n\nexport async function inspectTxpool(\n client: TestClient,\n): Promise<InspectTxpoolResponse> {\n return await client.request({\n method: 'txpool_inspect',\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type MineArgs = {\n /** Number of blocks to mine. */\n blocks: number\n /** Interval between each block in seconds. */\n interval?: number\n}\n\nexport async function mine(client: TestClient, { blocks, interval }: MineArgs) {\n return await client.request({\n method: `${client.mode}_mine`,\n params: [numberToHex(blocks), numberToHex(interval || 0)],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport async function removeBlockTimestampInterval(client: TestClient) {\n return await client.request({\n method: `${client.mode}_removeBlockTimestampInterval`,\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport type ResetArgs = {\n /** The block number to reset from. */\n blockNumber?: bigint\n /** The JSON RPC URL. */\n jsonRpcUrl?: string\n}\n\nexport async function reset(\n client: TestClient,\n { blockNumber, jsonRpcUrl }: ResetArgs = {},\n) {\n return await client.request({\n method: `${client.mode}_reset`,\n params: [{ forking: { blockNumber: Number(blockNumber), jsonRpcUrl } }],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Quantity } from '../../types'\n\nexport type RevertArgs = {\n /** The snapshot ID to revert to. */\n id: Quantity\n}\n\nexport async function revert(client: TestClient, { id }: RevertArgs) {\n return await client.request({\n method: 'evm_revert',\n params: [id],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Hash, TransactionRequest } from '../../types'\nimport { formatTransactionRequest } from '../../utils'\n\nexport type SendUnsignedTransactionArgs = TransactionRequest\n\nexport type SendUnsignedTransactionResponse = Hash\n\nexport async function sendUnsignedTransaction(\n client: TestClient,\n request: SendUnsignedTransactionArgs,\n): Promise<SendUnsignedTransactionResponse> {\n const request_ = formatTransactionRequest(request)\n const hash = await client.request({\n method: 'eth_sendUnsignedTransaction',\n params: [request_],\n })\n return hash\n}\n","import type { TestClient } from '../../clients'\n\nexport async function setAutomine(client: TestClient, enabled: boolean) {\n return await client.request({\n method: 'evm_setAutomine',\n params: [enabled],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address } from '../../types'\nimport { numberToHex } from '../../utils'\n\nexport type SetBalanceArgs = {\n /** The account address. */\n address: Address\n /** Amount (in wei) to set */\n value: bigint\n}\n\nexport async function setBalance(\n client: TestClient,\n { address, value }: SetBalanceArgs,\n) {\n return await client.request({\n method: `${client.mode}_setBalance`,\n params: [address, numberToHex(value)],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type SetBlockGasLimitArgs = {\n /** Gas limit (in wei). */\n gasLimit: bigint\n}\n\nexport async function setBlockGasLimit(\n client: TestClient,\n { gasLimit }: SetBlockGasLimitArgs,\n) {\n return await client.request({\n method: 'evm_setBlockGasLimit',\n params: [numberToHex(gasLimit)],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport type SetBlockTimestampIntervalArgs = {\n /** The interval (in seconds). */\n interval: number\n}\n\nexport async function setBlockTimestampInterval(\n client: TestClient,\n { interval }: SetBlockTimestampIntervalArgs,\n) {\n return await client.request({\n method: `${client.mode}_setBlockTimestampInterval`,\n params: [interval],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address, Hex } from '../../types'\n\nexport type SetCodeArgs = {\n /** The account address. */\n address: Address\n /** The bytecode to set */\n bytecode: Hex\n}\n\nexport async function setCode(\n client: TestClient,\n { address, bytecode }: SetCodeArgs,\n) {\n return await client.request({\n method: `${client.mode}_setCode`,\n params: [address, bytecode],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address } from '../../types'\n\nexport type SetCoinbaseArgs = {\n /** The coinbase address. */\n address: Address\n}\n\nexport async function setCoinbase(\n client: TestClient,\n { address }: SetCoinbaseArgs,\n) {\n return await client.request({\n method: `${client.mode}_setCoinbase`,\n params: [address],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport type SetIntervalMiningArgs = {\n /** The mining interval. */\n interval: number\n}\n\nexport async function setIntervalMining(\n client: TestClient,\n { interval }: SetIntervalMiningArgs,\n) {\n return await client.request({\n method: 'evm_setIntervalMining',\n params: [interval],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport async function setLoggingEnabled(client: TestClient, enabled: boolean) {\n return await client.request({\n method: `${client.mode}_setLoggingEnabled`,\n params: [enabled],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type SetMinGasPriceArgs = {\n /** The gas price. */\n gasPrice: bigint\n}\n\nexport async function setMinGasPrice(\n client: TestClient,\n { gasPrice }: SetMinGasPriceArgs,\n) {\n return await client.request({\n method: `${client.mode}_setMinGasPrice`,\n params: [numberToHex(gasPrice)],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type SetNextBlockBaseFeePerGasArgs = {\n /** Base fee per gas (in wei). */\n baseFeePerGas: bigint\n}\n\nexport async function setNextBlockBaseFeePerGas(\n client: TestClient,\n { baseFeePerGas }: SetNextBlockBaseFeePerGasArgs,\n) {\n return await client.request({\n method: `${client.mode}_setNextBlockBaseFeePerGas`,\n params: [numberToHex(baseFeePerGas)],\n })\n}\n","import type { TestClient } from '../../clients'\nimport { numberToHex } from '../../utils'\n\nexport type SetNextBlockTimestampArgs = {\n /** The timestamp (in seconds). */\n timestamp: bigint\n}\n\nexport async function setNextBlockTimestamp(\n client: TestClient,\n { timestamp }: SetNextBlockTimestampArgs,\n) {\n return await client.request({\n method: 'evm_setNextBlockTimestamp',\n params: [numberToHex(timestamp)],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address } from '../../types'\nimport { numberToHex } from '../../utils'\n\nexport type SetNonceArgs = {\n /** The account address. */\n address: Address\n /** The nonce to set. */\n nonce: number\n}\n\nexport async function setNonce(\n client: TestClient,\n { address, nonce }: SetNonceArgs,\n) {\n return await client.request({\n method: `${client.mode}_setNonce`,\n params: [address, numberToHex(nonce)],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport async function setRpcUrl(client: TestClient, jsonRpcUrl: string) {\n return await client.request({\n method: `${client.mode}_setRpcUrl`,\n params: [jsonRpcUrl],\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address, Hash, Hex } from '../../types'\nimport { numberToHex } from '../../utils'\n\nexport type SetStorageAtArgs = {\n /** The account address. */\n address: Address\n /** The storage slot (index). Can either be a number or hash value. */\n index: number | Hash\n /** The value to store as a 32 byte hex string. */\n value: Hex\n}\n\nexport async function setStorageAt(\n client: TestClient,\n { address, index, value }: SetStorageAtArgs,\n) {\n return await client.request({\n method: `${client.mode}_setStorageAt`,\n params: [\n address,\n typeof index === 'number' ? numberToHex(index) : index,\n value,\n ],\n })\n}\n","import type { TestClient } from '../../clients'\n\nexport async function snapshot(client: TestClient) {\n return await client.request({\n method: 'evm_snapshot',\n })\n}\n","import type { TestClient } from '../../clients'\nimport type { Address } from '../../types'\n\nexport type StopImpersonatingAccountArgs = {\n /** The account to impersonate. */\n address: Address\n}\n\nexport async function stopImpersonatingAccount(\n client: TestClient,\n { address }: StopImpersonatingAccountArgs,\n) {\n return await client.request({\n method: `${client.mode}_stopImpersonatingAccount`,\n params: [address],\n })\n}\n"]}