@propsproject/nft-sdk
v0.0.12
Published
Props NFT SDK
Downloads
1
Readme
Props NFT SDK
This SDK provides utility classes for interacting with instances of the Props NFT core contracts.
Models
The SDK is chain-agnostic and able to connect to any existing deployment of any Props NFT core contract on any network (for now, the SDK is linked to the latest active deployment for the corresponding network, but support for any previous deployments will be added soon). Make sure the provider and signers that get connected to the models are on the right network.
PropsERC721
Available methods:
approve
mintAndTransfer
safeTransferFrom
setApprovalForAll
PropsERC721Factory
Available methods:
deploy
Transaction modes
The SDK has support for both direct transactions and calldata generation (which can be used for various purposes, eg. to generate meta-transactions for any contract interaction). By default, the model assumes a direct transactions mode, but this can be changed via the options
parameter each model accepts in the constructor. Calldata encoding can be turned on by turning on the onlyGenerateCalldata
field. In this case, all SDK action methods will return the encoded calldata corresponding to executing that specific action. This calldata can be used to generate a meta-transaction or a Gnosis Safe transaction.
Usage
For some usage examples, check out the examples
.