Seller
TypeScript SDK
const sellerAddress = signerWallet.address;
await coreSDK.createSeller({
assistant: sellerAddress,
admin: sellerAddress,
treasury: sellerAddress,
contractUri: "http://contract.uri",
royaltyPercentage: "0",
authTokenId: "0",
authTokenType: 0,
metadataUri: "http://metadata.uri",
});const newAssistantWallet = Wallet.createRandom(ethereumProvider);
const sellerId = "12";
const seller = await coreSDK.getSellerById(sellerId);
// Start the update with the seller's wallet
await coreSDK.updateSellerAndOptIn({
...seller,
{assistant: newAssistantWallet.address}
})
// Finalize the update with the assistant's wallet
const assistantCoreSDK = CoreSDK.fromDefaultConfig({
envName,
configId,
web3Lib: new EthersAdapter(provider, newAssistantWallet),
});
await assistantCoreSDK.optInToSellerUpdate({
id: sellerId,
fieldsToUpdate: {assistant: true}
})Solidity
Last updated