An unofficial implementation of the Opensea V2 API in rust
Instantiate a client with an Opensea API key, and then call fulfill_listing
with the details of the order you want to fulfill onchain.
let client = OpenSeaV2Client::new(OpenSeaApiConfig { api_key });
let req = FulfillListingRequest {
listing: Listing {
hash: H256::from_str(
"0xce83ef67f520d74d081aa4da9588ee6743d3aa64caff98a7dddf214e10469929",
)
.unwrap(),
chain: Chain::Mainnet,
protocol_version: ProtocolVersion::V1_4,
},
fulfiller: Fulfiller {
address: H160::from_str("0xD77F375A33b1109e82f3C46A30537F1E019708eB").unwrap(),
},
};
let resp = client.fulfill_listing(req).await;
println!("{:?}", resp);
cargo check
cargo test
cargo build [--release]
Based on the original opensea-rs bindings written by gakonst.