gondi 0.3.17 → 0.3.18
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 +9 -9
- package/dist/index.mjs +28 -28
- package/dist/index.mjs.map +4 -4
- package/dist/src/api.d.ts +5 -5
- package/dist/src/auth.d.ts +2 -2
- package/dist/src/blockchain.d.ts +26 -23
- package/dist/src/contracts/AllV4.d.ts +5 -5
- package/dist/src/contracts/AllV5.d.ts +6 -6
- package/dist/src/contracts/Contract.d.ts +4 -4
- package/dist/src/contracts/CryptoPunks.d.ts +3 -3
- package/dist/src/contracts/Leverage.d.ts +5 -5
- package/dist/src/contracts/MslV4.d.ts +11 -11
- package/dist/src/contracts/MslV5.d.ts +7 -7
- package/dist/src/contracts/Seaport.d.ts +6 -6
- package/dist/src/contracts/UserVaultV5.d.ts +90 -0
- package/dist/src/deploys.d.ts +3 -2
- package/dist/src/errors.d.ts +1 -1
- package/dist/src/gondi.d.ts +93 -18
- package/dist/src/graphql/client.d.ts +2 -2
- package/dist/src/graphql/sdk.d.ts +2 -2
- package/dist/src/index.d.ts +3 -3
- package/dist/src/model.d.ts +9 -9
- package/dist/src/reservoir/Reservoir.d.ts +8 -8
- package/dist/src/reservoir/utils.d.ts +2 -2
- package/dist/src/utils.d.ts +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -24,11 +24,11 @@ yarn add gondi
|
|
|
24
24
|
To get started, you need to provide a wallet only.
|
|
25
25
|
|
|
26
26
|
```javascript
|
|
27
|
-
import { Gondi } from
|
|
28
|
-
import { createWalletClient, http } from
|
|
29
|
-
import { privateKeyToAccount } from
|
|
30
|
-
import { mainnet } from
|
|
31
|
-
const transport = http(
|
|
27
|
+
import { Gondi } from 'gondi';
|
|
28
|
+
import { createWalletClient, http } from 'viem';
|
|
29
|
+
import { privateKeyToAccount } from 'viem/accounts';
|
|
30
|
+
import { mainnet } from 'viem/chains';
|
|
31
|
+
const transport = http('https://eth-mainnet.g.alchemy.com/v2/...');
|
|
32
32
|
|
|
33
33
|
const wallet = createWalletClient({
|
|
34
34
|
account: privateKeyToAccount(privateKey),
|
|
@@ -47,11 +47,11 @@ Typescript types are included in the package.
|
|
|
47
47
|
We use integer ids to identify collections and NFTs. We provide helper functions to get them:
|
|
48
48
|
|
|
49
49
|
```javascript
|
|
50
|
-
const nftId = await gondi.nftId({ slug:
|
|
51
|
-
const collectionId = await gondi.collectionId({ slug:
|
|
50
|
+
const nftId = await gondi.nftId({ slug: 'collection-slug', tokenId: 0n });
|
|
51
|
+
const collectionId = await gondi.collectionId({ slug: 'collection-slug' });
|
|
52
52
|
const collectionId = (
|
|
53
53
|
await gondi.collectionId({
|
|
54
|
-
contractAddress:
|
|
54
|
+
contractAddress: '0x0000000000000000000000000000000000000000',
|
|
55
55
|
})
|
|
56
56
|
)[0]; // It's an array because some collections use same contract (e.g. Artblocks)
|
|
57
57
|
```
|
|
@@ -90,7 +90,7 @@ const offer = await gondi.makeCollectionOffer({
|
|
|
90
90
|
### Listing Offers
|
|
91
91
|
|
|
92
92
|
```javascript
|
|
93
|
-
import { OffersSortField, Ordering } from
|
|
93
|
+
import { OffersSortField, Ordering } from 'gondi';
|
|
94
94
|
const offer = await gondi.offers({
|
|
95
95
|
cusor, // Cursor returned by previous calls.
|
|
96
96
|
limit, // Number results.
|