Options
All
  • Public
  • Public/Protected
  • All
Menu

opensea-js

Index

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

PartialReadonlyContractAbi

PartialReadonlyContractAbi: Array<Readonly<PartialAbiDefinition>>

TxnCallback

TxnCallback: function

Type declaration

    • (result: boolean): void
    • Parameters

      • result: boolean

      Returns void

Web3Callback

Web3Callback: function

Type declaration

    • (err: Error | null, result: T): void
    • Parameters

      • err: Error | null
      • result: T

      Returns void

Web3RPCCallback

Web3RPCCallback: Web3Callback<JSONRPCResponsePayload>

WyvernAtomicMatchParameters

WyvernAtomicMatchParameters: [string[], BigNumber[], Array<number | BigNumber>, string, string, string, string, string, string, Array<number | BigNumber>, string[]]

Variables

Const API_BASE_MAINNET

API_BASE_MAINNET: "https://api.opensea.io" = "https://api.opensea.io"

Const API_BASE_RINKEBY

API_BASE_RINKEBY: "https://rinkeby-api.opensea.io" = "https://rinkeby-api.opensea.io"

Const API_PATH

API_PATH: string = `/api/v${ORDERBOOK_VERSION}`

Const API_VERSION

API_VERSION: number = 1

Const CanonicalWETH

CanonicalWETH: PartialReadonlyContractAbi = [{'constant': true, 'inputs': [], 'name': 'name', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'guy', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'totalSupply', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'src', 'type': 'address'}, {'name': 'dst', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'wad', 'type': 'uint256'}], 'name': 'withdraw', 'outputs': [], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'decimals', 'outputs': [{'name': '', 'type': 'uint8'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': true, 'inputs': [{'name': '', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'symbol', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'constant': false, 'inputs': [{'name': 'dst', 'type': 'address'}, {'name': 'wad', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': '', 'type': 'bool'}], 'payable': false, 'stateMutability': 'nonpayable', 'type': 'function'}, {'constant': false, 'inputs': [], 'name': 'deposit', 'outputs': [], 'payable': true, 'stateMutability': 'payable', 'type': 'function'}, {'constant': true, 'inputs': [{'name': '', 'type': 'address'}, {'name': '', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'stateMutability': 'view', 'type': 'function'}, {'payable': true, 'stateMutability': 'payable', 'type': 'fallback'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': true, 'name': 'guy', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': true, 'name': 'dst', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'dst', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Deposit', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': 'src', 'type': 'address'}, {'indexed': false, 'name': 'wad', 'type': 'uint256'}], 'name': 'Withdrawal', 'type': 'event'}]

Const DEFAULT_BUYER_FEE_BASIS_POINTS

DEFAULT_BUYER_FEE_BASIS_POINTS: 0 = 0

Const DEFAULT_GAS_INCREASE_FACTOR

DEFAULT_GAS_INCREASE_FACTOR: 1.1 = 1.1

Const DEFAULT_MAX_BOUNTY

DEFAULT_MAX_BOUNTY: 250 = DEFAULT_SELLER_FEE_BASIS_POINTS

Const DEFAULT_SELLER_FEE_BASIS_POINTS

DEFAULT_SELLER_FEE_BASIS_POINTS: 250 = 250

Const DEP_INFURA_KEY

DEP_INFURA_KEY: "e8695bce67944848aa95459fac052f8e" = "e8695bce67944848aa95459fac052f8e"

Const ENJIN_ADDRESS

ENJIN_ADDRESS: "0x8562c38485B1E8cCd82E44F89823dA76C98eb0Ab" = "0x8562c38485B1E8cCd82E44F89823dA76C98eb0Ab"

Const ENJIN_COIN_ADDRESS

ENJIN_COIN_ADDRESS: "0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c" = "0xf629cbd94d3791c9250152bd8dfbdf380e2a3b9c"

Const ERC1155

ERC1155: PartialReadonlyContractAbi = [{"payable": false,"stateMutability": "nonpayable","type": "fallback"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_owner","type": "address"},{"indexed": true,"name": "_spender","type": "address"},{"indexed": false,"name": "_value","type": "uint256"}],"name": "Approval","type": "event"},{"anonymous": false,"inputs": [{"indexed": false,"name": "_block","type": "uint256"},{"indexed": false,"name": "_storage","type": "address"},{"indexed": false,"name": "_oldContract","type": "address"}],"name": "Initialize","type": "event"},{"anonymous": false,"inputs": [{"indexed": false,"name": "_block","type": "uint256"},{"indexed": false,"name": "_nextContract","type": "address"}],"name": "Retire","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_from","type": "address"},{"indexed": false,"name": "_data","type": "string"}],"name": "Log","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateDecimals","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateName","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateSymbol","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": false,"name": "_uri","type": "string"}],"name": "SetURI","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_from","type": "address"},{"indexed": true,"name": "_to","type": "address"}],"name": "Assign","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_creator","type": "address"}],"name": "AcceptAssignment","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_creator","type": "address"},{"indexed": false,"name": "_isNonFungible","type": "bool"}],"name": "Create","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": false,"name": "_value","type": "uint256"}],"name": "Mint","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateMaxMeltFee","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateMeltFee","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_owner","type": "address"},{"indexed": true,"name": "_operator","type": "address"},{"indexed": true,"name": "_id","type": "uint256"},{"indexed": false,"name": "_approved","type": "bool"}],"name": "OperatorApproval","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_from","type": "address"},{"indexed": true,"name": "_to","type": "address"},{"indexed": false,"name": "_value","type": "uint256"}],"name": "Transfer","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_sender","type": "address"},{"indexed": true,"name": "_feeId","type": "uint256"},{"indexed": false,"name": "_feeValue","type": "uint256"}],"name": "TransferFee","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateMaxTransferFee","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateTransferable","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"}],"name": "UpdateTransferFee","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_account","type": "address"},{"indexed": false,"name": "_whitelisted","type": "address"},{"indexed": false,"name": "_on","type": "bool"}],"name": "Whitelist","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_owner","type": "address"},{"indexed": false,"name": "_value","type": "uint256"}],"name": "Melt","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_id","type": "uint256"},{"indexed": true,"name": "_sender","type": "address"}],"name": "DeployERCAdapter","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_tradeId","type": "uint256"},{"indexed": true,"name": "_firstParty","type": "address"},{"indexed": true,"name": "_secondParty","type": "address"},{"indexed": false,"name": "_escrowedEnjFirstParty","type": "uint256"}],"name": "CreateTrade","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_tradeId","type": "uint256"},{"indexed": true,"name": "_firstParty","type": "address"},{"indexed": true,"name": "_secondParty","type": "address"},{"indexed": false,"name": "_receivedEnjFirstParty","type": "uint256"},{"indexed": false,"name": "_changeEnjFirstParty","type": "uint256"},{"indexed": false,"name": "_receivedEnjSecondParty","type": "uint256"}],"name": "CompleteTrade","type": "event"},{"anonymous": false,"inputs": [{"indexed": true,"name": "_tradeId","type": "uint256"},{"indexed": true,"name": "_firstParty","type": "address"},{"indexed": false,"name": "_receivedEnjFirstParty","type": "uint256"}],"name": "CancelTrade","type": "event"},{"constant": true,"inputs": [{"name": "_interfaceID","type": "bytes4"}],"name": "supportsInterface","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "pure","type": "function"},{"constant": false,"inputs": [{"name": "_name","type": "string"},{"name": "_totalSupply","type": "uint256"},{"name": "_initialReserve","type": "uint256"},{"name": "_supplyModel","type": "address"},{"name": "_meltValue","type": "uint256"},{"name": "_meltFeeRatio","type": "uint16"},{"name": "_transferable","type": "uint8"},{"name": "_transferFeeSettings","type": "uint256[3]"},{"name": "_nonFungible","type": "bool"}],"name": "create","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_initialReserve","type": "uint256"}],"name": "minMeltValue","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_to","type": "address[]"},{"name": "_values","type": "uint256[]"}],"name": "mintFungibles","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_to","type": "address[]"}],"name": "mintNonFungibles","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_to","type": "address[]"},{"name": "_data","type": "uint128[]"}],"name": "mintNonFungiblesWithData","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "reserve","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_value","type": "uint128"}],"name": "releaseReserve","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_name","type": "string"}],"name": "updateName","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_creator","type": "address"}],"name": "assign","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"}],"name": "acceptAssignment","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_account","type": "address"},{"name": "_whitelisted","type": "address"},{"name": "_on","type": "bool"}],"name": "setWhitelisted","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_transferable","type": "uint8"}],"name": "setTransferable","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_fee","type": "uint16"}],"name": "setMeltFee","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_fee","type": "uint16"}],"name": "decreaseMaxMeltFee","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_fee","type": "uint256"}],"name": "setTransferFee","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_fee","type": "uint256"}],"name": "decreaseMaxTransferFee","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_decimals","type": "uint8"},{"name": "_symbol","type": "string"}],"name": "deployERC20Adapter","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_symbol","type": "string"}],"name": "deployERC721Adapter","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_data","type": "string"}],"name": "addLog","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [],"name": "typeCount","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_index","type": "uint256"}],"name": "typeByIndex","outputs": [{"name": "_id","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "nonFungibleTypeCount","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_index","type": "uint256"}],"name": "nonFungibleTypeByIndex","outputs": [{"name": "_id","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [],"name": "fungibleTypeCount","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_index","type": "uint256"}],"name": "fungibleTypeByIndex","outputs": [{"name": "_id","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "typeData","outputs": [{"name": "_name","type": "string"},{"name": "_creator","type": "address"},{"name": "_meltValue","type": "uint256"},{"name": "_meltFeeRatio","type": "uint16"},{"name": "_meltFeeMaxRatio","type": "uint16"},{"name": "_supplyModel","type": "address"},{"name": "_totalSupply","type": "uint256"},{"name": "_circulatingSupply","type": "uint256"},{"name": "_reserve","type": "uint256"},{"name": "_transferable","type": "uint8"},{"name": "_transferFeeData","type": "uint256[4]"},{"name": "_nonFungible","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "transferSettings","outputs": [{"name": "_transferable","type": "uint8"},{"name": "_transferFeeType","type": "uint8"},{"name": "_transferFeeCurrency","type": "uint256"},{"name": "_transferFeeValue","type": "uint256"},{"name": "_transferFeeMaxValue","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_creator","type": "address"}],"name": "isCreatorOf","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_account","type": "address"},{"name": "_whitelisted","type": "address"}],"name": "whitelisted","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "name","outputs": [{"name": "","type": "string"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "totalSupply","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "mintableSupply","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "circulatingSupply","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_owner","type": "address"}],"name": "balanceOf","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "decimals","outputs": [{"name": "","type": "uint8"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "symbol","outputs": [{"name": "","type": "string"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "getERC20Adapter","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "getERC721Adapter","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"}],"name": "transfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_data","type": "bytes"}],"name": "safeTransfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_msgSender","type": "address"}],"name": "transferAdapter","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address"},{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"}],"name": "transferFrom","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address"},{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_data","type": "bytes"}],"name": "safeTransferFrom","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address"},{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_msgSender","type": "address"}],"name": "transferFromAdapter","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "batchTransfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"},{"name": "_data","type": "bytes"}],"name": "safeBatchTransfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address"},{"name": "_to","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "batchTransferFrom","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address"},{"name": "_to","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"},{"name": "_data","type": "bytes"}],"name": "safeBatchTransferFrom","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address[]"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "multicastTransfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address[]"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"},{"name": "_data","type": "bytes"}],"name": "safeMulticastTransfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_from","type": "address[]"},{"name": "_to","type": "address[]"},{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "multicastTransferFrom","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_owner","type": "address"},{"name": "_spender","type": "address"}],"name": "allowance","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_spender","type": "address"},{"name": "_id","type": "uint256"},{"name": "_currentValue","type": "uint256"},{"name": "_value","type": "uint256"}],"name": "approve","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_spender","type": "address"},{"name": "_id","type": "uint256"},{"name": "_currentValue","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_msgSender","type": "address"}],"name": "approveAdapter","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_spender","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_currentValues","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "batchApprove","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_operator","type": "address"},{"name": "_ids","type": "uint256[]"},{"name": "_approved","type": "bool"}],"name": "setApproval","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_operator","type": "address"},{"name": "_approved","type": "bool"}],"name": "setApprovalForAll","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_operator","type": "address"},{"name": "_id","type": "uint256"},{"name": "_approved","type": "bool"},{"name": "_msgSender","type": "address"}],"name": "setApprovalAdapter","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_owner","type": "address"},{"name": "_operator","type": "address"},{"name": "_id","type": "uint256"}],"name": "isApproved","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_owner","type": "address"},{"name": "_operator","type": "address"}],"name": "isApprovedForAll","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"},{"name": "_from","type": "address"},{"name": "_to","type": "address"}],"name": "transferFees","outputs": [{"name": "_transferValue","type": "uint256"},{"name": "_minTransferValue","type": "uint256"},{"name": "_transferFeeCurrency","type": "uint256"},{"name": "_fee","type": "uint256"},{"name": "_maxFee","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_askingIds","type": "uint256[]"},{"name": "_askingValues","type": "uint128[]"},{"name": "_offeringIds","type": "uint256[]"},{"name": "_offeringValues","type": "uint128[]"},{"name": "_secondParty","type": "address"}],"name": "createTrade","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "tradeCompletable","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"}],"name": "completeTrade","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"}],"name": "cancelTrade","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_ids","type": "uint256[]"},{"name": "_values","type": "uint256[]"}],"name": "melt","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "ownerOf","outputs": [{"name": "","type": "address"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_id","type": "uint256"},{"name": "_uri","type": "string"}],"name": "setURI","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "uri","outputs": [{"name": "","type": "string"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "nonFungibleCount","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_index","type": "uint256"}],"name": "nonFungibleByIndex","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"},{"name": "_owner","type": "address"},{"name": "_index","type": "uint256"}],"name": "nonFungibleOfOwnerByIndex","outputs": [{"name": "","type": "uint256"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": true,"inputs": [{"name": "_id","type": "uint256"}],"name": "isNonFungible","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "pure","type": "function"},{"constant": true,"inputs": [{"name": "_addr","type": "address"}],"name": "isContract","outputs": [{"name": "","type": "bool"}],"payable": false,"stateMutability": "view","type": "function"},{"constant": false,"inputs": [{"name": "_erc20ContractAddress","type": "address"},{"name": "_to","type": "address"},{"name": "_value","type": "uint256"}],"name": "releaseERC20","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_value","type": "uint256"}],"name": "releaseETH","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_erc721ContractAddress","type": "address"},{"name": "_to","type": "address"},{"name": "_token","type": "uint256"}],"name": "releaseERC721","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_erc1155ContractAddress","type": "address"},{"name": "_to","type": "address"},{"name": "_id","type": "uint256"},{"name": "_value","type": "uint256"}],"name": "releaseERC1155","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_storage","type": "address"},{"name": "_oldContract","type": "address"}],"name": "initialize","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{"constant": false,"inputs": [{"name": "_nextContract","type": "address"}],"name": "retire","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"}]

Const ERC20

ERC20: PartialReadonlyContractAbi = [{'constant': true, 'inputs': [], 'name': 'name', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'approve', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'totalSupply', 'outputs': [{'name': '', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_from', 'type': 'address'}, {'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transferFrom', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'decimals', 'outputs': [{'name': '', 'type': 'uint8'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'version', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [{'name': '_owner', 'type': 'address'}], 'name': 'balanceOf', 'outputs': [{'name': 'balance', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [], 'name': 'symbol', 'outputs': [{'name': '', 'type': 'string'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_to', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}], 'name': 'transfer', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': false, 'inputs': [{'name': '_spender', 'type': 'address'}, {'name': '_value', 'type': 'uint256'}, {'name': '_extraData', 'type': 'bytes'}], 'name': 'approveAndCall', 'outputs': [{'name': 'success', 'type': 'bool'}], 'payable': false, 'type': 'function'}, {'constant': true, 'inputs': [{'name': '_owner', 'type': 'address'}, {'name': '_spender', 'type': 'address'}], 'name': 'allowance', 'outputs': [{'name': 'remaining', 'type': 'uint256'}], 'payable': false, 'type': 'function'}, {'inputs': [{'name': '_initialAmount', 'type': 'uint256'}, {'name': '_tokenName', 'type': 'string'}, {'name': '_decimalUnits', 'type': 'uint8'}, {'name': '_tokenSymbol', 'type': 'string'}], 'type': 'constructor'}, {'payable': false, 'type': 'fallback'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': '_from', 'type': 'address'}, {'indexed': true, 'name': '_to', 'type': 'address'}, {'indexed': false, 'name': '_value', 'type': 'uint256'}], 'name': 'Transfer', 'type': 'event'}, {'anonymous': false, 'inputs': [{'indexed': true, 'name': '_owner', 'type': 'address'}, {'indexed': true, 'name': '_spender', 'type': 'address'}, {'indexed': false, 'name': '_value', 'type': 'uint256'}], 'name': 'Approval', 'type': 'event'}]

Const ERC721

ERC721: PartialReadonlyContractAbi = [{'constant': true,'inputs': [],'name': 'name','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '','type': 'uint256',},],'name': 'kittyIndexToApproved','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '','type': 'address',},{'name': '','type': 'uint256',},],'name': 'allowed','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'getApproved','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'approve','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [],'name': 'totalSupply','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{"constant": false,"inputs": [{"name": "_to","type": "address"},{"name": "_tokenId","type": "uint256"}],"name": "transfer","outputs": [],"payable": false,"stateMutability": "nonpayable","type": "function"},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'transferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},{'name': '_index','type': 'uint256',},],'name': 'tokenOfOwnerByIndex','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},],'name': 'safeTransferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'exists','outputs': [{'name': '','type': 'bool',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_index','type': 'uint256',},],'name': 'tokenByIndex','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'ownerOf','outputs': [{'name': '','type': 'address',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},],'name': 'balanceOf','outputs': [{'name': '','type': 'uint256',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [],'name': 'symbol','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': false,'inputs': [{'name': '_to','type': 'address',},{'name': '_approved','type': 'bool',},],'name': 'setApprovalForAll','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': false,'inputs': [{'name': '_from','type': 'address',},{'name': '_to','type': 'address',},{'name': '_tokenId','type': 'uint256',},{'name': '_data','type': 'bytes',},],'name': 'safeTransferFrom','outputs': [],'payable': false,'stateMutability': 'nonpayable','type': 'function',},{'constant': true,'inputs': [{'name': '_tokenId','type': 'uint256',},],'name': 'tokenURI','outputs': [{'name': '','type': 'string',},],'payable': false,'stateMutability': 'view','type': 'function',},{'constant': true,'inputs': [{'name': '_owner','type': 'address',},{'name': '_operator','type': 'address',},],'name': 'isApprovedForAll','outputs': [{'name': '','type': 'bool',},],'payable': false,'stateMutability': 'view','type': 'function',},{'inputs': [{'name': '_name','type': 'string',},{'name': '_symbol','type': 'string',},],'payable': false,'stateMutability': 'nonpayable','type': 'constructor',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_from','type': 'address',},{'indexed': true,'name': '_to','type': 'address',},{'indexed': false,'name': '_tokenId','type': 'uint256',},],'name': 'Transfer','type': 'event',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_owner','type': 'address',},{'indexed': true,'name': '_approved','type': 'address',},{'indexed': false,'name': '_tokenId','type': 'uint256',},],'name': 'Approval','type': 'event',},{'anonymous': false,'inputs': [{'indexed': true,'name': '_owner','type': 'address',},{'indexed': true,'name': '_operator','type': 'address',},{'indexed': false,'name': '_approved','type': 'bool',},],'name': 'ApprovalForAll','type': 'event',},]

Const INVERSE_BASIS_POINT

INVERSE_BASIS_POINT: 10000 = 10000

Const MAINNET_PROVIDER_URL

MAINNET_PROVIDER_URL: "https://eth-mainnet.alchemyapi.io/jsonrpc/y5dLONzfAJh-oCY02DCP3UWCT2pSEXMo" = "https://eth-mainnet.alchemyapi.io/jsonrpc/y5dLONzfAJh-oCY02DCP3UWCT2pSEXMo"

Const MAX_ERROR_LENGTH

MAX_ERROR_LENGTH: 120 = 120

Const MAX_UINT_256

MAX_UINT_256: any = WyvernProtocol.MAX_UINT_256

Const MIN_EXPIRATION_SECONDS

MIN_EXPIRATION_SECONDS: 10 = 10

Const NULL_ADDRESS

NULL_ADDRESS: any = WyvernProtocol.NULL_ADDRESS

Const NULL_BLOCK_HASH

NULL_BLOCK_HASH: "0x0000000000000000000000000000000000000000000000000000000000000000" = "0x0000000000000000000000000000000000000000000000000000000000000000"

Const OPENSEA_FEE_RECIPIENT

OPENSEA_FEE_RECIPIENT: "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073" = "0x5b3256965e7c3cf26e11fcaf296dfc8807c01073"

Const OPENSEA_SELLER_BOUNTY_BASIS_POINTS

OPENSEA_SELLER_BOUNTY_BASIS_POINTS: 100 = 100

Const ORDERBOOK_PATH

ORDERBOOK_PATH: string = `/wyvern/v${ORDERBOOK_VERSION}`

Const ORDERBOOK_VERSION

ORDERBOOK_VERSION: number = 1

Const ORDER_MATCHING_LATENCY_SECONDS

ORDER_MATCHING_LATENCY_SECONDS: number = 60 * 60 * 24 * 7

Const RINKEBY_PROVIDER_URL

RINKEBY_PROVIDER_URL: "https://eth-rinkeby.alchemyapi.io/jsonrpc/-yDg7wmgGw5LdsP4p4kyxRYuDzCkXtoI" = "https://eth-rinkeby.alchemyapi.io/jsonrpc/-yDg7wmgGw5LdsP4p4kyxRYuDzCkXtoI"

Const SELL_ORDER_BATCH_SIZE

SELL_ORDER_BATCH_SIZE: 3 = 3

Const SITE_HOST_MAINNET

SITE_HOST_MAINNET: "https://opensea.io" = "https://opensea.io"

Const SITE_HOST_RINKEBY

SITE_HOST_RINKEBY: "https://rinkeby.opensea.io" = "https://rinkeby.opensea.io"

Const WYVERN_EXCHANGE_ADDRESS_MAINNET

WYVERN_EXCHANGE_ADDRESS_MAINNET: "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b" = "0x7be8076f4ea4a4ad08075c2508e481d6c946d12b"

Const WYVERN_EXCHANGE_ADDRESS_RINKEBY

WYVERN_EXCHANGE_ADDRESS_RINKEBY: "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9" = "0x5206e78b21ce315ce284fb24cf05e0585a93b1d9"

Const txCallbacks

txCallbacks: object

Type declaration

Functions

_throwOrContinue

  • _throwOrContinue(error: Error, retries: number): void
  • Parameters

    • error: Error
    • retries: number

    Returns void

Const assetBundleFromJSON

Const assetFromJSON

assignOrdersToSides

  • Assign an order and a new matching order to their buy/sell sides

    Parameters

    • order: Order

      Original order

    • matchingOrder: UnsignedOrder

      The result of _makeMatchingOrder

    Returns object

canSettleOrder

Const confirmTransaction

  • confirmTransaction(web3: Web3, txHash: string): Promise<Object>
  • Parameters

    • web3: Web3
    • txHash: string

    Returns Promise<Object>

delay

  • delay(ms: number): Promise<Object>
  • Delay using setTimeout

    Parameters

    • ms: number

      milliseconds to wait

    Returns Promise<Object>

encodeAtomicizedTransfer

  • encodeAtomicizedTransfer(schema: WyvernSchemas.Schema<any>, assets: WyvernAsset[], from: string, to: string, atomicizer: WyvernAtomicizerContract): object
  • Encode the atomicized transfer of many assets

    Parameters

    • schema: WyvernSchemas.Schema<any>

      Wyvern Schema for the assets

    • assets: WyvernAsset[]

      List of assets to transfer

    • from: string

      Current address owning the assets

    • to: string

      Destination address

    • atomicizer: WyvernAtomicizerContract

      Wyvern Atomicizer instance

    Returns object

    • calldata: string

encodeProxyCall

  • encodeProxyCall(address: string, howToCall: HowToCall, calldata: string, shouldAssert?: boolean): any
  • Encode a call to a user's proxy contract

    Parameters

    • address: string

      The address for the proxy to call

    • howToCall: HowToCall

      How to call the addres

    • calldata: string

      The data to use in the call

    • Default value shouldAssert: boolean = true

      Whether to assert success in the proxy call

    Returns any

encodeTransferCall

  • encodeTransferCall(transferAbi: AnnotatedFunctionABI, from: string, to: string): any
  • Encode a transfer call for a Wyvern schema function

    Parameters

    • transferAbi: AnnotatedFunctionABI

      Annotated Wyvern ABI

    • from: string

      From address

    • to: string

      To address

    Returns any

estimateCurrentPrice

  • estimateCurrentPrice(order: Order, secondsToBacktrack?: number, shouldRoundUp?: boolean): BigNumber
  • Estimates the price of an order

    Parameters

    • order: Order

      The order to estimate price on

    • Default value secondsToBacktrack: number = 30

      The number of seconds to subtract on current time, to fix race conditions

    • Default value shouldRoundUp: boolean = true

      Whether to round up fractional wei

    Returns BigNumber

estimateGas

  • estimateGas(web3: Web3, __namedParameters: object): Promise<number>
  • Estimate Gas usage for a transaction

    Parameters

    • web3: Web3

      Web3 instance

    • __namedParameters: object
      • data: undefined | string

        data to send to contract

      • from: string

        address sending transaction

      • to: undefined | string

        destination contract address

      • value: string | number | BigNumber

        value in ETH to send with data

    Returns Promise<number>

Const event

Const findAsset

  • findAsset(web3: Web3, __namedParameters: object, retries?: number): Promise<WyvernAssetLocation | undefined>
  • Parameters

    • web3: Web3
    • __namedParameters: object
      • account: string
      • proxy: string
      • schema: any
      • wyAsset: any
    • Default value retries: number = 1

    Returns Promise<WyvernAssetLocation | undefined>

getCurrentGasPrice

  • getCurrentGasPrice(web3: Web3): Promise<BigNumber>
  • Get mean gas price for sending a txn, in wei

    Parameters

    • web3: Web3

      Web3 instance

    Returns Promise<BigNumber>

Const getMethod

getOrderHash

  • Get the non-prefixed hash for the order (Fixes a Wyvern typescript issue and casing issue)

    Parameters

    Returns any

getTransferFeeSettings

  • getTransferFeeSettings(web3: Web3, __namedParameters: object): Promise<object>
  • Get current transfer fees for an asset

    Parameters

    • web3: Web3

      Web3 instance

    • __namedParameters: object
      • asset: Asset

        The asset to check for transfer fees

    Returns Promise<object>

getWyvernBundle

  • Get the Wyvern representation of a group of NFT assets Sort order is enforced here

    Parameters

    • schema: any

      The WyvernSchema needed to access these assets

    • assets: Asset[]

      Assets to bundle

    Returns WyvernBundle

getWyvernENSNameAsset

  • Get the Wyvern representation of an ENS name as an asset

    Parameters

    • schema: WyvernSchemas.Schema<WyvernENSNameAsset>

      The WyvernSchema needed to access this asset

    • name: string

      The ENS name, ending in .eth

    Returns WyvernENSNameAsset

getWyvernNFTAsset

  • Get the Wyvern representation of an NFT asset

    Parameters

    • schema: WyvernSchemas.Schema<WyvernNFTAsset>

      The WyvernSchema needed to access this asset

    • tokenId: string

      The token's id

    • tokenAddress: string

      The address of the token's contract

    Returns WyvernNFTAsset

makeBigNumber

  • makeBigNumber(arg: number | string | BigNumber): BigNumber
  • Special fixes for making BigNumbers using web3 results

    Parameters

    • arg: number | string | BigNumber

      An arg or the result of a web3 call to turn into a BigNumber

    Returns BigNumber

Const orderFromJSON

  • orderFromJSON(order: any): Order

Const orderToJSON

  • Convert an order to JSON, hashing it as well if necessary

    Parameters

    • order: Order

      order (hashed or unhashed)

    Returns OrderJSON

parseSignatureHex

  • parseSignatureHex(signature: string): ECSignature
  • Parameters

    • signature: string

    Returns ECSignature

personalSignAsync

  • personalSignAsync(web3: Web3, message: string, signerAddress: string): Promise<ECSignature>
  • Sign messages using web3 personal signatures

    Parameters

    • web3: Web3

      Web3 instance

    • message: string

      message to sign

    • signerAddress: string

      web3 address signing the message

    Returns Promise<ECSignature>

promisify

  • promisify<T>(inner: function): Promise<T>
  • Promisify a callback-syntax web3 function

    Type parameters

    • T

    Parameters

    • inner: function

      callback function that accepts a Web3 callback function and passes it to the Web3 function

    Returns Promise<T>

promisifyCall

  • promisifyCall<T>(callback: function, onError?: undefined | function): Promise<T | undefined>
  • Promisify a call a method on a contract, handling Parity errors. Returns '0x' if error. Note that if T is not "string", this may return a falsey value when the contract doesn't support the method (e.g. isApprovedForAll).

    Type parameters

    • T

    Parameters

    • callback: function

      An anonymous function that takes a web3 callback and returns a Web3 Contract's call result, e.g. c => erc721.ownerOf(3, c)

    • Optional onError: undefined | function

      callback when user denies transaction

    Returns Promise<T | undefined>

rawCall

  • rawCall(web3: Web3, __namedParameters: object, onError?: undefined | function): Promise<string>
  • Call a method on a contract, sending arbitrary data and handling Parity errors. Returns '0x' if error.

    Parameters

    • web3: Web3

      Web3 instance

    • __namedParameters: object
      • data: undefined | string

        data to send to contract

      • from: undefined | string

        address sending call

      • to: undefined | string

        destination contract address

    • Optional onError: undefined | function

      callback when user denies transaction

    Returns Promise<string>

sendRawTransaction

  • sendRawTransaction(web3: Web3, __namedParameters: object, onError: function): Promise<string>
  • Send a transaction to the blockchain and optionally confirm it

    Parameters

    • web3: Web3

      Web3 instance

    • __namedParameters: object
      • data: undefined | string

        data to send to contract

      • from: string

        address sending transaction

      • gas: undefined | string | number | BigNumber
      • gasPrice: undefined | string | number | BigNumber

        gas price to use. If unspecified, uses web3 default (mean gas price)

      • to: undefined | string

        destination contract address

      • value: string | number | BigNumber

        value in ETH to send with data. Defaults to 0

    • onError: function

      callback when user denies transaction

        • (error: Error): void
        • Parameters

          • error: Error

          Returns void

    Returns Promise<string>

Const tokenFromJSON

  • tokenFromJSON(token: any): WyvernSchemas.FungibleToken
  • Parameters

    • token: any

    Returns WyvernSchemas.FungibleToken

Const track

  • track(web3: Web3, txHash: string, onFinalized: TxnCallback): void

validateAndFormatWalletAddress

  • validateAndFormatWalletAddress(web3: Web3, address: string): string
  • Validates that an address exists, isn't null, and is properly formatted for Wyvern and OpenSea

    Parameters

    • web3: Web3
    • address: string

      input address

    Returns string

Object literals

Const DECENTRALAND_AUCTION_CONFIG

DECENTRALAND_AUCTION_CONFIG: object

1

1: string = "0xf87e31492faf9a91b02ee0deaad50d51d56d5d4d"

Const proxyABI

proxyABI: object

constant

constant: boolean = false

inputs

inputs: object[] = [{'name': 'dest', 'type': 'address'}, {'name': 'howToCall', 'type': 'uint8'}, {'name': 'calldata', 'type': 'bytes'}]

name

name: string = "proxy"

outputs

outputs: object[] = [{'name': 'success', 'type': 'bool'}]

payable

payable: boolean = false

stateMutability

stateMutability: string = "nonpayable"

type

type: string = "function"

Const proxyAssertABI

proxyAssertABI: object

constant

constant: boolean = false

inputs

inputs: object[] = [{'name': 'dest', 'type': 'address'}, {'name': 'howToCall', 'type': 'uint8'}, {'name': 'calldata', 'type': 'bytes'}]

name

name: string = "proxyAssert"

outputs

outputs: never[] = []

payable

payable: boolean = false

stateMutability

stateMutability: string = "nonpayable"

type

type: string = "function"

Generated using TypeDoc