Create Draft Contract
Creates a contract on the HyperMint platform and places it in the "Draft" state. The Deploy Contract endpoint can then be used to deploy it onto the blockchain of choice.
put
https://api.hypermint.com/v1
/nft-contract
Creates a Contract
Creates a contract on the HyperMint platform and places it in the "Draft" state.
Parameters
Header
HM_ACCESS_KEY*
HyperMint Access Key
HM_ACCESS_KEY_SECRET*
HyperMint Access Key Secret
Body
name*
String
name of the contract
network*
Object
Please See CreateNFTNetworkRequest interface below for details
symbol*
String
Symbol for the contract
allowBuyOnNetwork*
Boolean
Allow for users to be able to buy the NFTs directly through their crypto wallets on network.
metadata
Object
Please See CreateNFTContractMetadataRequest Interface below for details
publicSaleAt
Date
Date format is YYYY-MM-DDTHH:mm:ss.sssZ
saleClosesAt
Date
Date format is YYYY-MM-DDTHH:mm:ss.sssZ
secondarySaleBasisPoints*
Number
Note for setting secondary sale basis points: One basis point equals 0.01% and ten thousand basis points equals 100%.
erc721Price
Number
Price of the token in ETH
erc721MaxPerTransaction
Number
Max tokens that can be bought in one transaction
allowBuyWithMoonPay
Boolean
Allow buy with fiat on the contract through MoonPay (Note requires account on MoonPay)
enableOpenSeaOperatorFilterRegistry*
Boolean
When enabled tokens can only be traded on marketplaces which enforce secondary royalties
Responses
200: OK
Responds with contract Id which can be used later to deploy
400: Bad Request
The request sent was malformed or did not pass as a valid contract creation request.The error message will explain the reason as to why the request couldn't be serviced.
404: Not Found
Not Found
interface CreateNFTContractRequest {
name: string;
network: CreateNFTNetworkRequest;
symbol: string;
allowBuyOnNetwork: boolean;
metadata: CreateNFTContractMetadataRequest;
publicSaleAt?: Date; // Date Format is YYYY-MM-DDTHH:mm:ss.sssZ
saleClosesAt?: Date; // Date Format is YYYY-MM-DDTHH:mm:ss.sssZ
secondarySaleBasisPoints: number;
erc721Price?: number; // Price in ETH
erc721MaxPerTransaction?: number;
allowBuyWithMoonPay?: boolean;
}
interface CreateNFTNetworkRequest {
type: NetworkType;
environment: NetworkEnvironment;
chain: NetworkChain;
// Address used to reclaim control of the contract from HM if desired in the future
recoveryAddress: string;
// Used when providing custom access list behavior via an external API
presaleAddress?: string;
customerPrimaryRoyaltyAddress: string;
// Address show as the owner on marketplaces
collectionOwnerAddress: string;
contractType: NFTContractType;
useManagedAccessList: boolean;
usePrimarySaleSplitter?: boolean;
//primarySaleSplitterId will be required if usePrimarySaleSplitter is set to true
primarySaleSplitterId?: string;
secondaryRoyaltyAddress: string;
useSecondarySaleSplitter?: boolean;
//secondarySaleSplitterId will be required if useSecondarySaleSplitter is set to true
secondarySaleSplitterId?: string;
}
interface CreateNFTContractMetadataRequest {
type: NFTContractMetadataType;
contractUrl?: string;
tokenUrl?: string;
description?: string;
externalLink?: string;
}
enum NetworkType {
Ethereum = 'Ethereum',
Polygon = 'Polygon'
}
enum NetworkEnvironment {
Emulator = 'Emulator',
Testnet = 'Testnet',
Mainnet = 'Mainnet'
}
enum NFTContractType {
ERC721 = 'ERC721',
ERC1155 = 'ERC1155'
}
enum NetworkChain {
EVMLocal = 'EVMLocal',
Ethereum = 'Ethereum',
Goerli = 'Goerli',
Polygon = 'Polygon',
Mumbai = 'Mumbai'
}
enum NFTContractMetadataType {
None = 'None',
Hosted = 'Hosted',
Url = 'Url'
}
You can use the Upload Contract Metadata Media endpoint to upload an image to your contract's metadata if you've selected
Hosted
as the metadata typeSomething not quite right, unclear or can't find what you are looking for? Please let us know at [email protected] and we will get back to you as soon as we can.
Last modified 4mo ago