thirdweb 5.30.1-nightly-07ec4873202a863bb313cd2c708bf410d9d2e09e-20240628000329 → 5.31.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.
Files changed (126) hide show
  1. package/dist/cjs/chains/chain-definitions/linea-sepolia.js +18 -0
  2. package/dist/cjs/chains/chain-definitions/linea-sepolia.js.map +1 -0
  3. package/dist/cjs/chains/chain-definitions/linea.js +17 -0
  4. package/dist/cjs/chains/chain-definitions/linea.js.map +1 -0
  5. package/dist/cjs/chains/chain-definitions/sepolia.js +1 -1
  6. package/dist/cjs/exports/chains.js +5 -1
  7. package/dist/cjs/exports/chains.js.map +1 -1
  8. package/dist/cjs/exports/storage.js +3 -1
  9. package/dist/cjs/exports/storage.js.map +1 -1
  10. package/dist/cjs/exports/transaction.js.map +1 -1
  11. package/dist/cjs/exports/utils.js +2 -1
  12. package/dist/cjs/exports/utils.js.map +1 -1
  13. package/dist/cjs/extensions/erc1155/write/mintTo.js +1 -0
  14. package/dist/cjs/extensions/erc1155/write/mintTo.js.map +1 -1
  15. package/dist/cjs/extensions/erc20/write/mintTo.js +1 -0
  16. package/dist/cjs/extensions/erc20/write/mintTo.js.map +1 -1
  17. package/dist/cjs/extensions/erc721/write/mintTo.js +1 -0
  18. package/dist/cjs/extensions/erc721/write/mintTo.js.map +1 -1
  19. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js +6 -0
  20. package/dist/cjs/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js.map +1 -1
  21. package/dist/cjs/storage/unpin.js +39 -0
  22. package/dist/cjs/storage/unpin.js.map +1 -0
  23. package/dist/cjs/utils/address.js +19 -1
  24. package/dist/cjs/utils/address.js.map +1 -1
  25. package/dist/cjs/version.js +1 -1
  26. package/dist/cjs/version.js.map +1 -1
  27. package/dist/cjs/wallets/in-app/web/lib/in-app-account.js +1 -1
  28. package/dist/cjs/wallets/in-app/web/lib/in-app-account.js.map +1 -1
  29. package/dist/cjs/wallets/wallet-connect/receiver/index.js +9 -6
  30. package/dist/cjs/wallets/wallet-connect/receiver/index.js.map +1 -1
  31. package/dist/cjs/wallets/wallet-connect/receiver/request-handlers/send-transaction.js +13 -6
  32. package/dist/cjs/wallets/wallet-connect/receiver/request-handlers/send-transaction.js.map +1 -1
  33. package/dist/cjs/wallets/wallet-connect/receiver/session-request.js +2 -1
  34. package/dist/cjs/wallets/wallet-connect/receiver/session-request.js.map +1 -1
  35. package/dist/esm/chains/chain-definitions/linea-sepolia.js +15 -0
  36. package/dist/esm/chains/chain-definitions/linea-sepolia.js.map +1 -0
  37. package/dist/esm/chains/chain-definitions/linea.js +14 -0
  38. package/dist/esm/chains/chain-definitions/linea.js.map +1 -0
  39. package/dist/esm/chains/chain-definitions/sepolia.js +1 -1
  40. package/dist/esm/exports/chains.js +2 -0
  41. package/dist/esm/exports/chains.js.map +1 -1
  42. package/dist/esm/exports/storage.js +1 -0
  43. package/dist/esm/exports/storage.js.map +1 -1
  44. package/dist/esm/exports/transaction.js +1 -1
  45. package/dist/esm/exports/transaction.js.map +1 -1
  46. package/dist/esm/exports/utils.js +1 -1
  47. package/dist/esm/exports/utils.js.map +1 -1
  48. package/dist/esm/extensions/erc1155/write/mintTo.js +1 -0
  49. package/dist/esm/extensions/erc1155/write/mintTo.js.map +1 -1
  50. package/dist/esm/extensions/erc20/write/mintTo.js +1 -0
  51. package/dist/esm/extensions/erc20/write/mintTo.js.map +1 -1
  52. package/dist/esm/extensions/erc721/write/mintTo.js +1 -0
  53. package/dist/esm/extensions/erc721/write/mintTo.js.map +1 -1
  54. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js +6 -0
  55. package/dist/esm/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.js.map +1 -1
  56. package/dist/esm/storage/unpin.js +36 -0
  57. package/dist/esm/storage/unpin.js.map +1 -0
  58. package/dist/esm/utils/address.js +18 -1
  59. package/dist/esm/utils/address.js.map +1 -1
  60. package/dist/esm/version.js +1 -1
  61. package/dist/esm/version.js.map +1 -1
  62. package/dist/esm/wallets/in-app/web/lib/in-app-account.js +1 -1
  63. package/dist/esm/wallets/in-app/web/lib/in-app-account.js.map +1 -1
  64. package/dist/esm/wallets/wallet-connect/receiver/index.js +9 -6
  65. package/dist/esm/wallets/wallet-connect/receiver/index.js.map +1 -1
  66. package/dist/esm/wallets/wallet-connect/receiver/request-handlers/send-transaction.js +12 -5
  67. package/dist/esm/wallets/wallet-connect/receiver/request-handlers/send-transaction.js.map +1 -1
  68. package/dist/esm/wallets/wallet-connect/receiver/session-request.js +2 -1
  69. package/dist/esm/wallets/wallet-connect/receiver/session-request.js.map +1 -1
  70. package/dist/types/chains/chain-definitions/linea-sepolia.d.ts +26 -0
  71. package/dist/types/chains/chain-definitions/linea-sepolia.d.ts.map +1 -0
  72. package/dist/types/chains/chain-definitions/linea.d.ts +26 -0
  73. package/dist/types/chains/chain-definitions/linea.d.ts.map +1 -0
  74. package/dist/types/exports/chains.d.ts +2 -0
  75. package/dist/types/exports/chains.d.ts.map +1 -1
  76. package/dist/types/exports/storage.d.ts +1 -0
  77. package/dist/types/exports/storage.d.ts.map +1 -1
  78. package/dist/types/exports/transaction.d.ts +1 -1
  79. package/dist/types/exports/transaction.d.ts.map +1 -1
  80. package/dist/types/exports/utils.d.ts +1 -1
  81. package/dist/types/exports/utils.d.ts.map +1 -1
  82. package/dist/types/extensions/erc1155/write/mintTo.d.ts +3 -3
  83. package/dist/types/extensions/erc1155/write/mintTo.d.ts.map +1 -1
  84. package/dist/types/extensions/erc20/write/mintTo.d.ts +3 -3
  85. package/dist/types/extensions/erc20/write/mintTo.d.ts.map +1 -1
  86. package/dist/types/extensions/erc721/write/mintTo.d.ts +3 -3
  87. package/dist/types/extensions/erc721/write/mintTo.d.ts.map +1 -1
  88. package/dist/types/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.d.ts.map +1 -1
  89. package/dist/types/storage/unpin.d.ts +25 -0
  90. package/dist/types/storage/unpin.d.ts.map +1 -0
  91. package/dist/types/transaction/transaction-store.d.ts +1 -2
  92. package/dist/types/transaction/transaction-store.d.ts.map +1 -1
  93. package/dist/types/utils/address.d.ts +15 -0
  94. package/dist/types/utils/address.d.ts.map +1 -1
  95. package/dist/types/version.d.ts +1 -1
  96. package/dist/types/version.d.ts.map +1 -1
  97. package/dist/types/wallets/interfaces/wallet.d.ts +1 -1
  98. package/dist/types/wallets/wallet-connect/receiver/index.d.ts.map +1 -1
  99. package/dist/types/wallets/wallet-connect/receiver/request-handlers/send-transaction.d.ts +2 -0
  100. package/dist/types/wallets/wallet-connect/receiver/request-handlers/send-transaction.d.ts.map +1 -1
  101. package/dist/types/wallets/wallet-connect/receiver/session-request.d.ts +2 -0
  102. package/dist/types/wallets/wallet-connect/receiver/session-request.d.ts.map +1 -1
  103. package/package.json +5 -5
  104. package/src/chains/chain-definitions/linea-sepolia.ts +15 -0
  105. package/src/chains/chain-definitions/linea.ts +14 -0
  106. package/src/chains/chain-definitions/sepolia.ts +1 -1
  107. package/src/exports/chains.ts +2 -0
  108. package/src/exports/storage.ts +1 -0
  109. package/src/exports/transaction.ts +4 -1
  110. package/src/exports/utils.ts +1 -0
  111. package/src/extensions/ens/resolve-avatar.test.ts +0 -10
  112. package/src/extensions/erc1155/write/mintTo.ts +7 -3
  113. package/src/extensions/erc20/write/mintTo.ts +15 -9
  114. package/src/extensions/erc721/write/mintTo.ts +7 -3
  115. package/src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx +6 -0
  116. package/src/storage/unpin.ts +52 -0
  117. package/src/transaction/transaction-store.ts +1 -1
  118. package/src/utils/address.ts +19 -1
  119. package/src/version.ts +1 -1
  120. package/src/wallets/in-app/web/lib/in-app-account.ts +1 -1
  121. package/src/wallets/interfaces/wallet.ts +1 -1
  122. package/src/wallets/wallet-connect/receiver/index.ts +19 -6
  123. package/src/wallets/wallet-connect/receiver/receiver.test.ts +1 -0
  124. package/src/wallets/wallet-connect/receiver/request-handlers/send-transaction.ts +17 -8
  125. package/src/wallets/wallet-connect/receiver/session-request.test.ts +31 -0
  126. package/src/wallets/wallet-connect/receiver/session-request.ts +4 -0
@@ -24,7 +24,7 @@ export { bytesToBigInt, bytesToBool, bytesToNumber, bytesToString, fromBytes, ty
24
24
  export { keccak256 } from "../utils/hashing/keccak256.js";
25
25
  export { sha256 } from "../utils/hashing/sha256.js";
26
26
  export { hashMessage } from "../utils/hashing/hashMessage.js";
27
- export { checksumAddress, getAddress, isAddress, shortenAddress, type Address, type AddressInput, } from "../utils/address.js";
27
+ export { checksumAddress, getAddress, isAddress, shortenAddress, shortenHex, type Address, type AddressInput, } from "../utils/address.js";
28
28
  export { encodeAbiParameters } from "../utils/abi/encodeAbiParameters.js";
29
29
  export { encodePacked } from "viem";
30
30
  export { setThirdwebDomains } from "../utils/domains.js";
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/exports/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAClE,OAAO,EAAE,wCAAwC,EAAE,MAAM,8DAA8D,CAAC;AACxH,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGnF,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAGhF,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,kDAAkD,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,gDAAgD,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAA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pE,OAAO,EACL,WAAW,EACX,UAAU,EACV,aAAa,EACb,aAAa,EACb,OAAO,EACP,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,+BAA+B,CAAC;AAEvC,OAAO,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAG1D,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAK9D,OAAO,EACL,eAAe,EACf,UAAU,EACV,SAAS,EACT,cAAc,EACd,UAAU,EACV,KAAK,OAAO,EACZ,KAAK,YAAY,GAClB,MAAM,qBAAqB,CAAC;AAK7B,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAKlF,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAK7C,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC"}
@@ -1,10 +1,10 @@
1
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
1
+ import type { BaseTransactionOptions, WithOverrides } from "../../../transaction/types.js";
2
2
  import type { NFTInput } from "../../../utils/nft/parseNft.js";
3
- export type MintToParams = {
3
+ export type MintToParams = WithOverrides<{
4
4
  to: string;
5
5
  nft: NFTInput | string;
6
6
  supply: bigint;
7
- };
7
+ }>;
8
8
  /**
9
9
  * Mints a "supply" number of new ERC1155 tokens to the specified "to" address.
10
10
  * If the `nft` parameter is a string, it will be used as the token URI.
@@ -1 +1 @@
1
- {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc1155/write/mintTo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,+LA4BnE"}
1
+ {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc1155/write/mintTo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,+LA6BnE"}
@@ -1,15 +1,15 @@
1
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
1
+ import type { BaseTransactionOptions, WithOverrides } from "../../../transaction/types.js";
2
2
  import type { Prettify } from "../../../utils/type-utils.js";
3
3
  /**
4
4
  * Represents the parameters for the `mintTo` function.
5
5
  */
6
- export type MintToParams = Prettify<{
6
+ export type MintToParams = Prettify<WithOverrides<{
7
7
  to: string;
8
8
  } & ({
9
9
  amount: number | string;
10
10
  } | {
11
11
  amountWei: bigint;
12
- })>;
12
+ })>>;
13
13
  /**
14
14
  * Mints a specified amount of tokens to a given address.
15
15
  * @param options - The options for minting tokens.
@@ -1 +1 @@
1
- {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc20/write/mintTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CACjC;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,CACb;IACE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,GACD;IACE,SAAS,EAAE,MAAM,CAAC;CACnB,CACJ,CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,kMAqBnE"}
1
+ {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc20/write/mintTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAG7D;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,QAAQ,CACjC,aAAa,CACX;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,CACb;IACE,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB,GACD;IACE,SAAS,EAAE,MAAM,CAAC;CACnB,CACJ,CACF,CACF,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,kMAsBnE"}
@@ -1,9 +1,9 @@
1
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
1
+ import type { BaseTransactionOptions, WithOverrides } from "../../../transaction/types.js";
2
2
  import type { NFTInput } from "../../../utils/nft/parseNft.js";
3
- export type MintToParams = {
3
+ export type MintToParams = WithOverrides<{
4
4
  to: string;
5
5
  nft: NFTInput | string;
6
- };
6
+ }>;
7
7
  /**
8
8
  * Mints a new ERC721 token and assigns it to the specified address.
9
9
  * If the `nft` parameter is a string, it will be used as the token URI.
@@ -1 +1 @@
1
- {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc721/write/mintTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,kMAyBnE"}
1
+ {"version":3,"file":"mintTo.d.ts","sourceRoot":"","sources":["../../../../../src/extensions/erc721/write/mintTo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,aAAa,EACd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,QAAQ,GAAG,MAAM,CAAC;CACxB,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,sBAAsB,CAAC,YAAY,CAAC,kMA0BnE"}
@@ -1 +1 @@
1
- {"version":3,"file":"WalletConnectReceiverScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAiBtE;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,8CAsLA"}
1
+ {"version":3,"file":"WalletConnectReceiverScreen.d.ts","sourceRoot":"","sources":["../../../../../../../src/react/web/ui/ConnectWallet/screens/WalletConnectReceiverScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAiBtE;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE;IACjD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,MAAM,EAAE,cAAc,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;CAClB,8CA4LA"}
@@ -0,0 +1,25 @@
1
+ import type { ThirdwebClient } from "../client/client.js";
2
+ export type UnpinOptions = {
3
+ client: ThirdwebClient;
4
+ cid: string;
5
+ };
6
+ /**
7
+ * Unpins a file from IPFS.
8
+ * @note For security purposes, this method requires a secret key to be set in the ThirdwebClient instance.
9
+ * @param options - The options for unpinning the file.
10
+ * @param options.client - The Thirdweb client instance.
11
+ * @param options.cid - The content identifier (CID) of the file to unpin.
12
+ * @throws Will throw an error if the client does not have a secret key or if the unpinning fails.
13
+ * @example
14
+ * ```ts
15
+ * import { unpin } from "thirdweb";
16
+ *
17
+ * const result = await unpin({
18
+ * client: thirdwebClient,
19
+ * cid: "QmTzQ1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1",
20
+ * });
21
+ *
22
+ * ```
23
+ */
24
+ export declare function unpin(options: UnpinOptions): Promise<void>;
25
+ //# sourceMappingURL=unpin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unpin.d.ts","sourceRoot":"","sources":["../../../src/storage/unpin.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,MAAM,MAAM,YAAY,GAAG;IACzB,MAAM,EAAE,cAAc,CAAC;IACvB,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AAEH,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,iBAuBhD"}
@@ -1,6 +1,6 @@
1
1
  import { type Store } from "../reactive/store.js";
2
2
  import type { Hex } from "../utils/encoding/hex.js";
3
- type StoredTransaction = {
3
+ export type StoredTransaction = {
4
4
  transactionHash: Hex;
5
5
  chainId: number;
6
6
  };
@@ -18,5 +18,4 @@ export declare function addTransactionToStore(options: {
18
18
  transactionHash: Hex;
19
19
  chainId: number;
20
20
  }): void;
21
- export {};
22
21
  //# sourceMappingURL=transaction-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"transaction-store.d.ts","sourceRoot":"","sources":["../../../src/transaction/transaction-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAEpD,KAAK,iBAAiB,GAAG;IACvB,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAS5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,QAUA"}
1
+ {"version":3,"file":"transaction-store.d.ts","sourceRoot":"","sources":["../../../src/transaction/transaction-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,KAAK,EAAe,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAEpD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAIF;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,GACd,KAAK,CAAC,iBAAiB,EAAE,CAAC,CAS5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE;IAC7C,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,GAAG,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;CACjB,QAUA"}
@@ -58,4 +58,19 @@ export declare function getAddress(address: string): Address;
58
58
  * @utils
59
59
  */
60
60
  export declare function shortenAddress(address: string, length?: number): string;
61
+ /**
62
+ * Shortens a hexadecimal string without performing any validation or checksumming.
63
+ * @param hex - The hexadecimal string to shorten.
64
+ * @param length - The number of characters to keep from the start and end of the string.
65
+ * @returns The shortened hexadecimal string.
66
+ * @example
67
+ * ```ts
68
+ * import { shortenHex } from 'thirdweb/utils';
69
+ *
70
+ * shortenHex('0xa0cf798816d4b9b9866b5330eea46a18382f251e');
71
+ * //=> '0xa0cf...251e'
72
+ * ```
73
+ * @utils
74
+ */
75
+ export declare function shortenHex(hex: string, length?: number): string;
61
76
  //# sourceMappingURL=address.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAKpC;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,OAAO,CAiB7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBxD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,UAGzD"}
1
+ {"version":3,"file":"address.d.ts","sourceRoot":"","sources":["../../../src/utils/address.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAKpC;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,OAAO,CAiB7D;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAoBxD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAKnD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,SAAI,UAGzD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,SAAI,UAEjD"}
@@ -1,2 +1,2 @@
1
- export declare const version = "5.30.1-nightly-07ec4873202a863bb313cd2c708bf410d9d2e09e-20240628000329";
1
+ export declare const version = "5.31.0";
2
2
  //# sourceMappingURL=version.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,2EAA2E,CAAC"}
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAW,CAAC"}
@@ -171,7 +171,7 @@ export type Account = {
171
171
  /**
172
172
  * Sign the given transaction and return the signature
173
173
  *
174
- * This method is not available for on all wallets. This method will be `undefined` if the wallet does not support it.
174
+ * This method is not available on all wallets. This method will be `undefined` if the wallet does not support it.
175
175
  * @example
176
176
  * ```ts
177
177
  * if (account.signTransaction) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/wallet-connect/receiver/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AAGzD,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAC7F,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,uCAAuC,CAAC;AACnF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAMvE,OAAO,KAAK,EACV,0CAA0C,EAC1C,mBAAmB,EACnB,mBAA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B,KAAK,IAAI,CAAC;IAEpD;;OAEG;IACH,YAAY,CAAC,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAEvD;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC,CACF,CAAC;AAEF,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,mBAAmB,EAAE,mBAAmB,CAAC;IAEzC;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAUF,eAAO,MAAM,6BAA6B,YAEzC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mCAAmC;;;;;;;;iCAQjB;QAC3B,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,0CAA0C,CAAC;KACpD;;CAIF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,gCAAgC,GACxC,OAAO,CAAC,mBAAmB,CAAC,CAiH9B;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,iCAAiC,QAK3C;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,8BAA8B,IAAI,OAAO,CAC7D,oBAAoB,EAAE,CACvB,CAEA;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAsB,8BAA8B,CAAC,OAAO,EAAE;IAC5D,OAAO,EAAE,oBAAoB,CAAC;IAC9B,mBAAmB,EAAE,mBAAmB,CAAC;CAC1C,GAAG,OAAO,CAAC,IAAI,CAAC,CAchB"}
@@ -1,3 +1,4 @@
1
+ import type { ThirdwebClient } from "../../../../client/client.js";
1
2
  import { type Hex } from "../../../../utils/encoding/hex.js";
2
3
  import type { Account } from "../../../interfaces/wallet.js";
3
4
  import type { WalletConnectTransactionRequestParams } from "../types.js";
@@ -7,6 +8,7 @@ import type { WalletConnectTransactionRequestParams } from "../types.js";
7
8
  export declare function handleSendTransactionRequest(options: {
8
9
  account: Account;
9
10
  chainId: number;
11
+ thirdwebClient: ThirdwebClient;
10
12
  params: WalletConnectTransactionRequestParams;
11
13
  }): Promise<Hex>;
12
14
  //# sourceMappingURL=send-transaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/wallet-connect/receiver/request-handlers/send-transaction.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EAGT,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAGzE;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,qCAAqC,CAAC;CAC/C,GAAG,OAAO,CAAC,GAAG,CAAC,CAsBf"}
1
+ {"version":3,"file":"send-transaction.d.ts","sourceRoot":"","sources":["../../../../../../src/wallets/wallet-connect/receiver/request-handlers/send-transaction.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAGnE,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,mCAAmC,CAAC;AAC1E,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,KAAK,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAGzE;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE;IAC1D,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,qCAAqC,CAAC;CAC/C,GAAG,OAAO,CAAC,GAAG,CAAC,CA8Bf"}
@@ -1,3 +1,4 @@
1
+ import type { ThirdwebClient } from "../../../client/client.js";
1
2
  import type { Wallet } from "../../interfaces/wallet.js";
2
3
  import type { WalletConnectClient } from "./types.js";
3
4
  import type { WalletConnectRequestHandlers, WalletConnectSessionRequestEvent } from "./types.js";
@@ -8,6 +9,7 @@ export declare function fulfillRequest(options: {
8
9
  wallet: Wallet;
9
10
  walletConnectClient: WalletConnectClient;
10
11
  event: WalletConnectSessionRequestEvent;
12
+ thirdwebClient: ThirdwebClient;
11
13
  handlers?: WalletConnectRequestHandlers;
12
14
  }): Promise<void>;
13
15
  //# sourceMappingURL=session-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-request.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/wallet-connect/receiver/session-request.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAGV,4BAA4B,EAC5B,gCAAgC,EAIjC,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,KAAK,EAAE,gCAAgC,CAAC;IACxC,QAAQ,CAAC,EAAE,4BAA4B,CAAC;CACzC,iBAuNA"}
1
+ {"version":3,"file":"session-request.d.ts","sourceRoot":"","sources":["../../../../../src/wallets/wallet-connect/receiver/session-request.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEhE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAEV,mBAAmB,EAEpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAGV,4BAA4B,EAC5B,gCAAgC,EAIjC,MAAM,YAAY,CAAC;AAGpB;;GAEG;AACH,wBAAsB,cAAc,CAAC,OAAO,EAAE;IAC5C,MAAM,EAAE,MAAM,CAAC;IACf,mBAAmB,EAAE,mBAAmB,CAAC;IACzC,KAAK,EAAE,gCAAgC,CAAC;IACxC,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,EAAE,4BAA4B,CAAC;CACzC,iBAyNA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thirdweb",
3
- "version": "5.30.1-nightly-07ec4873202a863bb313cd2c708bf410d9d2e09e-20240628000329",
3
+ "version": "5.31.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/thirdweb-dev/js.git#main"
@@ -190,21 +190,21 @@
190
190
  "@noble/curves": "1.4.0",
191
191
  "@noble/hashes": "1.4.0",
192
192
  "@passwordless-id/webauthn": "^1.6.1",
193
- "@radix-ui/react-dialog": "1.1.0",
193
+ "@radix-ui/react-dialog": "1.1.1",
194
194
  "@radix-ui/react-focus-scope": "1.0.4",
195
195
  "@radix-ui/react-icons": "1.3.0",
196
- "@radix-ui/react-tooltip": "1.1.0",
196
+ "@radix-ui/react-tooltip": "1.1.2",
197
197
  "@tanstack/react-query": "5.29.2",
198
198
  "@walletconnect/ethereum-provider": "2.12.2",
199
199
  "@walletconnect/sign-client": "^2.13.3",
200
- "abitype": "1.0.4",
200
+ "abitype": "1.0.5",
201
201
  "fast-text-encoding": "^1.0.6",
202
202
  "fuse.js": "7.0.0",
203
203
  "input-otp": "^1.2.4",
204
204
  "mipd": "0.0.7",
205
205
  "node-libs-browser": "2.2.1",
206
206
  "uqr": "0.1.2",
207
- "viem": "2.16.0"
207
+ "viem": "2.16.4"
208
208
  },
209
209
  "peerDependencies": {
210
210
  "@aws-sdk/client-lambda": "^3",
@@ -0,0 +1,15 @@
1
+ import { defineChain } from "../utils.js";
2
+
3
+ export const lineaSepolia = /* @__PURE__ */ defineChain({
4
+ id: 59141,
5
+ name: "Linea Sepolia",
6
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
7
+ blockExplorers: [
8
+ {
9
+ name: "LineaScan",
10
+ url: "https://sepolia.lineascan.build",
11
+ apiUrl: "https://api-sepolia.lineascan.build/api",
12
+ },
13
+ ],
14
+ testnet: true,
15
+ });
@@ -0,0 +1,14 @@
1
+ import { defineChain } from "../utils.js";
2
+
3
+ export const linea = /* @__PURE__ */ defineChain({
4
+ id: 59144,
5
+ name: "Linea",
6
+ nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
7
+ blockExplorers: [
8
+ {
9
+ name: "LineaScan",
10
+ url: "https://lineascan.build",
11
+ apiUrl: "https://api.lineascan.build/api",
12
+ },
13
+ ],
14
+ });
@@ -3,7 +3,7 @@ import { defineChain } from "../utils.js";
3
3
  export const sepolia = /*@__PURE__*/ defineChain({
4
4
  id: 11155111,
5
5
  name: "Sepolia",
6
- nativeCurrency: { name: "Sepolia Ether", symbol: "SEP", decimals: 18 },
6
+ nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
7
7
  blockExplorers: [
8
8
  {
9
9
  name: "Etherscan",
@@ -23,6 +23,8 @@ export { base } from "../chains/chain-definitions/base.js";
23
23
  export { ethereum, mainnet } from "../chains/chain-definitions/ethereum.js";
24
24
  export { optimismSepolia } from "../chains/chain-definitions/optimism-sepolia.js";
25
25
  export { optimism } from "../chains/chain-definitions/optimism.js";
26
+ export { lineaSepolia } from "../chains/chain-definitions/linea-sepolia.js";
27
+ export { linea } from "../chains/chain-definitions/linea.js";
26
28
  // mumbai = alias for polygonMumbai
27
29
  export {
28
30
  polygonMumbai,
@@ -4,6 +4,7 @@ export {
4
4
  type UploadMobileOptions,
5
5
  } from "../storage/uploadMobile.js";
6
6
  export { download, type DownloadOptions } from "../storage/download.js";
7
+ export { unpin, type UnpinOptions } from "../storage/unpin.js";
7
8
  export { resolveScheme, type ResolveSchemeOptions } from "../utils/ipfs.js";
8
9
  export {
9
10
  resolveArweaveScheme,
@@ -55,7 +55,10 @@ export {
55
55
  toSerializableTransaction,
56
56
  type ToSerializableTransactionOptions,
57
57
  } from "../transaction/actions/to-serializable-transaction.js";
58
- export { getTransactionStore } from "../transaction/transaction-store.js";
58
+ export {
59
+ type StoredTransaction,
60
+ getTransactionStore,
61
+ } from "../transaction/transaction-store.js";
59
62
 
60
63
  //types & utils
61
64
  export {
@@ -125,6 +125,7 @@ export {
125
125
  getAddress,
126
126
  isAddress,
127
127
  shortenAddress,
128
+ shortenHex,
128
129
  type Address,
129
130
  type AddressInput,
130
131
  } from "../utils/address.js";
@@ -6,16 +6,6 @@ import { resolveAvatar } from "./resolve-avatar.js";
6
6
  // skip this test suite if there is no secret key available to test with
7
7
  // TODO: remove reliance on secret key during unit tests entirely
8
8
  describe.runIf(process.env.TW_SECRET_KEY)("ENS:resolve-avatar", () => {
9
- it("resolves offchain record", async () => {
10
- const avatarUri = await resolveAvatar({
11
- client: TEST_CLIENT,
12
- name: "snowowl.eth",
13
- });
14
- expect(avatarUri).toMatchInlineSnapshot(
15
- `"https://i.imgur.com/MO1wCsI.jpg"`,
16
- );
17
- });
18
-
19
9
  it("resolves onchain record", async () => {
20
10
  const avatarUri = await resolveAvatar({
21
11
  client: TEST_CLIENT,
@@ -1,13 +1,16 @@
1
1
  import { maxUint256 } from "viem";
2
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
2
+ import type {
3
+ BaseTransactionOptions,
4
+ WithOverrides,
5
+ } from "../../../transaction/types.js";
3
6
  import type { NFTInput } from "../../../utils/nft/parseNft.js";
4
7
  import { mintTo as generatedMintTo } from "../__generated__/IMintableERC1155/write/mintTo.js";
5
8
 
6
- export type MintToParams = {
9
+ export type MintToParams = WithOverrides<{
7
10
  to: string;
8
11
  nft: NFTInput | string;
9
12
  supply: bigint;
10
- };
13
+ }>;
11
14
 
12
15
  /**
13
16
  * Mints a "supply" number of new ERC1155 tokens to the specified "to" address.
@@ -59,6 +62,7 @@ export function mintTo(options: BaseTransactionOptions<MintToParams>) {
59
62
  tokenId: maxUint256,
60
63
  uri: tokenUri,
61
64
  amount: options.supply,
65
+ overrides: options.overrides,
62
66
  };
63
67
  },
64
68
  });
@@ -1,4 +1,7 @@
1
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
1
+ import type {
2
+ BaseTransactionOptions,
3
+ WithOverrides,
4
+ } from "../../../transaction/types.js";
2
5
  import type { Prettify } from "../../../utils/type-utils.js";
3
6
  import { toUnits } from "../../../utils/units.js";
4
7
  import { mintTo as generatedMintTo } from "../__generated__/IMintableERC20/write/mintTo.js";
@@ -6,14 +9,16 @@ import { mintTo as generatedMintTo } from "../__generated__/IMintableERC20/write
6
9
  * Represents the parameters for the `mintTo` function.
7
10
  */
8
11
  export type MintToParams = Prettify<
9
- { to: string } & (
10
- | {
11
- amount: number | string;
12
- }
13
- | {
14
- amountWei: bigint;
15
- }
16
- )
12
+ WithOverrides<
13
+ { to: string } & (
14
+ | {
15
+ amount: number | string;
16
+ }
17
+ | {
18
+ amountWei: bigint;
19
+ }
20
+ )
21
+ >
17
22
  >;
18
23
 
19
24
  /**
@@ -49,6 +54,7 @@ export function mintTo(options: BaseTransactionOptions<MintToParams>) {
49
54
  return {
50
55
  to: options.to,
51
56
  amount: amount,
57
+ overrides: options.overrides,
52
58
  } as const;
53
59
  },
54
60
  });
@@ -1,11 +1,14 @@
1
- import type { BaseTransactionOptions } from "../../../transaction/types.js";
1
+ import type {
2
+ BaseTransactionOptions,
3
+ WithOverrides,
4
+ } from "../../../transaction/types.js";
2
5
  import type { NFTInput } from "../../../utils/nft/parseNft.js";
3
6
  import { mintTo as generatedMintTo } from "../__generated__/IMintableERC721/write/mintTo.js";
4
7
 
5
- export type MintToParams = {
8
+ export type MintToParams = WithOverrides<{
6
9
  to: string;
7
10
  nft: NFTInput | string;
8
- };
11
+ }>;
9
12
 
10
13
  /**
11
14
  * Mints a new ERC721 token and assigns it to the specified address.
@@ -53,6 +56,7 @@ export function mintTo(options: BaseTransactionOptions<MintToParams>) {
53
56
  return {
54
57
  to: options.to,
55
58
  uri: tokenUri,
59
+ overrides: options.overrides,
56
60
  } as const;
57
61
  },
58
62
  });
@@ -48,6 +48,12 @@ export function WalletConnectReceiverScreen(props: {
48
48
  queryKey: ["walletConnectSession"],
49
49
  });
50
50
  },
51
+ onDisconnect: () => {
52
+ setLoading(false);
53
+ queryClient.invalidateQueries({
54
+ queryKey: ["walletConnectSession"],
55
+ });
56
+ },
51
57
  onError: (error) => {
52
58
  setErrorConnecting(error.message);
53
59
  setLoading(false);
@@ -0,0 +1,52 @@
1
+ import type { ThirdwebClient } from "../client/client.js";
2
+ import { getThirdwebDomains } from "../utils/domains.js";
3
+ import { getClientFetch } from "../utils/fetch.js";
4
+
5
+ export type UnpinOptions = {
6
+ client: ThirdwebClient;
7
+ cid: string;
8
+ };
9
+
10
+ /**
11
+ * Unpins a file from IPFS.
12
+ * @note For security purposes, this method requires a secret key to be set in the ThirdwebClient instance.
13
+ * @param options - The options for unpinning the file.
14
+ * @param options.client - The Thirdweb client instance.
15
+ * @param options.cid - The content identifier (CID) of the file to unpin.
16
+ * @throws Will throw an error if the client does not have a secret key or if the unpinning fails.
17
+ * @example
18
+ * ```ts
19
+ * import { unpin } from "thirdweb";
20
+ *
21
+ * const result = await unpin({
22
+ * client: thirdwebClient,
23
+ * cid: "QmTzQ1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1Q1N1z1",
24
+ * });
25
+ *
26
+ * ```
27
+ */
28
+
29
+ export async function unpin(options: UnpinOptions) {
30
+ if (!options.client.secretKey) {
31
+ throw new Error(
32
+ "Unauthorized - Your client must have a secret key to unpin files.",
33
+ );
34
+ }
35
+
36
+ const res = await getClientFetch(options.client)(
37
+ `https://${getThirdwebDomains().storage}/ipfs/pinned/${options.cid}`,
38
+ {
39
+ method: "DELETE",
40
+ },
41
+ );
42
+
43
+ if (!res.ok) {
44
+ res.body?.cancel();
45
+ if (res.status === 401) {
46
+ throw new Error(
47
+ "Unauthorized - You don't have permission to use this service.",
48
+ );
49
+ }
50
+ throw new Error(`Failed to unpin file - ${res.status} - ${res.statusText}`);
51
+ }
52
+ }
@@ -1,7 +1,7 @@
1
1
  import { type Store, createStore } from "../reactive/store.js";
2
2
  import type { Hex } from "../utils/encoding/hex.js";
3
3
 
4
- type StoredTransaction = {
4
+ export type StoredTransaction = {
5
5
  transactionHash: Hex;
6
6
  chainId: number;
7
7
  };
@@ -112,5 +112,23 @@ export function getAddress(address: string): Address {
112
112
  */
113
113
  export function shortenAddress(address: string, length = 4) {
114
114
  const _address = getAddress(address);
115
- return `${_address.slice(0, length + 2)}...${_address.slice(-length)}`;
115
+ return shortenHex(_address, length);
116
+ }
117
+
118
+ /**
119
+ * Shortens a hexadecimal string without performing any validation or checksumming.
120
+ * @param hex - The hexadecimal string to shorten.
121
+ * @param length - The number of characters to keep from the start and end of the string.
122
+ * @returns The shortened hexadecimal string.
123
+ * @example
124
+ * ```ts
125
+ * import { shortenHex } from 'thirdweb/utils';
126
+ *
127
+ * shortenHex('0xa0cf798816d4b9b9866b5330eea46a18382f251e');
128
+ * //=> '0xa0cf...251e'
129
+ * ```
130
+ * @utils
131
+ */
132
+ export function shortenHex(hex: string, length = 4) {
133
+ return `${hex.slice(0, length + 2)}...${hex.slice(-length)}`;
116
134
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const version = "5.30.1-nightly-07ec4873202a863bb313cd2c708bf410d9d2e09e-20240628000329";
1
+ export const version = "5.31.0";
@@ -198,7 +198,7 @@ export class IFrameWallet {
198
198
  const partnerId = this.ecosystem?.partnerId;
199
199
  const isEcosystem = !!this.ecosystem;
200
200
 
201
- const permissions = this.ecosystem
201
+ const permissions = this.ecosystem?.partnerId
202
202
  ? await getEcosystemPartnerPermissions(
203
203
  this.ecosystem.id,
204
204
  this.ecosystem?.partnerId,
@@ -203,7 +203,7 @@ export type Account = {
203
203
  /**
204
204
  * Sign the given transaction and return the signature
205
205
  *
206
- * This method is not available for on all wallets. This method will be `undefined` if the wallet does not support it.
206
+ * This method is not available on all wallets. This method will be `undefined` if the wallet does not support it.
207
207
  * @example
208
208
  * ```ts
209
209
  * if (account.signTransaction) {