Skip to content

Releases: storyprotocol/sdk

@story-protocol/core-sdk@1.3.0-beta.3

07 Feb 22:10
0dac6ae
Compare
Choose a tag to compare

Migration

No changes required from v1.3.0.beta.2

v1.3.0.beta.2 release notes

Changes

  • Support for Mainnet
StoryClient.newClient({
  chainId: "mainnet", // or 1514
  transport: http(RPC),
});
  • Fixed an issue with ipAsset batchRegister not supporting ipMetadata
  • Fixed bug with mintLicenseToken not approving the correct spender for WIP usage
  • Wrapped IP token address is now exported. WIP_TOKEN_ADDRESS

@story-protocol/core-sdk@1.3.0-beta.2

06 Feb 01:13
260bc78
Compare
Choose a tag to compare

Migration

All previous SDK versions must be updated to v1.3.0.beta.2 to ensure full compatibility with POC v1.3 on aeneid.

Migrating from v1.3.0.beta.1

  1. Update chainId from homer to aeneid when creating a new Story Client:
StoryClient.newClient({
  chainId: "aeneid",
  transport: http(RPC),
});
  1. If you are using ipAsset.mintAndRegisterIpAndMakeDerivative, note that the response field childIpId has been renamed to ipId.

Migrating from v1.2.x

Follow our migration guide.

Changes

Support for aeneid Testnet

The homer testnet has been renamed to aeneid. You can find the latest RPC details here.

StoryClient.newClient({
  chainId: "aeneid",
  transport: http(RPC),
});

New Wrapped IP Client

The wip client allows conversion between IP and WIP.

// IP -> WIP
const rsp = await client.wipClient.deposit({
  amount,
  txOptions: { waitForTransaction: true },
});

// WIP -> IP 
const rsp = await client.wipClient.withdraw({
  amount,
  txOptions: { waitForTransaction: true },
});

Also check for WIP balance

await client.wipClient.balanceOf("0x0000000000000000000000000000000000000000");

New Royalty Method: claimAllRevenue

A new method, claimAllRevenue, has been added to the Royalty module. It allows claiming all revenue from the child IPs of an ancestor IP.

If the wallet owns the IP and the claimer is the IP Account, all claimed tokens will be automatically transferred from the IP Account to the client’s wallet.

If any claimed tokens are WIP, they will be automatically converted back to IP unless disabled via options.

Disable IP Account Claims Transfer

Disable the SDK from trying to automatically transfer the claimed tokens from the IP Account back to your wallet.

await client.royalty.claimAllRevenue({
  // ...other params
  claimOptions: { autoTransferAllClaimedTokensFromIp:false }
});

Disable IP → WIP Conversion

To prevent automatic conversion of WIP to IP, override the following option.

await client.royalty.claimAllRevenue({
  // ...other params
  claimOptions: { autoUnwrapIpTokens: false }
});

Auto Wrapping IP

The SDK now supports automatic conversion of IP to WIP when a wallet lacks sufficient WIP to cover minting fees.

If the wallet does not have enough WIP

  • The SDK will first convert IP → WIP, then approve the SPG contracts to use the WIP, and finally execute the SPG contract call.
  • This process typically involves two or more transactions, but with Multicall, it is bundled into a single transaction for efficiency.
  • Multicall is automatically enabled for all supported methods. Methods that do not currently support Multicall are listed under Supported Methods below.

If the wallet has enough WIP

  • The SDK will use the available WIP directly.
  • If the SPG contracts have not been approved to use the WIP, the SDK will include any necessary approval transactions automatically. Approvals are only needed once per SGP contract.
  • Multicall is not yet supported for this flow, but future updates may enable it.

If the wallet lacks both WIP and IP

  • An error will be thrown indicating insufficient funds.

Supported Methods

The following SDK methods support automatic IP → WIP conversion when minting fees in WIP is required. This behavior can be customized via wipOptions:

  • license.mintLicenseTokens
    • Pay license minting fee
  • ipAsset.mintAndRegisterIpAssetWithPilTerms
    • Pay NFT minting fee
  • ipAsset.mintAndRegisterIpAndMakeDerivativeWithLicenseTokens
    • Pay NFT and license minting fee
    • Does not support Multicall
  • ipAsset.mintAndRegisterIpAndMakeDerivativeAndDistributeRoyaltyTokens
    • Pay NFT and license minting fee
  • ipAsset.mintAndRegisterIpAndAttachPilTermsAndDistributeRoyaltyTokens
    • Pay NFT minting fee
  • ipAsset.registerDerivativeIpAndAttachLicenseTermsAndDistributeRoyaltyTokens
    • Pay license minting fee
    • Does not support Multicall
  • ipAsset.registerDerivativeIp
    • Pay license minting fee
    • Does not support Multicall
  • ipAsset.mintAndRegisterIpAndMakeDerivative
    • Pay NFT and license minting fee
  • ipAsset.payRoyaltyOnBehalf
    • Auto convert IP -> WIP when paying royalty in WIP.

Disabling Auto Wrap IP

To disable automatic conversion of IP to WIP, set enableAutoWrapIp to false

client.ipAsset.registerDerivativeIp({
  wipOptions: { enableAutoWrapIp: false },
})

Disable Multicall

By default, the SDK batches transactions into a single Multicall when possible to reduces the number of contract calls (e.g., WIP deposit → WIP approve → SPG contract call). To disable this behavior:

client.ipAsset.registerDerivativeIp({
  wipOptions: { useMulticallWhenPossible: false },
})

Disable Auto Approve

When WIP is required for IP registration or minting license tokens, the SDK automatically approves the SPG contracts to use the WIP. By default, the approval is set to max allowance when the current allowance is insufficient. To disable this behavior:

client.ipAsset.registerDerivativeIp({
  wipOptions: { enableAutoApprove: false },
})

Other Changes

  • Replaced permanent permissions with transient permissions. This this a required change for POC v1.3.
  • Renamed childIpId to ipId in the response data for mintAndRegisterIpAndMakeDerivative, aligning it with other register functions like registerIpAndMakeDerivative.

@story-protocol/core-sdk@1.3.0-beta.1

28 Jan 14:26
ce8911b
Compare
Choose a tag to compare

🚀 Features

  • Integrate v1.3 smart contract-part one
  • Update the related methods
  • Compatible sdk for devnet

Contributors:

@story-protocol/core-sdk@1.2.0-rc.4

17 Dec 06:07
1447478
Compare
Choose a tag to compare

🚀 Features

  • Enhance some features

Contributors:

core-sdk@1.2.0-rc.3

03 Dec 03:49
b18d633
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15

core-sdk@1.2.0-rc.2

13 Nov 15:52
b5a3b5c
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15

core-sdk@1.2.0-rc.1

01 Nov 04:18
7a1ee60
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15

react-sdk@1.1.0-stable

15 Oct 04:45
f8d3752
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15

core-sdk@1.1.0-stable

10 Oct 07:33
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15

core-sdk@1.0.0-rc.23

27 Sep 08:18
6f0d6ee
Compare
Choose a tag to compare

📦 Uncategorized

  • Update publish-package.yaml
  • Refactor the related unit tests
  • React sdk
  • Add integration test in react sdk
  • Publish rc15