@depay/widgets 9.1.2 → 9.2.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.
package/README.md CHANGED
@@ -1859,12 +1859,13 @@ DePayWidgets.Login().then(()=>{}).catch((error)=>{
1859
1859
 
1860
1860
  DePay Select widget allows you to open a dialog that allows you to select things like tokens, etc.
1861
1861
 
1862
- Resolves with what has been selected by the user:
1862
+ ### Select Token
1863
+
1864
+ Resolves with what has been selected by the user.
1863
1865
 
1864
1866
  ```javascript
1865
1867
  let token = await DePayWidgets.Select({ what: 'token' })
1866
1868
 
1867
- // token
1868
1869
  // {
1869
1870
  // address: "0xa0bed124a09ac2bd941b10349d8d224fe3c955eb"
1870
1871
  // blockchain: "ethereum"
@@ -1876,6 +1877,44 @@ let token = await DePayWidgets.Select({ what: 'token' })
1876
1877
  // }
1877
1878
  ```
1878
1879
 
1880
+
1881
+ ### Select NFT
1882
+
1883
+ Resolves with what has been selected by the user.
1884
+
1885
+ This only resolves to a single contract on a single blockchain.
1886
+
1887
+ As NFT collections could span over multiple blockchains, users would need to make one selection per contract address & blockchain.
1888
+
1889
+ ```javascript
1890
+ let collection = await DePayWidgets.Select({ what: 'nft' })
1891
+
1892
+ // {
1893
+ // address: "0xba30E5F9Bb24caa003E9f2f0497Ad287FDF95623",
1894
+ // blockchain: "ethereum",
1895
+ // createdAt: "2021-06-18T21:32:25.355263+00:00",
1896
+ // holders: 5674,
1897
+ // image: "https://i.seadn.io/gae/l1wZXP2hHFUQ3turU5VQ9PpgVVasyQ79-ChvCgjoU5xKkBA50OGoJqKZeMOR-qLrzqwIfd1HpYmiv23JWm0EZ14owiPYaufqzmj1?w=500&auto=format",
1898
+ // link: "https://opensea.io/collection/bored-ape-kennel-club",
1899
+ // name: "BoredApeKennelClub",
1900
+ // type: "721",
1901
+ // }
1902
+ ```
1903
+
1904
+ If the NFT contract is of type 1155 the return will also contain the NFTs id for the given contract address:
1905
+
1906
+ ```javascript
1907
+ // {
1908
+ // address: "0x495f947276749Ce646f68AC8c248420045cb7b5e",
1909
+ // blockchain: "ethereum",
1910
+ // id: "35347623114821255323888368639026081793120226253597860997754787918389704654849",
1911
+ // image: "https://i.seadn.io/gae/IIFck1wOESXNMfCN6nEhFIXReUaSyI68MXNPjvFapbjQXc42ARIcG8k-nEKJjXs1GdCY75ej4qArfy7LDbgGOFSR6zzBIOG-yEw04Q?w=500&auto=format",
1912
+ // link: "https://opensea.io/assets/ethereum/0x495f947276749ce646f68ac8c248420045cb7b5e/35347623114821255323888368639026081793120226253597860997754787918389704654849",
1913
+ // name: "Genesis Block - 100,000 BC",
1914
+ // type: "1155"
1915
+ // }
1916
+ ```
1917
+
1879
1918
  ## Examples
1880
1919
 
1881
1920
  ### React